domainersuitedev / delicious-api

Delicious API Documentation
278 stars 61 forks source link

Passwords with Special Characters Can't Log In #10

Open devinfoley opened 10 years ago

devinfoley commented 10 years ago

I have a test user with a password that looks something like this:

^FwF*5J1)V5j1+8/D3x:4,2=

I am able to log in via the web, but not via API. Here are some things I've tried...

1) curl -u 'mytestusername:^FwF*5J1)V5j1+8/D3x:4,2=' https://api.del.icio.us/v1/posts/get

2) curl https://mytestusername:^FwF*5J1)V5j1+8/D3x:4,2=@api.del.icio.us/v1/posts/get

3) curl https://mytestusername:%5EFwF%2A5J1%29V5j1%2B8%2FD3x%3A4%2C2%3D@api.del.icio.us/v1/posts/get

4) curl -u 'mytestusername:%5EFwF%2A5J1%29V5j1%2B8%2FD3x%3A4%2C2%3D' https://api.del.icio.us/v1/posts/get

5) In Chrome, open https://api.del.iciou.us/v1/posts/get, and paste in the u/p

I get result code="access denied" with all of these.

If I change my password to something like 'delicious123', everything works fine.

Am I doing something wrong? Or is there a bug in the API?

zmanring-zz commented 10 years ago

@devinfoley I have a user also complaining about this, I had him change his password to something without special characters and all was fine. But obviously I don't see that as a long term fix. Please let me know what comes out of this discussion.

vjkaruna commented 10 years ago

@devinfoley @zmanring I just pushed an API change that attempts to, when presented with a password with URLEncoded characters, url-decode* those characters. Can you try URLEncoding those passwords with special characters, and see if it works?

devinfoley commented 10 years ago

Hmmmm unfortunately I'm still having the same issue after testing today.

jeremysimmons commented 9 years ago

curl --basic --user username:password https://api.del.icio.us/v1/posts/update works for me