-
Notifications
You must be signed in to change notification settings - Fork 996
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
"500 Server Error: Internal Server Error" when there is an unintentional trailing newline in the password #7298
Comments
Thanks! I think this is the full stacktrace if anyone would like to fix it:
(https://sentry.io/organizations/python-software-foundation/issues/1143700661/) This might be a bug with |
It appears that someone has enumerated the various exceptions |
Resolves #7298 Co-authored-by: Dustin Ingram <di@users.noreply.github.com>
Describe the bug
When uploading distributions with twine I get the error
HTTPError: 500 Server Error: Internal Server Error
when there is an unintentional trailing newline in the password. This is confusing as I would expect the error403 Client Error: Invalid or non-existent authentication information.
or even an automatic stripping of whitepace.This happens easily when using continuous deployment and authentication via github secrets, as it is easy to accidentally copy the token from the PyPI Add API token page with a trailing newline. This is then preserved when entering it into a textfield and thus included in the environment variable set by the runner.
As the server seems to be returning a confusing message I added this issue here instead of in the twine repo. Hope it's correct here.
Expected behavior
Receive authentication error or automatic stripping of whitespace
To Reproduce
Note the newline at the end of the token:
Without the newline at the end of the token the behavior is better:
My Platform
The text was updated successfully, but these errors were encountered: