From cb9a9ebb8a76b85d6d7cb4bc28bcdb54e0f399ea Mon Sep 17 00:00:00 2001 From: Lykin <137850705+tiny-craft@users.noreply.github.com> Date: Thu, 22 Feb 2024 00:22:29 +0800 Subject: [PATCH] fix: slashes should not be escaped in PHP decoder --- backend/utils/convert/php_convert.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/utils/convert/php_convert.go b/backend/utils/convert/php_convert.go index 2e74359..b546d1d 100644 --- a/backend/utils/convert/php_convert.go +++ b/backend/utils/convert/php_convert.go @@ -15,7 +15,7 @@ if ($action === 'decode') { if ($decoded !== false) { $obj = unserialize($decoded); if ($obj !== false) { - $unserialized = json_encode($obj, JSON_UNESCAPED_UNICODE); + $unserialized = json_encode($obj, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES); if ($unserialized !== false) { echo base64_encode($unserialized); return;