Check that data are not array before base64 decoding

[MAILPOET-3699]
This commit is contained in:
Jan Lysý
2021-08-16 14:57:25 +02:00
committed by Veljko V
parent d2570001db
commit 79a2d1f934
2 changed files with 3 additions and 1 deletions

View File

@@ -63,7 +63,7 @@ class Router {
}
public static function decodeRequestData($data) {
$data = json_decode(base64_decode($data), true);
$data = !is_array($data) ? json_decode(base64_decode($data), true) : [];
if (!is_array($data)) {
$data = [];
}