Skip to content
This repository

Wrong handling of %40 in username or password #36

Closed
shimaore opened this Issue June 10, 2011 · 1 comment

1 participant

Stéphane Alnet
Stéphane Alnet

URIs which contain %40 in the username or password will cause problems:

good_uri1 = 'http://username:password@127.0.0.1:5984/db'
good_uri2 = 'http://username:password@127.0.0.1:5984/db%40id'
bad_uri1 = 'http://username%40example.net:password@127.0.0.1:5984/db'
bad_uri2 = 'http://username:password%40example.net@127.0.0.1:5984/db'

For bad_uri1 request will contact host "username" with URI /:password%40example.net@127.0.0.1:5984/db
For bad_uri2 request will contact host "username" with URI /%40example.net:password@127.0.0.1:5984/db

Tested with request 1.9.6 from github.

Stéphane Alnet

Looking at the request code this must be a node URL parsing issue. Confirmed by upgrading Node (from 0.4.7) and the problem is gone.

Stéphane Alnet shimaore closed this June 10, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.