Skip to content

Password validation crashing Parse Server #3921

Closed
@ZacharyKhan

Description

@ZacharyKhan

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

  1. Deploy Parse Server Example to Heroku
  2. Setup to use password validation using the default pattern provided in the master repository
  3. Attempt to register with invalid password, returns an error successfully
  4. 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 👍

screen shot 2017-06-10 at 4 09 40 am

Then, when I try to register with a password that does fit the requirements, the application crashes with ReferenceError: validatePassword is not defined 👎

screen shot 2017-06-10 at 4 11 49 am

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions