1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/roundcube_ynh.git synced 2024-09-03 20:16:28 +02:00

Fix display of login page when logged on SSO (#112)

This commit is contained in:
Sébastien Mennetrier 2021-08-18 19:11:14 +02:00 committed by GitHub
parent 13d05463d9
commit 5ca27e561d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -0,0 +1,14 @@
diff -ruN roundcube.orig/index.php roundcube/index.php
--- roundcube.orig/index.php 2021-04-26 14:48:33.169655413 +0200
+++ roundcube/index.php 2021-04-26 14:54:07.594479133 +0200
@@ -210,6 +210,10 @@
if (!$RCMAIL->session->check_auth()) {
$RCMAIL->kill_session();
$session_error = 'sessionerror';
+ if (!empty($_SERVER['PHP_AUTH_USER'])) {
+ header('Location: https://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']);
+ exit;
+ }
}
}