]> source.dussan.org Git - gitea.git/commit
Only check access tokens if they are likely to be tokens (#16164)
authorzeripath <art27@cantab.net>
Tue, 15 Jun 2021 22:29:25 +0000 (23:29 +0100)
committerGitHub <noreply@github.com>
Tue, 15 Jun 2021 22:29:25 +0000 (00:29 +0200)
commitb8e4ce754ea8a80b475f498fc7f8ca166815ad91
tree2878484b2a57802b35de98ee9312cca73e0b8b09
parent3d991319df49d0af8903ae654b9b69623c6abfff
Only check access tokens if they are likely to be tokens (#16164)

* Only check access tokens if they are likely to be tokens

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