mirror of
https://gitlab.com/davical-project/davical.git
synced 2026-01-27 00:33:34 +00:00
Lowercase string when comparing HTTP header for debug output
HTTP/2 requests to Davical with debug mode result in logged Authorization header as the comparison is currently case sensitive https://datatracker.ietf.org/doc/rfc9113/ > 8.2. HTTP Fields > Field names MUST be converted to lowercase when constructing an HTTP/2 message.
This commit is contained in:
parent
4d06333f7e
commit
a2a9a57fdd
@ -28,7 +28,7 @@ function logRequestHeaders() {
|
||||
dbg_error_log( "LOG ", "***************** Request Header ****************" );
|
||||
dbg_error_log( "LOG ", "%s %s", $_SERVER['REQUEST_METHOD'], $_SERVER['REQUEST_URI'] );
|
||||
foreach( $lines AS $k => $v ) {
|
||||
if ( $k != 'Authorization' || (isset($c->dbg['password']) && $c->dbg['password'] ) )
|
||||
if ( strtolower($k) != 'authorization' || (isset($c->dbg['password']) && $c->dbg['password'] ) )
|
||||
dbg_error_log( "LOG headers", "-->%s: %s", $k, $v );
|
||||
else
|
||||
dbg_error_log( "LOG headers", "-->%s: %s", $k, 'Delicious tasty password eaten by debugging monster!' );
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user