Skip to content
This repository has been archived by the owner on Aug 11, 2022. It is now read-only.

npm login fails on password w/special characters #5729

Closed
nwgh opened this issue Jul 18, 2014 · 4 comments
Closed

npm login fails on password w/special characters #5729

nwgh opened this issue Jul 18, 2014 · 4 comments
Labels

Comments

@nwgh
Copy link

nwgh commented Jul 18, 2014

While trying to "npm login" on a new machine, I was unable to complete the process. The username and password are correct (they work just fine on the website), but no luck. However, by changing my password to one that does not contain any of the special characters below, "npm login" works just fine.

The password that caused the issues (which is no longer in use, in favor of one I can npm login with) contained %, #, and ^ (as well as an assortment of alphanumerics, of course).

Console output and npm-debug.log are at https://gist.github.com/todesschaf/78a546787b19223ba40b

@kenany
Copy link
Contributor

kenany commented Jul 24, 2014

This falls under #5782 now.

@isaacs
Copy link
Contributor

isaacs commented Aug 22, 2014

Seems to be fixed on 1.4 and master.

isaacs added a commit to npm/npm-registry-client that referenced this issue Aug 22, 2014
A password like '%1234' would be broken and interpreted as '\u000034' in
the request, becuase it is interpreting the %12 as a percent-encoded
hex, and then it gets broken in the conversion to UTF-8.

Fix npm/npm#6008
Fix npm/npm#5729
Fix npm/npm#5772
Fix npm/npm#5682

Related to npm/npm#5782, but not a fix, since that issue is asking for
the npm client and website to have the *same* set of rules, and this
commit does not guarantee that that is the case.
isaacs added a commit to npm/npm-registry-client that referenced this issue Aug 22, 2014
A password like '%1234' would be broken and interpreted as '\u000034' in
the request, becuase it is interpreting the %12 as a percent-encoded
hex, and then it gets broken in the conversion to UTF-8.

Fix npm/npm#6008
Fix npm/npm#5729
Fix npm/npm#5772
Fix npm/npm#5682

Related to npm/npm#5782, but not a fix, since that issue is asking for
the npm client and website to have the *same* set of rules, and this
commit does not guarantee that that is the case.

Forward-ported from the fix on the v2.0 branch: 62f04f0
@othiym23 othiym23 added the bug label Sep 21, 2014
@madhums
Copy link

madhums commented Jan 26, 2015

I am having this issue where my password contains ! as a special character. Just not able to login

λ node -v
v0.10.35
λ npm -v
2.3.0

@mgoldsborough
Copy link

Had the same issue here. My password had a carrot (^) and dollar sign ($) in it and I was unable to login via npm login.

$ node -v
v4.1.2
$ npm -v
3.3.8

Here's the output:

$ npm login
Username: [my_username]
Password: [my_password]
Email: (this IS public) ***@gmail.com
npm ERR! Darwin 14.5.0
npm ERR! argv "/usr/local/Cellar/node/4.1.2/bin/node" "/usr/local/bin/npm" "login"
npm ERR! node v4.1.2
npm ERR! npm  v3.3.8
npm ERR! code E400

npm ERR! Unknown error while authenticating : -/user/org.couchdb.user:[my_username]
npm ERR! 
npm ERR! If you need help, you may report this error at:
npm ERR!     <https://github.com/npm/npm/issues>

npm ERR! Please include the following file with any support request:
npm ERR!     /path/to/my/log/npm-debug.log

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

6 participants