If the credentials contains characters like a single quote ('), double quote (") or backslash (\) then they were quoted. I don't know why they are quoted (maybe a default behavior of Joomla), but to avoid login problems we have to unquote them. Here is my solution:
I edited comprofiler.php at line 1206+1207 and changed it to:
Thanks for sharing the fix.
Which exact Joomla version was this problem this with ?
I recall that we needed the escapings to avoid a vulnerability in an older version of Joomla.
Before applying that fix we will need review the use of those variable in each Joomla version.