Skip to content

Enhanced suggestPassword() function per issue #12370#2

Open
ReverseEMF wants to merge 1 commit intoQA_4_6from
ReverseEMF-issue-12370-1
Open

Enhanced suggestPassword() function per issue #12370#2
ReverseEMF wants to merge 1 commit intoQA_4_6from
ReverseEMF-issue-12370-1

Conversation

@ReverseEMF
Copy link
Owner

Before submitting pull request, please check that every commit:

  • Has proper Signed-Off-By
  • Has commit message which describes it
  • Is needed on it's own, if you have just minor fixes to previous commits, you can squash them
  • Any new functionality is covered by tests

Regarding the above, this is my first foray into the github/opensource arena, and perhaps my last. I'm a phpMyAdmin user who encountered a "bug" (euphemistically tagged as an "enhancement" even though it produces a warning message, and thus interferes with normal functioning--that in my book, is the definition of a bug), discovered that there is an "issue" for that "enhancement", and being a retired programmer, thought, what the hell, I can fix that, so I dove in. The documentation that I was herded to made this sound easy "anybody can contribute" ... "go ahead and dive in" [paraphrase]. So, here is my code. It works great. Maybe I'm not following the correct protocol, but no one else has tackled this issue (phpmyadmin#12370) so, if this can't go through the proper channels, as it is, then how about one of you take this code and call it your own and put it through the proper channels. Otherwise, someone (if this issue is ever addressed), will have to start from scratch -- so which way is more efficient?

To address issue phpmyadmin#12370, enhanced the suggestPassword() function and added a new function, called getRandomInt(), to support code in the suggestPassword() function.
This function, now, generates passwords that comply with the mySQL Password Validation Plugin (ver 5.6 and above). It generates a 16 character password that has at least one lowercase char, at least one uppercase char, at least one numeric char and at least one "special character" (non-alphanumeric). One is not the only number--this function, with random variability, pads out these various character types to fill the 16 character space, but every password complies with the minimum constraints.
This is tested and ready to go. See function comments for further information and added features.

To address issue phpmyadmin#12370, enhanced the suggestPassword() function and added a new function, called getRandomInt(),  to support code in the suggestPassword() function.
This function,  now, generates passwords that comply with the mySQL Password Validation Plugin (ver 5.6 and above).  It generates a 16 character password that has at least one lowercase char, at least one uppercase char, at least one numeric char and at least one "special character" (non-alphanumeric).  One is not the only number--this function, with random variability, pads out these various character types to fill the 16 character space, but every password complies with the minimum constraints.
This is tested and ready to go.  See function comments for further information and added features.
peternewman referenced this pull request Jan 7, 2022
To address issue phpmyadmin#12370, enhanced the suggestPassword() function and added a new function, called getRandomInt(),  to support code in the suggestPassword() function.
This function,  now, generates passwords that comply with the mySQL Password Validation Plugin (ver 5.6 and above).  It generates a 16 character password that has at least one lowercase char, at least one uppercase char, at least one numeric char and at least one "special character" (non-alphanumeric).  One is not the only number--this function, with random variability, pads out these various character types to fill the 16 character space, but every password complies with the minimum constraints.
This is tested and ready to go.  See function comments for further information and added features.
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