Skip to content

Attach mask plugin to a password field instead of a text field #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

gsmendoza
Copy link

Hi @coderguy,

Thanks for the plugin! This was the only "showpassword" plugin I found which can use a jquery element as a toggler. I needed this feature because we have two password forms in our page, and I wanted the togglers to act independently:

$(".js-toggleable-password").each(function(index, element){
  $(element).mask(toggle: $(element).next('js-password-toggler'));
});

I modified the plugin so that it attaches the unmasked text field to a password field, and not the other way around. I found that submitting a password through a text field can be insecure. For example, it's possible for the submitted password to appear in the html if the password field's form is sent back to the user for changes.

I don't know if you need this change, but here it is, with tests and all.

Thanks,

George

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant