Forums / Bug Reports / [Done 1.3.9] Password change

[Done 1.3.9] Password change

Locked

Views: 2,193

Results 1 to 4 of 4
This thread is locked. New replies are disabled.
10 Jun 2008, 7:09 AM
#1
cochlear avatar

cochlear

Zen Follower

Join Date:
Apr 2007
Location:
Sydney
Posts:
110
Plugin Contributions:
0

[Done 1.3.9] Password change

ZC 1.3.8a

This is what I've found.

Admin initially allows a minimum of say, 0 characters for password.

The customer sets a 3-character password.

Then admin increases the minimum to 4 characters.

Customer can still log in, but if she wants to change her password to more characters, say 5, she will get a error popup message saying password requires a minimum of 4 characters. No doubt the customer will feel a bit confused.

I'm guessing it's because the script checks the length of old password. If so, then I think it would be better if the script checks the new password instead.

10 Jun 2008, 7:25 AM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: [Done 1.3.9] Password change

I'm not sure why you're suggesting there is a bug.

  1. A fresh new install of Zen Cart requires minimum password length of 5.
  2. If the administrator changes that value after customers have created passwords, do you want all the passwords to suddenly be invalid?
  3. The "minimum characters" check is done against the new password selected, so that the user cannot enter a password shorter than the required minimum length in effect at the time they are changing their password.

.
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.

10 Jun 2008, 9:25 AM
#3
cochlear avatar

cochlear

Zen Follower

Join Date:
Apr 2007
Location:
Sydney
Posts:
110
Plugin Contributions:
0

Re: [Done 1.3.9] Password change

DrByte:

  1. The "minimum characters" check is done against the new password selected, so that the user cannot enter a password shorter than the required minimum length in effect at the time they are changing their password.
    I agree it should work that way. But as I described in the process above, the new password that I tried is longer than the required minimum, but ZC is still blocking it.

See the screen capture below. The new password has 5 dots, but the error message is referring to 4 characters.

Anyway I realise this scenario should not arise too frequently, so it's no big deal. I was just reporting it in case someone might be interested.

10 Jun 2008, 2:49 PM
#4
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: [Done 1.3.9] Password change

Hmmm ... well lo and behold ... a bug :eek:

You're right. I was sure I'd tested that, but it's clear I hadn't.

A quick-fix is to edit the /includes/modules/pages/account_password/jscript_form_check.php and change this line:if (password_current == '' [B]|| password_current.length < field_size[/B]) {to this:```
if (password_current == '' ) {

.
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.