Skip to content

Commit

Permalink
Merge branch 'release/1.0.7'
Browse files Browse the repository at this point in the history
  • Loading branch information
rhukster committed Jan 7, 2016
2 parents 4549574 + eff72b7 commit 8ca14c7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 5 additions & 0 deletions system/src/Grav/Common/Utils.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 8ca14c7

Please sign in to comment.