passwords

IE7 regex issue - Regex that work in every browser does not work in ie7

邮差的信 提交于 2020-01-11 09:17:06
问题 I have a regex validating a password value to be > 6 < 25 characters with at least one number. var passwordRegEx = /^(?=.*\d)(?=.*[a-zA-Z]).{6,25}$/; if(!#quickRegister_Password').val().test(pass)) { errorMgs += 'Your password must be at least 6 characters and have at least 1 number and 1 letter.\r\n'; } It works in Firefox, Chrome, IE8 (IE7 ran from compatability in IE8) but not IE7 standalone. 回答1: I think you have run into the regular expression lookahead bug in IE7's javascript engine.

Updating user with or without password - CakePHP

百般思念 提交于 2020-01-11 07:53:09
问题 I try to find a good and clean way to deal with an admin panel "edit user" in cakePHP v.2.7. To be clear : I want to be able to edit my user with or without overwriting their password, but the cakePHP validator tool don't let me do what I want... I've already take a look at CakePHP: Edit Users without changing password and Updating user email and password with CakePHP but it seem really dirty : the first one don't apply the rules onUpdate the second display the hash (just no... u_u") There is

Brute force script in Python 3.2

ぃ、小莉子 提交于 2020-01-10 15:29:10
问题 I'm a beginner in writing code and I've started with Python because it seemed the neatest and the easiest to start with (I currently have Python 3.2). Now I've read some online books and so on about coding in python, I've made some small programs and that's it. But then I wanted to make a program that could brute-force a random password like: PassWord = random.randint(0,9999) I made something that could try random passwords: import random PassWord = str(random.randint(0,9999)) Trial = ' '

Angular forms and password managers

泪湿孤枕 提交于 2020-01-10 04:38:26
问题 I use Angular forms to do signup & login on my frontend. It is a classic setup where the POST requests going out of the form are sent to a backend API. The POST requests are sent from the submit function that I register with (ngSubmit)=onSubmit() on the form element. I'd like password managers to play ball with this: save login/password on user creation, autofill on login, update on password change. Everthing works ok with Dashlane. But I recently tried Lastpass and it didn't catch the

How does password-based encryption technically work?

一笑奈何 提交于 2020-01-09 19:47:08
问题 Say I have some data and a password, and I want to encrypt the data in such a way that it can only be recovered with the right password. How does this technically work (i.e. how to implement this)? I often hear people use bitshifting for encryption, but how do you base that on a password? How does password-based encryption work? An example is Mac OS X FileVault Thanks. If you give sample code, preferably in C, Objective-C or pseudocode. 回答1: For (symmetric) encryption you need a secret key

How to test a regex password in Python?

醉酒当歌 提交于 2020-01-09 19:27:11
问题 Using a regex in Python, how can I verify that a user's password is: At least 8 characters Must be restricted to, though does not specifically require any of: uppercase letters: A-Z lowercase letters: a-z numbers: 0-9 any of the special characters: @#$%^&+= Note, all the letter/number/special chars are optional. I only want to verify that the password is at least 8 chars in length and is restricted to a letter/number/special char. It's up to the user to pick a stronger / weaker password if

[Sql-Server]what data type to use for password salt and hash values and what length?

二次信任 提交于 2020-01-09 19:07:28
问题 I am generating salt and hash values from my passwords by using, string salt = CreateSalt(TxtPassword.Text.Length); string hash = CreatePasswordHash(TxtPassword.Text, salt); private static string CreateSalt(int size) { //Generate a cryptographic random number. RNGCryptoServiceProvider rng = new RNGCryptoServiceProvider(); byte[] buff = new byte[size]; rng.GetBytes(buff); // Return a Base64 string representation of the random number. return Convert.ToBase64String(buff); } private static string

[Sql-Server]what data type to use for password salt and hash values and what length?

拜拜、爱过 提交于 2020-01-09 19:07:16
问题 I am generating salt and hash values from my passwords by using, string salt = CreateSalt(TxtPassword.Text.Length); string hash = CreatePasswordHash(TxtPassword.Text, salt); private static string CreateSalt(int size) { //Generate a cryptographic random number. RNGCryptoServiceProvider rng = new RNGCryptoServiceProvider(); byte[] buff = new byte[size]; rng.GetBytes(buff); // Return a Base64 string representation of the random number. return Convert.ToBase64String(buff); } private static string

Regex (regular expression) for password validation

余生颓废 提交于 2020-01-09 11:25:10
问题 What would be the correct regex , to satisfy the following password criteria: Must include at least 1 lower-case letter. Must include at least 1 upper-case letter. Must include at least 1 number. Must include at least 1 special character (only the following special characters are allowed: !#% ). Must NOT include any other characters then A-Za-z0-9!#% (must not include ; for example). Must be from 8 to 32 characters long. This is what i tried, but it doesn't work: ^(?=.*?[a-z])(?=.*?[A-Z])(?=.

Cross-browser techniques for disabling password caching

五迷三道 提交于 2020-01-09 07:16:25
问题 Saving and auto-filing of username/password is a feature of most modern browsers. And the user can generally choose to disable this feature on a per domain basis. But is there a standard way for the site itself to prevent password caching? The emphasis here is cross-browser, so I would employ multiple parallel mechanisms if necessary. (I have seen caching be effectively disabled in the presence of non-standard login fields, eg, an extra hidden password field. But I'd rather not depend on side