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

Cannot use query parameters #13

Open
guyv opened this issue Jan 8, 2015 · 0 comments
Open

Cannot use query parameters #13

guyv opened this issue Jan 8, 2015 · 0 comments

Comments

@guyv
Copy link

guyv commented Jan 8, 2015

If you pass in an authentication code via a query parameter, it will not be taken into account. The param function in the strategy class is too strict.

var param = function(name) {
var params = req.params || {};
var body = req.body || {};
var query = req.query || {};
if (null !== params[name] && params.hasOwnProperty(name)) return params[name];
if (null !== body[name]) return body[name];
if (null !== query[name]) return query[name];
return undefined;
};

If no body was sent, body[name] will be undefined: undefined !== null ==> undefined will be returned, and the query object will not be checked.

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

No branches or pull requests

1 participant