Skip to content

Commit

Permalink
Merge pull request #26132 from hedii/5.6
Browse files Browse the repository at this point in the history
[5.6] hash_equals(): Expected user_string to be a string, null given
  • Loading branch information
GrahamCampbell authored Oct 15, 2018
2 parents 7939094 + d32eae2 commit 372dcf3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Illuminate/Routing/UrlGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ public function hasValidSignature(Request $request)

$signature = hash_hmac('sha256', $original, call_user_func($this->keyResolver));

return hash_equals($signature, $request->query('signature', '')) &&
return hash_equals($signature, (string) $request->query('signature', '')) &&
! ($expires && Carbon::now()->getTimestamp() > $expires);
}

Expand Down

0 comments on commit 372dcf3

Please sign in to comment.