Skip to content

By default, passwords can't be all numbers because of a weak type check in user.js #2324

@notbrain

Description

@notbrain

I would think a password that is all numbers would be a bit more secure than those that are of the well-known "letmein" or "password123" variety, especially if we enforce 8 digits.

Because of this line in user.js, passwords cannot be all numbers:

https://github.com/strongloop/loopback/blob/master/common/models/user.js#L610

This needs to be more intelligent and allow a full string of numbers for a password, or at the very least be highly publicized instead of buried inside the built-in code. As is, this is a bug that I had to go diving into the code to figure out why a bunch of our signups were being rejected for not having a password upon model creation, with no indication as to why the password was not making it all the way through to the database.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions