]> source.dussan.org Git - gitea.git/commit
Only check access tokens if they are likely to be tokens (#16164) (#16171)
authorzeripath <art27@cantab.net>
Wed, 16 Jun 2021 09:06:27 +0000 (10:06 +0100)
committerGitHub <noreply@github.com>
Wed, 16 Jun 2021 09:06:27 +0000 (05:06 -0400)
commit946eb1321c620f7fc8938df130809c0522c93613
tree12180a8c5467c9fce469dd7fe91adf42a65a5127
parentbc82bb9cda948912954ff75a46863c82b62f7759
Only check access tokens if they are likely to be tokens (#16164) (#16171)

Backprt #16164

Gitea will currently check every if every password is an access token even though
most passwords are not and cannot be access tokens.

By creation access tokens are 40 byte hexadecimal strings therefore only these should
be checked.

Signed-off-by: Andrew Thornton <art27@cantab.net>
models/token.go