node-imap icon indicating copy to clipboard operation
node-imap copied to clipboard

Fix for values that may be understood as "numeric", i.e. has no .toLowerCase()

Open BlaM opened this issue 10 years ago • 4 comments

Did not dig into the code - so I'm not absolutely sure what this function does, but: The script crashed here for me for a key named "4826". Does not crash anymore when I make sure that we have a string.

BlaM avatar Jul 11 '14 15:07 BlaM

Why is there a numeric value as a key? It doesn't seem like that is legit. Can you enable debugging with debug: console.log to show the line the parser is choking on?

mscdex avatar Jul 11 '14 16:07 mscdex

As mentioned I did not really dig into the function. All I saw was that it was dying in that line and that it had a numeric value. What is it supposed to do? Where is the data coming from?

It looked like a lot of single words that come from the mail body.

I can add the console.log again, but I doubt that I will immediately find another mail that will trigger the problem.

Will probably take half a week though until I can get back to it.

I was doing a search() and then feeding the result to fetch just like in the example (even with gmail, too) and the error occured on a twitter mail.

BlaM avatar Jul 11 '14 20:07 BlaM

What version of node-imap are you using?

mscdex avatar Jul 11 '14 20:07 mscdex

I used the latest version I got from npm: 0.8.12 https://www.npmjs.org/package/imap

Will have a chance to work with the code today. I'll try to reproduce the problem.

BlaM avatar Jul 15 '14 05:07 BlaM