diff --git a/CHANGELOG.md b/CHANGELOG.md index 36a9695cc..fdbd2c9e6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -31,6 +31,7 @@ * Fix for markdown attributes on external URLs * Fixed issue where `data:` page header was acting as `publish_date:` * Fix for special characters in URL parameters (e.g. /tag:c++) #541 + * Safety check for an array of nonces to only use the first one # v1.0.6 ## 12/22/2015 diff --git a/system/src/Grav/Common/Utils.php b/system/src/Grav/Common/Utils.php index 0efa1ba5f..a8eacdeae 100644 --- a/system/src/Grav/Common/Utils.php +++ b/system/src/Grav/Common/Utils.php @@ -560,6 +560,11 @@ abstract class Utils */ 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;