Open akhil1508 opened 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.
@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.
SIGCHLD
is unrelated; it happens on both succesful and unsuccessful loginsLoginProcess
matters but it seems to me like an issue with nextcloud integration in PageController
and not really a core snappymail issue as the login process code concludes successfully as tested by logging@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?
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
Describe the bug
I'm working on the OIDC login implementation for snappymail along with changes to https://github.com/pulsejet/nextcloud-oidc-login also
I hope to get PRs accepted soon at both places and make this work correctly so people can use SSO with this amazing webmail and nextcloud :)
Now problem is that an access token from SSO service(keycloak in my case) is 1630 or so characters long
When I pass it to
LoginProcess
using uncommented code from https://github.com/the-djmaze/snappymail/blob/cc360837b1df0382065ed78e2fb10335def2161c/integrations/nextcloud/snappymail/lib/Util/SnappyMailHelper.php#L151Along with a 502 bad gateway on screen
Now if I pass
1234
as the hard-coded string password, I can get it to work by adding access token via theimap.before-login
filter as in https://github.com/the-djmaze/snappymail/blob/4b63adb0d56080fd51c1006faa23fa0efc8d91c7/plugins/nextcloud/index.php#L99LoginProcess
is 1183 charactersbin2hex(random_bytes($len));
to get a string of size2*$len
I am completely out of my depth here in terms of why there is a
SIGCHLD
and would appreciate some help so I can progress on and complete development of this feature :) @the-djmaze