Skip to content
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

cargo login should try detecting errors #4434

Closed
KamilaBorowska opened this issue Aug 26, 2017 · 2 comments
Closed

cargo login should try detecting errors #4434

KamilaBorowska opened this issue Aug 26, 2017 · 2 comments
Labels
A-diagnostics Area: Error and warning messages generated by Cargo itself. C-enhancement Category: enhancement Command-login

Comments

@KamilaBorowska
Copy link

When using cargo login, cargo asks for

please visit https://crates.io/me and paste the API Token below

While the input is trimmed, there is more that can be done, for instance removing cargo login from beginning of token (if an entire command is pasted for some reason) and detecting things that definitely aren't tokens (too short or too long to be them, having invalid token characters and so on).

@alexcrichton alexcrichton added the A-diagnostics Area: Error and warning messages generated by Cargo itself. label Aug 26, 2017
@eminence
Copy link
Contributor

Triage: removing cargo login from the pasted token was implemented in #7588, so I think this issue can be closed.

@ehuss
Copy link
Contributor

ehuss commented Nov 23, 2022

Yea, I think this can be effectively closed. There isn't a specific set of valid characters (it is an opaque string), so I don't think there is much more that cargo can do (with a bearer token).

@ehuss ehuss closed this as completed Nov 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-diagnostics Area: Error and warning messages generated by Cargo itself. C-enhancement Category: enhancement Command-login
Projects
None yet
Development

No branches or pull requests

5 participants