Page 2 of 2 FirstFirst 12
Results 11 to 18 of 18
  1. #11
    Join Date
    Dec 2007
    Location
    Payson, AZ
    Posts
    1,076
    Plugin Contributions
    15

    Default Re: Password Complexity

    Complexity is a pain... coming from where 12 characters and harden was required...

    existing system is one letter, one number at minimum length..

    if you want a almost harden password then you need to change the regex string for it to work, this is most likely not the best string, regex gives me indigestion...

    in admin/functions/admin_access.php find line 442
    Code:
    if (!preg_match('/^(?=.*[a-zA-Z]+.*)(?=.*[\d]+.*)[\d\w\s[:punct:]]{' . $minLength . ',}$/', $password)) {
    Change as below:
    Code:
      //if (!preg_match('/^(?=.*[a-zA-Z]+.*)(?=.*[\d]+.*)[\d\w\s[:punct:]]{' . $minLength . ',}$/', $password)) {
      // passwords must contain 1 lower case letter, 1 upper case letter, 1 number, 1 non-word character and be of required minimum length or grater
        if (!preg_match('/^(?=.*[a-z]+.*)(?=.*[A-Z]+.*)(?=.*[\d]+.*)(?=.*[\W])[\d\w\s[:punct:]]{' . $minLength . ',}$/', $password)) {
    This forces 1 upper, 1 lower case letters, 1 number and one non-character... Cat2#has!

    This does nothing to tell the user what they did wrong!! You would have to trap the error and feed it back to the user. The standard error message is all they well see until then.
    Dave
    Always forward thinking... Lost my mind!

  2. #12
    Join Date
    Jul 2012
    Posts
    16,799
    Plugin Contributions
    17

    Default Re: Password Complexity

    Quote Originally Posted by davewest View Post
    Complexity is a pain... coming from where 12 characters and harden was required...

    existing system is one letter, one number at minimum length..

    if you want a almost harden password then you need to change the regex string for it to work, this is most likely not the best string, regex gives me indigestion...

    in admin/functions/admin_access.php find line 442
    Code:
    if (!preg_match('/^(?=.*[a-zA-Z]+.*)(?=.*[\d]+.*)[\d\w\s[:punct:]]{' . $minLength . ',}$/', $password)) {
    Change as below:
    Code:
      //if (!preg_match('/^(?=.*[a-zA-Z]+.*)(?=.*[\d]+.*)[\d\w\s[:punct:]]{' . $minLength . ',}$/', $password)) {
      // passwords must contain 1 lower case letter, 1 upper case letter, 1 number, 1 non-word character and be of required minimum length or grater
        if (!preg_match('/^(?=.*[a-z]+.*)(?=.*[A-Z]+.*)(?=.*[\d]+.*)(?=.*[\W])[\d\w\s[:punct:]]{' . $minLength . ',}$/', $password)) {
    This forces 1 upper, 1 lower case letters, 1 number and one non-character... Cat2#has!

    This does nothing to tell the user what they did wrong!! You would have to trap the error and feed it back to the user. The standard error message is all they well see until then.
    Of course in the "trapping" and perhaps obvious to some, one would not want to point out- hey you forgot a capital letter, or hey you should add one of each of the following two because you missed these two but met the other three requirements.

    Instead if telling them anything about the complexity or incorrectness, would want to tell them what is expected for all passwords not just one part of it or the part that was missing. This is done already for the existing password rules through the admin constant: ERROR_PASSWORD_RULES, but if the rules were changed then perhaps so should that text.

    The existing "trapping" really should be the extent of password reporting that is done, otherwise start getting into weakening a strong password system.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  3. #13
    Join Date
    Sep 2015
    Location
    Daytona Beach, FL USA
    Posts
    69
    Plugin Contributions
    0

    Default Re: Password Complexity

    How can you tell me how my ZC that is running for over a year is working. It does not reject passwords except for length. I even checked the source code.
    PS-DSS Strong Password Rules Enforced is On.

    I can create user passwords with 2222222 as stated previously.

    Perhaps you are talking about admin passwords. I am talking about user passwords.

    Isn't the code referenced for the Admin and not the general user?
    Last edited by QuickBooksDev; 4 Jul 2017 at 12:24 PM. Reason: added comment about admin vs user.

  4. #14
    Join Date
    Aug 2005
    Location
    Vic, Oz
    Posts
    1,905
    Plugin Contributions
    5

    Default Re: Password Complexity

    Quote Originally Posted by QuickBooksDev View Post
    I am running 1.5.4 and Admin is in https but the passwords are only restricted by length.

    I need to correct this. Please point me where this can be changed.

    Thanks
    Quote Originally Posted by QuickBooksDev View Post
    How can you tell me how my ZC that is running for over a year is working. It does not reject passwords except for length. I even checked the source code.
    PS-DSS Strong Password Rules Enforced is On.

    I can create user passwords with 2222222 as stated previously.

    Perhaps you are talking about admin passwords. I am talking about user passwords.

    Isn't the code referenced for the Admin and not the general user?
    Actually your first post specifically referred to the admin ?
    NOT to user passwords....

  5. #15
    Join Date
    Sep 2015
    Location
    Daytona Beach, FL USA
    Posts
    69
    Plugin Contributions
    0

    Default Re: Password Complexity

    Sorry for any confusion.

    I said Admin is in https but the passwords are only restricted by length which is true because that was mentioned in a previous posting. But I did not mention that this was for either the Admin or User password.

    I need it working for the general user (i.e. someone who is registering to buy from our ZC).

  6. #16
    Join Date
    Jul 2012
    Posts
    16,799
    Plugin Contributions
    17

    Default Re: Password Complexity

    Quote Originally Posted by QuickBooksDev View Post
    Sorry for any confusion.

    I said Admin is in https but the passwords are only restricted by length which is true because that was mentioned in a previous posting. But I did not mention that this was for either the Admin or User password.

    I need it working for the general user (i.e. someone who is registering to buy from our ZC).
    Is it then both the auto-generation AND the user entered password that need to meet more complex rules than simply length?
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  7. #17
    Join Date
    Sep 2015
    Location
    Daytona Beach, FL USA
    Posts
    69
    Plugin Contributions
    0

    Default Re: Password Complexity

    Yes that is correct. All passwords should be strong passwords.

  8. #18
    Join Date
    Jan 2004
    Posts
    66,419
    Blog Entries
    7
    Plugin Contributions
    277

    Default Re: Password Complexity

    Since customer passwords are most often created during checkout, and creating extra friction at checkout by enforcing password complexity is likely to cause abandoned sales, I suggest you add a javascript widget for showing and encouraging password complexity. And NOT enforce it on the back-end by your store software.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

 

 
Page 2 of 2 FirstFirst 12

Similar Threads

  1. Replies: 87
    Last Post: 5 Jun 2015, 02:07 AM
  2. Replies: 1
    Last Post: 1 Feb 2015, 03:12 PM
  3. Customer used Forgot Password but password sent won't work
    By smurfy1 in forum General Questions
    Replies: 16
    Last Post: 16 Feb 2012, 04:54 AM
  4. New Password from Forgotton Password does not work
    By JackQBTeK in forum General Questions
    Replies: 1
    Last Post: 14 Jan 2007, 09:42 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR