Skip to content

Commit

Permalink
Only consider body attributes as parameters if Content-Type is applic…
Browse files Browse the repository at this point in the history
…ation/x-www-form-urlencoded

Fixes Issue #91.

We only consider body attributes as parameters if they're actually
parameters per http://tools.ietf.org/html/rfc5849#section-3.4.1.3.
  • Loading branch information
Evan Prodromou committed Mar 19, 2012
1 parent bef8708 commit a1905db
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/auth.strategies/oauth/_oauthservices.js
Expand Up @@ -27,7 +27,7 @@ function parseParameters( method, headers, query, body ) {
}

// POST variables
if( body ) {
if(body && headers['content-type'] === 'application/x-www-form-urlencoded') {
for(var key in body) {
result[key] = body[key];
}
Expand Down

0 comments on commit a1905db

Please sign in to comment.