We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 409df40 commit 7a6b629Copy full SHA for 7a6b629
program/lib/Roundcube/rcube_utils.php
@@ -724,7 +724,14 @@ public static function file2class($mimetype, $filename)
724
public static function xss_entity_decode($content)
725
{
726
$callback = static function ($matches) {
727
- return chr(hexdec($matches[1]));
+ $bytevalue = hexdec((string) $matches[1]);
728
+ // chr() only covers values between 0 and 255. The following 4 lines are from the former default behaviour
729
+ // to ensure that, which is now deprecated, so we now explicitly do the shifting here.
730
+ while ($bytevalue < 0) {
731
+ $bytevalue += 256;
732
+ }
733
+ $bytevalue %= 256;
734
+ return chr($bytevalue);
735
};
736
737
$out = html_entity_decode(html_entity_decode($content));
0 commit comments