This repository was archived by the owner on Nov 8, 2017. It is now read-only.
Only positive maxLength should truncate passwords#30
Open
stephenemslie wants to merge 1 commit intokeithamus:masterfrom
Open
Only positive maxLength should truncate passwords#30stephenemslie wants to merge 1 commit intokeithamus:masterfrom
stephenemslie wants to merge 1 commit intokeithamus:masterfrom
Conversation
This allows us to handle negative maxLength in password inputs. Specifying a negative maxLength results in the default behavior, which is to allow an unlimited number of characters[1]. By limiting maxLength to a minimum of 0, the entire password is used for values of maxLength less than or equal to 0, while values above 0 use the first maxLength characters of the password. [1] https://developer.mozilla.org/en/docs/Web/HTML/Element/input
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This allows handles negative maxLength in password inputs.
Currently inputs with a negative
maxLengthwill have it's value set to an empty string.Specifying a negative maxLength should result in the default behavior, which is to allow an unlimited number of characters, the full password in other words.
By limiting
maxLengthto a minimum of 0, the entire password will be used for values ofmaxLengthless than or equal to 0, while values above 0 use the firstmaxLengthcharacters of the password.