Bug 5597 - Badly interpreted '+' character in email
: Badly interpreted '+' character in email
Status: RESOLVED FIXED
Product: Logitech Media Server
Classification: Unclassified
Component: Setup
: 7.0
: PC Windows XP
: P2 normal (vote)
: ---
Assigned To: Squeezebox QA Team email alias
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2007-09-28 11:37 UTC by Robin V.
Modified: 2007-09-30 02:42 UTC (History)
1 user (show)

See Also:
Category: ---


Attachments
+ badly sent (13.04 KB, image/png)
2007-09-28 11:38 UTC, Robin V.
Details
%2B correctly understood (12.91 KB, image/png)
2007-09-28 11:40 UTC, Robin V.
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Robin V. 2007-09-28 11:37:32 UTC
When running SS7 for the first time, the wizard asks for a SN account.

When the acount login email contain a '+' like in:
robinfake+squeezenetwork@gmail.com
I get the answer: Invalid SqueezeNetwork email address or password.

If I manually urlencode the '+' char:
robinfake%2Bsqueezenetwork@gmail.com
I get the awaited answer:  Connected successfully to SqueezeNetwork.

Screenshots attached.

A tcpdump reveals this (looks good but not urlencoded)
:
POST /settings/server/squeezenetwork.html HTTP/1.1
Host: 192.XXX.1.XXX:9000
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.7) Gecko/20070914 Firefox/2.0.0.7
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive
X-Requested-With: XMLHttpRequest
Content-Type: application/x-www-form-urlencoded
Referer: http://192.XXX.1.XXX:9000/settings/server/wizard.html
Content-Length: 84
Cookie: SlimServer-Browserpage=BROWSE_NEW_MUSIC; SlimServer-player=00%3A04%3A20%3AXXXXXXXXXXX; Fishbone-Style=null; SqueezeCenter-player=00%3A04%3A20%3AXXXXXXXXXX
Pragma: no-cache
Cache-Control: no-cache
sn_email=robinfake+squeezenetwork@gmail.com&sn_password=dontbekidding&saveSettings=1&AJAX=1HTTP/1.0 200 OK

Server: SqueezeCenter (7.0 - TRUNK)
Comment 1 Robin V. 2007-09-28 11:38:10 UTC
Created attachment 2183 [details]
+ badly sent
Comment 2 Robin V. 2007-09-28 11:40:10 UTC
Created attachment 2185 [details]
%2B correctly understood
Comment 3 Robin V. 2007-09-28 12:04:12 UTC
The problem might be the same when trying to connect to the MP3tunes Music Locker account. When I browse from the web interface:
Music On Demand -> MP3tunes Music Locker

The answer is:
There was an error loading the remote feed for MP3tunes Music Locker: (Invalid username or password)

And in the logs:
[20:57:18.7197] Slim::Networking::SqueezeNetwork::_error (260) Unable to login to SN: Invalid username or password
[20:57:18.7355] Slim::Utils::Strings::string (355) Error: missing string MOD
[20:57:18.7380] Slim::Utils::Strings::string (355) Backtrace:
   frame 0: Slim::Utils::Log::logBacktrace (/usr/local/squeezebox/SlimServer_v7-13333-20070928/Slim/Utils/Strings.pm line 355)

When switching directly to squeezenetwork, the MP3Tunes access is working
Comment 4 Michael Herger 2007-09-28 13:02:51 UTC
Change 13336 - URL encode data sent to the server. Please verify and close if fixed.
Comment 5 Robin V. 2007-09-28 13:10:16 UTC
i'll make an svn update tomorrow to be able to close several bugs in a row.
Comment 6 Robin V. 2007-09-28 13:16:51 UTC
I fear the problem will also appear in "settings page" and in fishbone skin as when opening in fishbone parameters my robinfake+squeezenetwork@gmail.com isn't "urldecoded" and appear as I entered it.

Have you corrected both skins, both wizards and settings page and both urlencoding and urldecoding?

I fear the JS only correction could be too short.
Comment 7 Michael Herger 2007-09-28 13:56:34 UTC
> I fear the problem will also appear in "settings page" and in fishbone skin as
> when opening in fishbone parameters my robinfake+squeezenetwork@gmail.com isn't
> "urldecoded" and appear as I entered it.

How did you enter it? If you entered it exactly like this, then what is wrong about it?
Comment 8 Robin V. 2007-09-28 14:29:28 UTC
In fact, manual urlencoding was a wrong idea. 

In the wizard:
entering login "robinfake+squeezenetwork@gmail.com" result in failed authentication and
entering login "robinfake%2Bsqueezenetwork@gmail.com" result in authentication success

But... when browsing MP3Tunes from SS, result in:
[23:23:06.1263] Slim::Networking::SqueezeNetwork::_error (260) Unable to login to SN: Invalid username or password

And this issue is resolved with switching back in the preferences to:
"robinfake+squeezenetwork@gmail.com"

So your JS correction should be enough...
Comment 9 Robin V. 2007-09-29 03:14:02 UTC
Ok, it seems to be working now. But I only replayed the wizard with my previous settings, it should be ok from scratch too.

The wizard says it can't connect to the internet after the language selection but I don't have proxy or anything (just nas/masquerading router). If you need to inquire on this, tell me.
Comment 10 Michael Herger 2007-09-30 02:42:25 UTC
Thanks for the feedback.

About the proxy setting: the test whether that page should be displayed is rather simple (connecting to www.squeezenetwork.com), and sometimes the timeout is a little short. Just ignore it.