activator icon indicating copy to clipboard operation
activator copied to clipboard

Passwordreset using req.param which is deprecated

Open milanvdm opened this issue 9 years ago • 3 comments

Im trying to use the passwordreset but the user keeps on being undefined.

Error log: Wed, 06 May 2015 02:42:54 GMT express deprecated req.param(name): Use req.params, req.body, or req.query instead at routes/account.api.js:351:18 source: http://expressjs.com/api.html#app.param

This results in activator calling the usermodel with a username undefined. And therefore, the whole passwordreset system is not working.

milanvdm avatar May 06 '15 02:05 milanvdm

Are you using the latest version 1.0.0 or higher? We have a req.param() wrapper so it never actually calls the express deprecated req.param().

deitch avatar May 06 '15 09:05 deitch

I'm using activator 1.0.0. I'm simply calling the app.post("/api/passwordreset", activator.createPasswordReset); using the package request with http://pastebin.com/S0WX6Kct

This results in the login variable to be undefined at: http://pastebin.com/83HBVuSD

milanvdm avatar May 06 '15 09:05 milanvdm

Can you step through it using debug? When it calls createPasswordReset, it should be in L184 of activator.js. L185 then attaches the req.param() override using param(req), which just includes params.js, which never should use the express req.param().

See if it is calling those? I cannot replicate.

deitch avatar May 06 '15 09:05 deitch