the-djmaze / snappymail

Simple, modern & fast web-based email client
https://snappymail.eu
GNU Affero General Public License v3.0
930 stars 110 forks source link

LoginProcess doesn't work with a password of length greater than 1183 characters in length #1569

Open akhil1508 opened 2 months ago

akhil1508 commented 2 months ago

Describe the bug

the-djmaze commented 2 months ago

SIGCHLD is an async report handler, although it seems to happen after PLUGIN[INFO]: Hook: filter.language this could be not true. So it would be hard to find where the SIGCHLD is coming from.

I made a small change to also write the siginfo_t structure to the log, it might help.

akhil1508 commented 2 months ago

@the-djmaze thanks, i will retest after your change and check logs. But yes, it's not a filter.language issue, I did comment that out to rule out.

I shall also check with PLAIN login whether the issue is about string length entirely, that should confirm it.

akhil1508 commented 2 months ago

@the-djmaze My plan is to just proceed with $pwd = new SensitiveString(''); and LoginProcess($username, $pwd); and then overwrite the passphrase with the access token from session in imap.before-login, smtp.before-login and sieve.before-login filters. Is there any issue you see with this or is it safe to do so?

the-djmaze commented 2 months ago

It's fine to do so. I use the same with GMail OAuth2 https://github.com/the-djmaze/snappymail/blob/master/plugins/login-gmail/index.php