From 5ca27e561d0a10e8a73bccdda01a4c36eb68392d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Mennetrier?= Date: Wed, 18 Aug 2021 19:11:14 +0200 Subject: [PATCH] Fix display of login page when logged on SSO (#112) --- .../patches/app-fix-login-page-when-ssoed.patch | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 sources/patches/app-fix-login-page-when-ssoed.patch diff --git a/sources/patches/app-fix-login-page-when-ssoed.patch b/sources/patches/app-fix-login-page-when-ssoed.patch new file mode 100644 index 0000000..f5c38a9 --- /dev/null +++ b/sources/patches/app-fix-login-page-when-ssoed.patch @@ -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; ++ } + } + } +