From 0c471e9d1973be6f25c78b5cd2912d6aeca47389 Mon Sep 17 00:00:00 2001 From: McCaulay Hudson Date: Tue, 24 Nov 2020 11:35:19 +0000 Subject: [PATCH] Fix string offset access syntax --- src/MaxCDN/OAuth/OAuthSignatureMethod.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/MaxCDN/OAuth/OAuthSignatureMethod.php b/src/MaxCDN/OAuth/OAuthSignatureMethod.php index da905ff..d6bea7b 100644 --- a/src/MaxCDN/OAuth/OAuthSignatureMethod.php +++ b/src/MaxCDN/OAuth/OAuthSignatureMethod.php @@ -47,7 +47,7 @@ public function check_signature($request, $consumer, $token, $signature) { // Avoid a timing leak with a (hopefully) time insensitive compare $result = 0; for ($i = 0; $i < strlen($signature); $i++) { - $result |= ord($built{$i}) ^ ord($signature{$i}); + $result |= ord($built[$i]) ^ ord($signature[$i]); } return $result == 0;