oauth2yii icon indicating copy to clipboard operation
oauth2yii copied to clipboard

Don't use php://input to read Post Data

Open dariozarro opened this issue 10 years ago • 5 comments

Since a stream opened with php://input can only be read once, you shouldn't directly use it. Now you are using it in \OAuth2\Request::getContent(), so, for instance, after the Yii::app()->oauth2->checkAccess(), it's not possible access to the posted data anymore (in some scenarios like content-type=application/json)

You should use the Yii::app()->getRequest()->getRawBody()

dariozarro avatar Oct 25 '13 13:10 dariozarro