mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-02-20 12:22:10 +01:00
Handle multi-line error messages gracefully
This commit is contained in:
parent
9f3e658b1c
commit
9590be51b7
@ -1507,7 +1507,8 @@ function egw_exception_handler(Exception $e)
|
||||
// exception handler sending message back to the client as basic auth message
|
||||
elseif($GLOBALS['egw_info']['flags']['no_exception_handler'] == 'basic_auth')
|
||||
{
|
||||
header('WWW-Authenticate: Basic realm="'.$headline.' '.$e->getMessage().'"');
|
||||
$error = str_replace(array("\r", "\n"), array('', ' | '), $e->getMessage());
|
||||
header('WWW-Authenticate: Basic realm="'.$headline.' '.$error.'"');
|
||||
header('HTTP/1.1 401 Unauthorized');
|
||||
header('X-WebDAV-Status: 401 Unauthorized', true);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user