Browse Source

fix json detection

main
ghost 9 months ago
parent
commit
d6eeaf6043
  1. 2
      src/Manticore.php

2
src/Manticore.php

@ -342,7 +342,7 @@ class Manticore
case is_string($value) && !preg_match('/\s/', $value) && base64_encode((string) base64_decode($value, true)) === $value: case is_string($value) && !preg_match('/\s/', $value) && base64_encode((string) base64_decode($value, true)) === $value:
return self::TYPE_BASE_64; return self::TYPE_BASE_64;
case is_string($value) && json_encode(json_decode($value)) === $value: case is_string($value) && !is_numeric($value) && json_encode(json_decode($value)) === $value:
return self::TYPE_JSON; return self::TYPE_JSON;
case is_string($value) && 1 === preg_match('/<\/[^>]+>/', $value): case is_string($value) && 1 === preg_match('/<\/[^>]+>/', $value):

Loading…
Cancel
Save