-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
[Error-Handling] 500 when try to Add infalid SSH-Key #8800
Comments
Could you describe steps to reproduce? |
|
This comment has been minimized.
This comment has been minimized.
It works if the key is valid. It fails to validate the input. https://qsandbox.com/tools/private-public-keygen Valid content (doesn't fail):
|
@guillep2k |
same same is at http:///user/settings/keys -> gitea should not show 500 instead tell the user that it needs a valide ssh key |
Avoid out of bounds error by using strings.HasPrefix to check for starting SSH2 text rather than assuming user input has at least 31 characters. Add tests for bad input as well. Fixes go-gitea#8800
Avoid out of bounds error by using strings.HasPrefix to check for starting SSH2 text rather than assuming user input has at least 31 characters. Add tests for bad input as well. Fixes #8800
Avoid out of bounds error by using strings.HasPrefix to check for starting SSH2 text rather than assuming user input has at least 31 characters. Add tests for bad input as well. Fixes go-gitea#8800
Afected:
what i would expect:
-> gitea tell the user that it needs a valide ssh key
version: current
The text was updated successfully, but these errors were encountered: