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) #25834

Merged
merged 1 commit 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 <i@wolfogre.com>
    Co-authored-by: Giteabot <teabot@gitea.io>
    3 people committed Jul 11, 2023
    Configuration menu
    Copy the full SHA
    c167a99 View commit details
    Browse the repository at this point in the history