|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2016-04-13 12:28 UTC] mike dot meierhuber at xoxy dot net
[2016-05-10 04:21 UTC] seander@php.net
-Status: Open
+Status: Assigned
-Assigned To:
+Assigned To: seander
[2016-05-10 04:23 UTC] seander@php.net
[2016-05-14 18:21 UTC] cweiske@php.net
[2016-05-16 06:14 UTC] seander@php.net
[2016-05-16 06:14 UTC] seander@php.net
-Status: Assigned
+Status: Closed
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Dec 14 19:00:01 2025 UTC |
Description: ------------ Sending an OAuth request to php-fpm 7.0.5 with oauth 2.0.1dev (git 5fb568c) on nginx 1.8.1 always fails with the following error: > oauth_problem=parameter_absent This happens although the HTTP_AUTHORIZATION $_SERVER variable contains the correct Authentication header line. Calling the test script with curl and some oauth headers yields a signature_invalid message if all works fine, and the described parameter_absent error on my nginx test host. Test script: --------------- <?php try { var_dump($_SERVER['HTTP_AUTHORIZATION']); $provider = new OAuthProvider(); $provider->isRequestTokenEndpoint(true); $provider->consumerHandler(function(){return OAUTH_OK;}); $provider->timestampNonceHandler(function(){return OAUTH_OK;}); $provider->checkOAuthRequest(); } catch (OAuthException $e) { header('HTTP/1.0 400 Bad Request'); echo OAuthProvider::reportProblem($e); exit(2); } Expected result: ---------------- $ curl -H 'Authorization: OAuth realm="test",oauth_consumer_key="test",oauth_nonce="test",oauth_signature="test",oauth_signature_method="HMAC-SHA1",oauth_timestamp="1",oauth_token="test",oauth_version="1.0"' http://localhost/server.php oauth_problem=signature_invalid&debug_sbs=GET&http%3A%2F%2Flocalhost%2Fserver.php&oauth_consumer_key%3Dtest%26oauth_nonce%3Dtest%26oauth_signature_method%3DHMAC-SHA1%26oauth_timestamp%3D1%26oauth_token%3Dtest%26oauth_version%3D1.0 Actual result: -------------- $ curl -H 'Authorization: OAuth realm="test",oauth_consumer_key="test",oauth_nonce="test",oauth_signature="test",oauth_signature_method="HMAC-SHA1",oauth_timestamp="1",oauth_token="test",oauth_version="1.0"' http://localhost:8080/server.php string(180) "OAuth realm="test",oauth_consumer_key="test",oauth_nonce="test",oauth_signature="test",oauth_signature_method="HMAC-SHA1",oauth_timestamp="1",oauth_token="test",oauth_version="1.0"" oauth_problem=parameter_absent&oauth_parameters_absent=oauth_consumer_key%26oauth_signature%26oauth_signature_method%26oauth_nonce%26oauth_timestamp