mirror of
https://github.com/kvazar-network/index-php.git
synced 2025-01-22 12:54:15 +00:00
fix base64 detection
This commit is contained in:
parent
d6eeaf6043
commit
b9a814e4f2
@ -339,7 +339,7 @@ class Manticore
|
|||||||
case is_string($value) && false === mb_detect_encoding($value, null, true):
|
case is_string($value) && false === mb_detect_encoding($value, null, true):
|
||||||
return self::TYPE_BIN;
|
return self::TYPE_BIN;
|
||||||
|
|
||||||
case is_string($value) && !preg_match('/\s/', $value) && base64_encode((string) base64_decode($value, true)) === $value:
|
case is_string($value) && base64_encode((string) base64_decode($value, true)) === $value:
|
||||||
return self::TYPE_BASE_64;
|
return self::TYPE_BASE_64;
|
||||||
|
|
||||||
case is_string($value) && !is_numeric($value) && json_encode(json_decode($value)) === $value:
|
case is_string($value) && !is_numeric($value) && json_encode(json_decode($value)) === $value:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user