From 84c78098d27de624319df37ffb1a522318ec6778 Mon Sep 17 00:00:00 2001 From: Kevin Papst Date: Sun, 10 Dec 2017 11:31:19 +0100 Subject: added new extension hook using hook for reading modes in navigation --- lib/Minz/ExtensionManager.php | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib') diff --git a/lib/Minz/ExtensionManager.php b/lib/Minz/ExtensionManager.php index c5c68a8d4..68bdc463c 100644 --- a/lib/Minz/ExtensionManager.php +++ b/lib/Minz/ExtensionManager.php @@ -31,6 +31,10 @@ class Minz_ExtensionManager { 'list' => array(), 'signature' => 'NoneToNone', ), + 'nav_reading_modes' => array( // function($readingModes = array) -> array | null + 'list' => array(), + 'signature' => 'OneToOne', + ), ); private static $ext_to_hooks = array(); -- cgit v1.2.3 From dfc638dd9856e5507e482583c4e7339fcd2bb915 Mon Sep 17 00:00:00 2001 From: Nico B Date: Mon, 22 Jan 2018 15:12:44 +0100 Subject: [fix] Login: HTTP Auth when internal redirects occur (#1772) When Apache performs an internal redirect, it stores the username in the REDIRECT_REMOTE_USER variable instead of REMOTE_USER, breaking HTTP authentication. For more information, see this Stack Overflow discussion: This commit first tries REMOTE_USER, as before. If it is not set, it checks whether REDIRECT_REMOTE_USER is set. --- lib/lib_rss.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/lib_rss.php b/lib/lib_rss.php index e9c4da049..215c4c362 100644 --- a/lib/lib_rss.php +++ b/lib/lib_rss.php @@ -364,7 +364,15 @@ function get_user_configuration($username) { function httpAuthUser() { - return isset($_SERVER['REMOTE_USER']) ? $_SERVER['REMOTE_USER'] : ''; + if (isset($_SERVER['REMOTE_USER'])) { + return $_SERVER['REMOTE_USER']; + } + + if (isset($_SERVER['REDIRECT_REMOTE_USER'])) { + return $_SERVER['REDIRECT_REMOTE_USER']; + } + + return ''; } function cryptAvailable() { -- cgit v1.2.3