Using a foreign character at password borks things up #2311

Closed
bebraw opened this Issue Mar 28, 2012 · 12 comments

7 participants

@bebraw

I just noticed that if you put a foreign character to your password (ie. ä or ö) at "adduser", it breaks the login (gives "Error: unauthorized Name or password is incorrect.", full trace below). I had to reset my account, get rid of .npmrc and user "regular" chars at my pw to make my account work. Just thought to let you know.

npm WARN Incorrect username or password
npm WARN You can reset your account by visiting:
npm WARN 
npm WARN     http://admin.npmjs.org/reset
npm WARN 

npm ERR! Error: unauthorized Name or password is incorrect.: -/user/org.couchdb.user:<censored>/-rev/1-6bff94ae505c5ec3893476504ca0001f
npm ERR!     at Request._callback (/opt/local/lib/node_modules/npm/lib/utils/npm-registry-client/request.js:181:12)
npm ERR!     at Request.callback (/opt/local/lib/node_modules/npm/node_modules/request/main.js:119:22)
npm ERR!     at Request.<anonymous> (/opt/local/lib/node_modules/npm/node_modules/request/main.js:525:16)
npm ERR!     at Request.emit (events.js:67:17)
npm ERR!     at IncomingMessage.<anonymous> (/opt/local/lib/node_modules/npm/node_modules/request/main.js:484:14)
npm ERR!     at IncomingMessage.emit (events.js:88:20)
npm ERR!     at HTTPParser.onMessageComplete (http.js:137:23)
npm ERR!     at CleartextStream.ondata (http.js:1150:24)
npm ERR!     at CleartextStream._push (tls.js:375:27)
npm ERR!     at SecurePair.cycle (tls.js:734:20)
npm ERR! You may report this log at:
npm ERR!     <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR!     <npm-@googlegroups.com>
npm ERR! 
npm ERR! System Darwin 11.3.0
npm ERR! command "node" "/opt/local/bin/npm" "adduser"
npm ERR! cwd <censored path>
npm ERR! node -v v0.6.12
npm ERR! npm -v 1.1.4
npm ERR! message unauthorized Name or password is incorrect.: -/user/org.couchdb.user:<censored>/-rev/1-6bff94ae505c5ec3893476504ca0001f
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     <censored path>/npm-debug.log
npm not ok
@ralt

IIRC, these limitations were added during registration. Should this issue be closed?

@timoxley
npm member

@bebraw Can this issue be closed? Seems like a duplicate of #2179 and #2176

#4430

@bebraw

@timoxley If you are certain everything works now, sure.

@timoxley
npm member

@bebraw I'm not sure everything works (though according to #2179 it's resolved), just suggesting close as it appears to be a duplicate.

@bebraw

@timoxley Ok. Do as you like. :)

@timoxley
npm member

@bebraw only you have permission to close

@bebraw

@timoxley Ah, ok. Closed.

@bebraw bebraw closed this Jan 8, 2014
@domenic
npm member

This is not a duplicate. Tim is being over zealous.

@domenic domenic reopened this Jan 8, 2014
@timoxley
npm member

Ok, I just tested this and you're correct, this is still an issue. Will test more thoroughly in future. Apologies.

@timoxley
npm member

To reproduce:

mv ~/.npmrc ~/.npmrc.old # backup existing .npmrc
npm adduser
Username: *anything* 
Password: äääööö # copy and paste this

output:

> npm adduser
Username: 1a0b956ae73ca6639b
Password:
Email: (this IS public) secoif+1a0b956ae73ca6639b@gmail.com
info trying registry request attempt 1 at 02:35:28
http PUT https://registry.npmjs.org/-/user/org.couchdb.user:1a0b956ae73ca6639b
http 201 https://registry.npmjs.org/-/user/org.couchdb.user:1a0b956ae73ca6639b

Then try to do anything with this username, such as npm login or npm publish gives you Error: login error:

> npm login --loglevel silly
npm info it worked if it ends with ok
npm verb cli [ 'node', '/usr/local/bin/npm', 'login', '--loglevel', 'silly' ]
npm info using npm@1.3.23
npm info using node@v0.10.24
Username: (1a0b956ae73ca6639b)
Email: (this IS public) (secoif+1a0b956ae73ca6639b@gmail.com)
info trying registry request attempt 1 at 02:37:34
http PUT https://registry.npmjs.org/-/user/org.couchdb.user:1a0b956ae73ca6639b
http 409 https://registry.npmjs.org/-/user/org.couchdb.user:1a0b956ae73ca6639b
info trying registry request attempt 1 at 02:37:35
http GET https://registry.npmjs.org/-/user/org.couchdb.user:1a0b956ae73ca6639b
http 200 https://registry.npmjs.org/-/user/org.couchdb.user:1a0b956ae73ca6639b
npm ERR! Error: login error
npm ERR!     at RegClient.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-registry-client/lib/request.js:82:22)
npm ERR!     at CouchLogin.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-registry-client/node_modules/couch-login/couch-login.js:191:14)
npm ERR!     at CouchLogin.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-registry-client/node_modules/couch-login/couch-login.js:173:46)
npm ERR!     at Request.self.callback (/usr/local/lib/node_modules/npm/node_modules/npm-registry-client/node_modules/request/request.js:123:22)
npm ERR!     at Request.EventEmitter.emit (events.js:98:17)
npm ERR!     at Request.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-registry-client/node_modules/request/request.js:893:14)
npm ERR!     at Request.EventEmitter.emit (events.js:117:20)
npm ERR!     at IncomingMessage.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-registry-client/node_modules/request/request.js:844:12)
npm ERR!     at IncomingMessage.EventEmitter.emit (events.js:117:20)
npm ERR!     at _stream_readable.js:920:16
npm ERR! If you need help, you may report this *entire* log,
npm ERR! including the npm and node versions, at:
npm ERR!     <http://github.com/isaacs/npm/issues>

npm ERR! System Darwin 13.0.0
npm ERR! command "node" "/usr/local/bin/npm" "login" "--loglevel" "silly"
npm ERR! cwd /Users/timoxley/Projects/test/testpkg
npm ERR! node -v v0.10.24
npm ERR! npm -v 1.3.23
npm verb exit [ 1, true ]
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR!     /Users/timoxley/Projects/test/testpkg/npm-debug.log
npm ERR! not ok code 0
@timoxley timoxley referenced this issue in npm/npm-registry-client Jan 8, 2014
Closed

':' in password causes couchdb login to fail #37

@iarna iarna added bug support and removed bug labels Oct 17, 2014
@smikes

I think this should be marked as "bug" and not "support" and possibly a corresponding issue should be created in npm-registry-client /cc @iarna (more github weirdage)

@othiym23

I just tested this, and with both the web site and the CLI, I was able to use äääööö as a password without problems, both to create new users and to log in. 🎉

Closing as resolved.

@othiym23 othiym23 closed this May 7, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment