Describe the bug
Following this Tweeter thread https://twitter.com/cedrickrier/status/1156922196213805056?s=19 it seems like using a @token username and a non-prefixed token as a password results in HTTP 500 response which probably means a traceback in the backend logs.
Needs to be verified tho.
Expected behavior
HTTP 403
To Reproduce
N/A
My Platform
N/A
Additional context
N/A
cc @cedk who reported this.
Per our conversation in a planning meeting a few days ago, some of our upcoming fixes will probably address this -- I'll keep an eye on it.
I think the real issue here is that folks are interpreting the pypi: prefix as not part of the token. Changing the prefix may not resolve that issue.
Totally! I think that maybe some warning âš there would be helpful.
But still the HTTP error code shouldn't be 500.
Agreed, @woodruffw can we do a better job of catching this issue?
Yep, we can. I'll take a look at it tomorrow!
Just tried reproducing this on master by dropping pypi- from the token, but didn't receive a 500 error (got the expected 403).
My steps:
pypi- prefix, to my .pypirctwine upload --repository localhost dist/*@webknjaz Do you have any additional information that could help me repro here?
Sorry, I only know what's in that Twitter thread.
Fixed in #6384.