Skip to content

Commit 8f8106a

Browse files
committed
Do non strict php unserialization
1 parent 07ad307 commit 8f8106a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

redisinsight/ui/src/utils/formatters/valueFormatters.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ const formattingBuffer = (
8181
}
8282
case KeyValueFormat.PHP: {
8383
try {
84-
const decoded = unserialize(Buffer.from(reply.data), { encoding: 'binary' })
84+
const decoded = unserialize(Buffer.from(reply.data), {}, { strict: false, encoding: 'binary' })
8585
const value = JSONBigInt.stringify(decoded)
8686
return JSONViewer({ value, ...props })
8787
} catch (e) {
@@ -148,7 +148,7 @@ const bufferToSerializedFormat = (
148148
}
149149
case KeyValueFormat.PHP: {
150150
try {
151-
const decoded = unserialize(Buffer.from(value.data), { encoding: 'binary' })
151+
const decoded = unserialize(Buffer.from(value.data), {}, { strict: false, encoding: 'binary' })
152152
const stringified = JSON.stringify(decoded)
153153
return reSerializeJSON(stringified, space)
154154
} catch (e) {

0 commit comments

Comments
 (0)