This commit is contained in:
the-djmaze 2023-11-14 11:14:40 +01:00
parent 09e3c7bec6
commit 9bb2399e47
2 changed files with 2 additions and 2 deletions

View file

@ -300,7 +300,7 @@ abstract class AbstractConfig implements \ArrayAccess, \JsonSerializable
break;
case 'string':
default:
$sValue = '"'.\str_replace('"', '\\"', $mParamValue[0]).'"';
$sValue = '"'.\addcslashes($mParamValue[0], '\\"').'"';
break;
}

View file

@ -126,7 +126,7 @@ class Socket extends \SnappyMail\HTTP\Request
$digest = \md5($a1 . ':' . $challenge['nonce'] . ':' . $nc . ':' . $challenge['cnonce'] . ':auth:' . $a2);
}
$extra_headers['Authorization'] = "Authorization: Digest "
. ' username="' . \str_replace(array('\\', '"'), array('\\\\', '\\"'), $this->auth['user']) . '",'
. ' username="' . \addcslashes($this->auth['user'], '\\"') . '",'
. ' realm="' . $challenge['realm'] . '",'
. ' nonce="' . $challenge['nonce'] . '",'
. ' uri="' . $request_url . '",'