Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F2680749
D25807.1734621275.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Advanced/Developer...
View Handle
View Hovercard
Size
738 B
Referenced Files
None
Subscribers
None
D25807.1734621275.diff
View Options
diff --git a/src/parser/PhutilJSON.php b/src/parser/PhutilJSON.php
--- a/src/parser/PhutilJSON.php
+++ b/src/parser/PhutilJSON.php
@@ -131,7 +131,8 @@
return $this->encodeFormattedObject($value, $depth);
} else {
if (defined('JSON_UNESCAPED_SLASHES')) {
- // If we have a new enough version of PHP, disable escaping of slashes
+ // If we have PHP >= 5.4.0 && the JSON extension is installed (as of
+ // PHP 8.0.0, it is a core PHP extension), disable escaping of slashes
// when pretty-printing values. Escaping slashes can defuse an attack
// where the attacker embeds "</script>" inside a JSON string, but that
// isn't relevant when rendering JSON for human viewers.
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Dec 19, 15:14 (2 h, 7 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1015121
Default Alt Text
D25807.1734621275.diff (738 B)
Attached To
Mode
D25807: Clarify comment in PhutilJSON about required PHP version
Attached
Detach File
Event Timeline
Log In to Comment