mirror of
https://gitlab.com/davical-project/davical.git
synced 2026-08-31 18:46:02 +00:00
Let auth realm be 'per Principal' to work around Mozilla #247486
Signed-off-by: Andrew McMillan <andrew@morphoss.com>
This commit is contained in:
parent
7c0d2792f3
commit
5c0dd64d68
@ -66,6 +66,13 @@ class HTTPAuthSession {
|
||||
function AuthFailedResponse( $auth_header = "" ) {
|
||||
global $c;
|
||||
if ( $auth_header == "" ) {
|
||||
$auth_realm = $c->system_name;
|
||||
if ( isset($c->per_principal_realm) ) {
|
||||
$principal_name = preg_replace( '{^/(.*?)/.*$}', '$1', $_SERVER["PATH_INFO"]);
|
||||
if ( $principal_name != $_SERVER["PATH_INFO"] ) {
|
||||
$auth_realm .= ' - ' . $principal_name;
|
||||
}
|
||||
}
|
||||
$auth_header = sprintf( 'WWW-Authenticate: Basic realm="%s"', $c->system_name);
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user