Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Well that. At the admin page, after I have enabled the api keys, when've trying any service it have always failed.
This was because when generating the hash of the form, the hash_hmac's data parameter wasn't built using ";".
Attached is the diff patch.
Cheers!
@@ -126,7 +126,7 @@
switch ($arg['#name']) {
case 'hash':
- $form['arg'][$key] = array('#title' => 'Hash', '#type' => 'textfield', '#default_value' => hash_hmac("sha256", $timestamp . $_SERVER['HTTP_HOST'] . $nonce . arg(4), services_admin_browse_get_first_key()));
+ $form['arg'][$key] = array('#title' => 'Hash', '#type' => 'textfield', '#default_value' => hash_hmac("sha256", $timestamp .';'. $_SERVER['HTTP_HOST'] .';'. $nonce .';'. arg(4), services_admin_browse_get_first_key()));
break;
case 'sessid':
Comment | File | Size | Author |
---|---|---|---|
services_admin_browse.inc_.diff | 816 bytes | brutuscat | |
Comments
Comment #1
marcingy CreditAttribution: marcingy commentedComment #2
kylebrowning CreditAttribution: kylebrowning commentedThis has been fixed in 6.x-2.x-dev