summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlsces <lester@lsces.co.uk>2026-03-27 09:52:45 +0000
committerlsces <lester@lsces.co.uk>2026-03-27 09:52:45 +0000
commit12c7af8b9349a3ecf93d96d22c986519d41b9482 (patch)
tree6e200325446dccdc42bc30d753425bbb68f26773
parente91b967e5d53eedf6ac3771e66d4db7f1e7724be (diff)
downloadusers-12c7af8b9349a3ecf93d96d22c986519d41b9482.tar.gz
users-12c7af8b9349a3ecf93d96d22c986519d41b9482.tar.bz2
users-12c7af8b9349a3ecf93d96d22c986519d41b9482.zip
PHP8.4 style tweaks
-rw-r--r--hauth/Hybrid/thirdparty/OAuth/OAuth.php8
1 files changed, 1 insertions, 7 deletions
diff --git a/hauth/Hybrid/thirdparty/OAuth/OAuth.php b/hauth/Hybrid/thirdparty/OAuth/OAuth.php
index e09d77c..a8d8934 100644
--- a/hauth/Hybrid/thirdparty/OAuth/OAuth.php
+++ b/hauth/Hybrid/thirdparty/OAuth/OAuth.php
@@ -103,7 +103,7 @@ abstract class OAuthSignatureMethod {
// 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;
@@ -211,9 +211,6 @@ abstract class OAuthSignatureMethod_RSA_SHA1 extends OAuthSignatureMethod {
// Sign using the key
$ok = openssl_sign($base_string, $signature, $privatekeyid);
- // Release the key resource
- openssl_free_key($privatekeyid);
-
return base64_encode($signature);
}
@@ -231,9 +228,6 @@ abstract class OAuthSignatureMethod_RSA_SHA1 extends OAuthSignatureMethod {
// Check the computed signature against the one passed in the query
$ok = openssl_verify($base_string, $decoded_sig, $publickeyid);
- // Release the key resource
- openssl_free_key($publickeyid);
-
return $ok == 1;
}
}