Skip to content
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

Generate password complexity setting #15491

Open
lukaslau opened this issue Oct 5, 2019 · 22 comments · Fixed by #15535
Open

Generate password complexity setting #15491

lukaslau opened this issue Oct 5, 2019 · 22 comments · Fixed by #15535
Labels
enhancement A feature request for improving phpMyAdmin
Milestone

Comments

@lukaslau
Copy link

lukaslau commented Oct 5, 2019

Hello,

I always encounter problem when mysql server is set to medium password level it requires special character in passwords when creating user.

When you use generate password function it doesn't have any of special chars so you always get an error from mysql for incorrect password.

Solution was simple: add special chars to function suggestPassword in functions.js file, no commas, no dots, no quotes, just these special chars !@#$%^&*()

How about making a setting in phpmyadmin to let people choose password complexity without having to modify js files? :)

@williamdes williamdes added the enhancement A feature request for improving phpMyAdmin label Oct 5, 2019
@OlafvdSpek
Copy link

Can't MySQL be fixed to not require special chars per se? ;)

@lukaslau
Copy link
Author

Can't MySQL be fixed to not require special chars per se? ;)

Do you think that lowering security level for passwords is a good way to solve the problem? :)

@OlafvdSpek
Copy link

Who's talking about lowering security levels?

Each 'security level' can be reached without special characters, simply by increasing the password length.

@lukaslau
Copy link
Author

Who's talking about lowering security levels?

Each 'security level' can be reached without special characters, simply by increasing the password length.

Personally I don't see any reasons why it can't be added.

@Tithugues
Copy link
Contributor

Just a note, but it might be interesting to generate a password regarding the MySQL configuration : https://dev.mysql.com/doc/refman/5.7/en/validate-password-options-variables.html#sysvar_validate_password_policy

@Tithugues
Copy link
Contributor

Who's talking about lowering security levels?
Each 'security level' can be reached without special characters, simply by increasing the password length.

Personally I don't see any reasons why it can't be added.

In the code, there is one reason:

restrict the password to just letters and numbers to avoid problems:
"editors and viewers regard the password as multiple words and
things like double click no longer work"

In my opinion, this is not a good reason…

@williamdes williamdes added the has-pr An issue that has a pull request pending that may fix this issue. The pull request may be incomplete label Oct 28, 2019
MauricioFauth added a commit that referenced this issue Nov 1, 2019
…-suggested-passwords

fix #15491 Generate password complexity setting
@MauricioFauth MauricioFauth self-assigned this Nov 1, 2019
@MauricioFauth MauricioFauth added this to the 5.1.0 milestone Nov 1, 2019
MauricioFauth added a commit that referenced this issue Nov 1, 2019
Improve complexity of generated passwords

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
@OlafvdSpek
Copy link

That doesn't add a setting for password complexity, it changes it unconditionally. :(

@Tithugues
Copy link
Contributor

@OlafvdSpek , you're right. My first idea was to provide a quick fix to be able to generate a valid password (even if it may not always be valid). But here, at least, we can have a valid password.

In another version, I would like to generate a password regarding the MySQL configuration.

So I would suggest to keep this issue open if this is OK for you @williamdes @MauricioFauth .

Thank you.

@williamdes williamdes reopened this Nov 2, 2019
@williamdes williamdes removed the has-pr An issue that has a pull request pending that may fix this issue. The pull request may be incomplete label Nov 2, 2019
@williamdes
Copy link
Member

Okay
I did not clear the milestone since I hope someone will do the implementation before the release :)
Thank you for the quick fix @Tithugues

@OlafvdSpek
Copy link

Could the update be reverted until it's (fully) ready?

@Tithugues
Copy link
Contributor

@OlafvdSpek, sorry, but why ?

Is there any issue with this patch ? Because there might be a better solution, does it mean that we shouldn't provide a temporary solution ?

Thank you for your feedback.

@OlafvdSpek
Copy link

See the reason for the current solution @ #15491 (comment)

@rabeehrz
Copy link
Contributor

rabeehrz commented Nov 8, 2019

Hi, I’m new here. I would love to contribute to phpMyAdmin and I think this is an issue I can work on. Can someone tell me what exactly I should implement?

P.S: I’m just starting open source contribution and I might be a bit slow, but I love to learn! So.

@Tithugues
Copy link
Contributor

Hi,

I wanted to work on it, but didn't yet find time to do it…

Here is the way I expected to do it:

  • Retrieve all MySQL password policy variables
  • Share them with JS (as it's done for "Messages")
  • Use these variables in the current JavaScript function to generate the new password
  • Smile

@rabeehrz
Copy link
Contributor

rabeehrz commented Nov 8, 2019

Sure, Will work on it. Thanks! :D

@Tithugues
Copy link
Contributor

For information, here is the list of variables: https://dev.mysql.com/doc/refman/5.7/en/validate-password-options-variables.html

@rabeehrz
Copy link
Contributor

rabeehrz commented Nov 9, 2019

Yeah, I saw that earlier. And I did devise a solution exactly the same as yours. But I didn't know how to share those variables with JS. Since somewhat similar is already implemented, I'll look the code and make something similar.
Thanks

@rabeehrz
Copy link
Contributor

rabeehrz commented Dec 2, 2019

  • Share them with JS (as it's done for "Messages")

Can you show me the file where this is done, I'm having a hard time finding it. 😅
Thanks

@Tithugues
Copy link
Contributor

I was thinking about this file: https://github.com/phpmyadmin/phpmyadmin/blob/master/js/messages.php

@rabeehrz
Copy link
Contributor

rabeehrz commented Dec 2, 2019

Okay Thanks, I'll look into this! 😄

@rabeehrz
Copy link
Contributor

rabeehrz commented Dec 26, 2019

Can some one help me with this? I need a way to retrieve the MySQL password policies and share them with the function. How can I do it? @williamdes @Tithugues

@williamdes williamdes added this to Triage zone in Enhancements Jan 23, 2020
@williamdes williamdes moved this from Triage zone to Nice to have soon in Enhancements Jan 24, 2020
@williamdes williamdes added the has-pr An issue that has a pull request pending that may fix this issue. The pull request may be incomplete label Jan 27, 2020
@williamdes williamdes removed this from the 5.1.0 milestone Aug 5, 2020
@williamdes
Copy link
Member

Please refer to #16305 for more informations

@williamdes williamdes removed the has-pr An issue that has a pull request pending that may fix this issue. The pull request may be incomplete label Oct 18, 2022
@williamdes williamdes added this to the 5.3.0 milestone Oct 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement A feature request for improving phpMyAdmin
Projects
Enhancements
  
Nice to have soon
Development

Successfully merging a pull request may close this issue.

6 participants