mscdex / node-imap

An IMAP client module for node.js.
MIT License
2.17k stars 380 forks source link

Authentication problem #577

Closed j0k2r closed 8 years ago

j0k2r commented 8 years ago

Hi,

I think i found a problem in the authentication problem, it occur when the password contains the character "\":

{
    user: 'test@example.com',
    password: 'password\password',
    .......
}
Workaround (escape the "\" char)
{
    user: 'test@example.com',
    password: 'password\\password',
    .......
}
mscdex commented 8 years ago

This problem is not specific to this module, all JavaScript strings allow escape sequences. If the sequence is not known/valid (e.g. \p), it treats the following character as-is (removing the backslash in the process). However if you include a valid escape sequence like \t in a string such as 'toon\town', what you will instead end up with is something like 'toon own' (imagine the space is a tab character) (and not 'toontown').