Description
Issue Description
I have a Parse Server deployed to Heroku that is utilizing the password validation introduced to parse server. I've added the code, without changing it, and got it to work part way. When I enter an invalid password, say BadPassword
, it does its job and returns an error with the correct message. When I enter a valid password that fits within the requirements of the default validator pattern, the server crashes? See the logs below for a better look.
Steps to reproduce
- Deploy Parse Server Example to Heroku
- Setup to use password validation using the default pattern provided in the master repository
- Attempt to register with invalid password, returns an error successfully
- Attempt to register with valid password, crashes app
Expected Results
Successfully return an error for invalid passwords and allow registration for valid passwords
Actual Outcome
Explained in the issue description and logs very clearly
Environment Setup
-
Server
- parse-server version: 2.4.2
- Operating System: Ubuntu 16.04
- Hardware: Not Sure
- Localhost or remote server: Heroku
-
Database
- MongoDB version: 3.2.x
- Storage engine: mLab default (WiredTiger?)
- Hardware: mLab Sandbox
- Localhost or remote server: mLab
Logs/Trace
Here I try to use a password that does not fit the requirements in the validator pattern. It successfully returns the correct error 👍
Then, when I try to register with a password that does fit the requirements, the application crashes with ReferenceError: validatePassword is not defined
👎