Forums / Managing Customers and Orders / generating customer passwords v1.3.0.1

generating customer passwords v1.3.0.1

Views: 1,510

Results 1 to 8 of 8
31 Aug 2011, 6:52 AM
#1
rebecca_l avatar

rebecca_l

New Zenner

Join Date:
Jan 2009
Posts:
18
Plugin Contributions:
0

generating customer passwords v1.3.0.1

Zen cart 1.3.0.1 PHP 5.2.17 on Linex Mysql 5.0.51a

We have a problem with users when they receive their password or request a new password using the "forgotten password" module.
Some generated passwords contain 0 (zeros) and upper and lower case of the letter O. The users have a very difficult time telling the difference and usually end up getting an error message on login so they call the store for help.
Is there a way to prevent the use of zero and the letter O in the generation of passwords?

Thanks
RL

31 Aug 2011, 7:37 AM
#2
gaurav10feb avatar

gaurav10feb

Zen Follower

Join Date:
Jan 2010
Location:
Australia
Posts:
243
Plugin Contributions:
1

Re: generating customer passwords v1.3.0.1

better just use password containing characters only

for that

includes>>modules>>pages>>password_forgotten>>header.php

look for

$new_password = zen_create_random_value( (ENTRY_PASSWORD_MIN_LENGTH > 0 ? ENTRY_PASSWORD_MIN_LENGTH : 5) );

change to

$new_password = zen_create_random_value( (ENTRY_PASSWORD_MIN_LENGTH > 0 ? ENTRY_PASSWORD_MIN_LENGTH : 5), chars );

Believe it or not But My existence is illusional

31 Aug 2011, 10:07 AM
#3
drbyte avatar

drbyte

Sensei

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

Re: generating customer passwords v1.3.0.1

rebecca_L:

Zen cart 1.3.0.1 PHP 5.2.17 on Linex Mysql 5.0.51a

We have a problem
You REALLY need to upgrade ASAP, or you're going to have even more problems.

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

1 Sep 2011, 6:57 AM
#4
rebecca_l avatar

rebecca_l

New Zenner

Join Date:
Jan 2009
Posts:
18
Plugin Contributions:
0

Re: generating customer passwords v1.3.0.1

Thank you. I will give your edit suggestion a try. We're having a sale right now so I'll wait until it's over.
As to the version upgrade..I know I should do it but I took over maintenance on this site from someone else. I may not be using the correct terminology but it doesn't look like there are any overrides. Some of the edits are in the original files. I had another Zen cart website several years ago and I remember copying any files I needed to change to another directory before I changed them. I'm worried about writing over files that I need.
The only way I can think to get around this is to go through each file and if they have been customized, copy them to the appropriate location. Once I've got the system fixed then I can upgrade.
Am I wrong thinking or over thinking this? I don't want to break the website with an upgrade.
Thank you for your help so far.
Rebecca

1 Sep 2011, 8:12 AM
#5
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: generating customer passwords v1.3.0.1

Yes, if the file edits are in the original locations instead of template override folders, you will need to compare and copy the appropriate files before upgrading. That is similar to the beginning of the regular upgrade process, identifying all of your customizations.

1 Sep 2011, 10:18 PM
#6
rebecca_l avatar

rebecca_l

New Zenner

Join Date:
Jan 2009
Posts:
18
Plugin Contributions:
0

Re: generating customer passwords v1.3.0.1

Thanks for all your help. I found an upgrade guide and will work my way through it. It doesn't seem difficult just time consuming. Oh well it has to be done sometime.

Thanks again for your help.
Rebecca

3 Nov 2011, 8:22 PM
#7
antoniobb avatar

antoniobb

New Zenner

Join Date:
Apr 2008
Posts:
51
Plugin Contributions:
0

Re: generating customer passwords v1.3.0.1

gaurav10feb:

better just use password containing characters only

for that

includes>>modules>>pages>>password_forgotten>>header.php

look for

$new_password = zen_create_random_value( (ENTRY_PASSWORD_MIN_LENGTH > 0 ? ENTRY_PASSWORD_MIN_LENGTH : 5) );

change to

$new_password = zen_create_random_value( (ENTRY_PASSWORD_MIN_LENGTH > 0 ? ENTRY_PASSWORD_MIN_LENGTH : 5), chars );

Hi, what would be the right code to make the new password numbers only, so instead of Chars something like nums?

3 Nov 2011, 9:01 PM
#8
drbyte avatar

drbyte

Sensei

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

Re: generating customer passwords v1.3.0.1

'digits'

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