You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
I upgraded from v2.35, and now login-remote no longer works. It will redirect back to the login page instead of logging in. If the custom login URL is set to /?RemoteAutoLogin, you will enter an endless loop. I made no changes to the config, merely upgraded.
Disabling the plugin and removing the login redirect allows me to log in manually.
Looks like at some point the login mechanism was updated to use the SecureString class, and the plugin was not. This also affects the login-cpanel plugin, and maybe other plugins, since they also do not use SecureString.
I was able to fix this by wrapping $sPassword in new \SnappyMail\SensitiveString().
To Reproduce
Steps to reproduce the behavior:
Set up a proxy in front of Snappymail or use a browser that can add headers
Send REMOTE_USER and REMOTE_PASSWORD in request to /?RemoveAutoLogin
Get redirected back to / with login cookies set
Doesn't work, asks you to log in again
Expected behavior
It works
Please complete the following information:
Browser: Firefox 132.0-1
IMAP daemon: dovecot
PHP version: 8.3.14
SnappyMail Version: 2.38.2
Mode: standalone
Debug/logging information
I've placed them here (few lines) or as attachments (many lines)
[2024-12-18 18:48:36.051][b72e10fe] [NOTICE]: TypeError: RainLoop\Actions::LoginProcess(): Argument #2 ($oPassword) must be of type SnappyMail\SensitiveString, string given, called in /srv/www/snappymail/data/_data_/_default_/plugins/login-remote/index.php on line 46 and defined in /srv/www/snappymail/snappymail/v/2.38.2/app/libraries/RainLoop/Actions/UserAuth.php:142
Stack trace:
#0 /srv/www/snappymail/data/_data_/_default_/plugins/login-remote/index.php(46): RainLoop\Actions->LoginProcess()
#1 /srv/www/snappymail/snappymail/v/2.38.2/app/libraries/RainLoop/Plugins/Manager.php(371): LoginRemotePlugin->ServiceRemoteAutoLogin()
#2 /srv/www/snappymail/snappymail/v/2.38.2/app/libraries/RainLoop/Service.php(133): RainLoop\Plugins\Manager->RunAdditionalPart()
#3 /srv/www/snappymail/snappymail/v/2.38.2/app/libraries/RainLoop/Service.php(14): RainLoop\Service::RunResult()
#4 /srv/www/snappymail/snappymail/v/2.38.2/include.php(137): RainLoop\Service::Handle()
#5 /srv/www/snappymail/index.php(11): include('...')
#6 {main}
Additional context
I set up a new instance with new configuration and it still happens after reinstalling the plugin.
The text was updated successfully, but these errors were encountered:
sevmonster
changed the title
RemoteAuthLogin no longer works
RemoteAuthLogin and other auth plugins no longer work
Dec 19, 2024
Describe the bug
I upgraded from v2.35, and now
login-remote
no longer works. It will redirect back to the login page instead of logging in. If the custom login URL is set to/?RemoteAutoLogin
, you will enter an endless loop. I made no changes to the config, merely upgraded.Disabling the plugin and removing the login redirect allows me to log in manually.
Looks like at some point the login mechanism was updated to use the
SecureString
class, and the plugin was not. This also affects thelogin-cpanel
plugin, and maybe other plugins, since they also do not useSecureString
.I was able to fix this by wrapping
$sPassword
innew \SnappyMail\SensitiveString()
.To Reproduce
Steps to reproduce the behavior:
REMOTE_USER
andREMOTE_PASSWORD
in request to/?RemoveAutoLogin
/
with login cookies setExpected behavior
It works
Please complete the following information:
Debug/logging information
Additional context
I set up a new instance with new configuration and it still happens after reinstalling the plugin.
The text was updated successfully, but these errors were encountered: