• @guqing guqing pushed to chore/content-service in guqing/halo

    Below is the list of commits:

    • chore: move content service to api module (136268c)
    0 0
  • @guqing guqing created branch chore/post-service in guqing/halo

    guqing/halo

    ✍ 一款优秀的开源博客发布应用。

    0 0
  • @guqing guqing opened pull request #5977 in halo-dev/halo

    What type of PR is this?

    /kind improvement
    /area plugin
    /area core

    What this PR does / why we need it:

    移动内容服务类到 api 模块下允许插件使用

    目前插件有很多获取文章内容的需求,但插件却一直无法使用公共逻辑,目前文章内容的获取逻辑比较复杂因此将其移动到 api 模块下便于插件使用

    Does this PR introduce a user-facing change?

    None
    
    0 0
  • @guqing guqing created branch chore/content-service in guqing/halo

    guqing/halo

    ✍ 一款优秀的开源博客发布应用。

    0 0
  • @guqing guqing created branch chore/post-service in guqing/halo

    guqing/halo

    ✍ 一款优秀的开源博客发布应用。

    0 0
  • @guqing guqing commented on issue #5929 in halo-dev/halo

    另外,建议本地 squash 一下 commits。

    Done

    0 0
  • @guqing guqing pushed to feature/remember-me in guqing/halo

    Below is the list of commits:

    • Refine UI for remember me login option (b7622b7)
    • feat: add remember-me mechanism to enhance user login experience (d4573bb)
    0 0
  • @guqing guqing commented on pull request #5929 in halo-dev/halo

    如果需要缓存建议直接在 CryptoService 中处理,因此不再关注该建议

    0 0
  • Sorry, I misunderstood. I will close this issue

    0 0
  • Describe the bug
    The decodeCookie method in AbstractRememberMeServices attempts to pad the cookie value for Base64 decoding. However, the current implementation may not correctly calculate the padding needed to ensure the string length is a multiple of 4, which is a requirement for Base64 decoding.

    Current Implementation

    for (int j = 0; j < cookieValue.length() % 4; j++) {
        cookieValue = cookieValue + "=";
    }

    To Reproduce
    Steps to reproduce the behavior.

    1. Pass a cookie value whose length modulo 4 is not 0 to the decodeCookie method without the correct padding.
    2. Observe the IllegalArgumentException due to invalid Base64 string format.

    Expected behavior
    The method should add padding characters so that the length of cookieValue becomes a multiple of 4 to adhere to Base64 decoding requirements. The padding should be calculated as 4 - (cookieValue.length() % 4) and should only add padding if the result is less than 4.

    Impact
    Without this fix, the decodeCookie method may throw IllegalArgumentException when attempting to decode improperly padded Base64 strings, leading to unhandled exceptions and potential disruptions in the remember-me authentication flow.

    Sample
    The 123 bit base64 encoding here

    YWRtaW46MTcxODk2NDE3NDgwODpTSEEtMjU2OmNkOTM0ZTAyZWQ4NGJmMzc1ZTA4MmE1OWU4YTA3NTNiMzA3ODg1MjZmYzA3YjgyYzVmY2Y3YmJiYzdjYzRkNWU
    

    will become the following code after passing through that section of code:

    YWRtaW46MTcxODk2NDE3NDgwODpTSEEtMjU2OmNkOTM0ZTAyZWQ4NGJmMzc1ZTA4MmE1OWU4YTA3NTNiMzA3ODg1MjZmYzA3YjgyYzVmY2Y3YmJiYzdjYzRkNWU===
    

    but the expected result should be

    YWRtaW46MTcxODk2NDE3NDgwODpTSEEtMjU2OmNkOTM0ZTAyZWQ4NGJmMzc1ZTA4MmE1OWU4YTA3NTNiMzA3ODg1MjZmYzA3YjgyYzVmY2Y3YmJiYzdjYzRkNWU=
    

    If it is confirmed that this is a problem, I am willing to try to solve it

    0 0