Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix the error message when the token is incorrect (#25701) #25836

Merged
merged 4 commits into from
Jul 12, 2023

Commits on Jul 11, 2023

  1. Fix the error message when the token is incorrect (go-gitea#25701)

    we refactored `userIDFromToken` for the token parsing part into a new
    function `parseToken`. `parseToken` returns the string `token` from
    request, and a boolean `ok` representing whether the token exists or
    not. So we can distinguish between token non-existence and token
    inconsistency in the `verfity` function, thus solving the problem of no
    proper error message when the token is inconsistent.
    close go-gitea#24439  
    related go-gitea#22119
    
    ---------
    
    Co-authored-by: Jason Song <[email protected]>
    Co-authored-by: Giteabot <[email protected]>
    3 people committed Jul 11, 2023
    Configuration menu
    Copy the full SHA
    807aedb View commit details
    Browse the repository at this point in the history

Commits on Jul 12, 2023

  1. Configuration menu
    Copy the full SHA
    aabc374 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    b3a227e View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    e132b9f View commit details
    Browse the repository at this point in the history