From eb29d689587682746494866ec4c1f559da6415f8 Mon Sep 17 00:00:00 2001 From: Andy Miller Date: Thu, 7 Jan 2016 14:10:58 -0700 Subject: [PATCH] Safety check for array of nonces --- system/src/Grav/Common/Utils.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/system/src/Grav/Common/Utils.php b/system/src/Grav/Common/Utils.php index 0efa1ba5f0..a8eacdeae3 100644 --- a/system/src/Grav/Common/Utils.php +++ b/system/src/Grav/Common/Utils.php @@ -560,6 +560,11 @@ public static function getNonceOldStyle($action, $plusOneTick = false) */ public static function verifyNonce($nonce, $action) { + //Safety check for multiple nonces + if (is_array($nonce)) { + $nonce = array_shift($nonce); + } + //Nonce generated 0-12 hours ago if ($nonce == self::getNonce($action)) { return true;