Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

oAuth reads php://input causing issues with reading PUT request body #123

Open
GoogleCodeExporter opened this issue Dec 16, 2015 · 0 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?

1. Use oAuth library in a server app

2. Make a PUT request to the server that contains a request body (for example a 
REST update request)

What is the expected output? What do you see instead?

oAuth works correctly, however the web app (server) now has no way to retrive 
the request body because php://input has already been read by oAuthRequest and 
oAuthRequestLogger.

Additionally OAuthRequestLogger probably doesn't log the request body correctly.

What version of the product are you using? On what operating system?

oAuth 175 on Linux/Apache

Please provide any additional information below.

http://php.net/manual/en/wrappers.php.php  (see note about reading the stream 
once)

A possible solution is to wrap php://input in such a way that the value is 
stored on read and only accessed through a public function that could be used 
internally by oAuth as well as by the server app itself.

Original issue reported on code.google.com by jasonmhi...@gmail.com on 19 Mar 2012 at 5:51

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant