Post by Gefagahaga » Thu Dec 01, 2011 5:44 pm

Hello all!

I'm new to OC, been fiddling with it for a week or so. Using 1.4.9.5.

My problem is that I feel that the requirement of 3 characters for a password is way too unsafe for customers so I was wondering where I could change this to say 6 or 8 and perhaps also requiring a mix of letters and numbers.

I'm sorry if I'm aksing int he wrong section, don't know where account creation belongs.
Last edited by Gefagahaga on Fri Dec 02, 2011 5:37 am, edited 1 time in total.

Newbie

Posts

Joined
Tue Nov 29, 2011 6:21 pm

Post by fido-x » Thu Dec 01, 2011 7:03 pm

The validation on customer passwords checks that the password is not less than 4 characters (ie. sets a 4 character minimum) and not greater than 20. So, the password can be from 4 to 20 characters long.

There is nothing stopping you from using a mix of uppercase and lowercase letters and numbers. You can even use some symbols.

Image
Modules for OpenCart 2.3.0.2
Homepage Module [Free - since OpenCart 0.7.7]
Multistore Extensions
Store Manager Multi-Vendor/Multi-Store management tool

If you're not living on the edge ... you're taking up too much space!


User avatar
Expert Member

Posts

Joined
Sat Jun 28, 2008 1:09 am
Location - Tasmania, Australia

Post by Gefagahaga » Fri Dec 02, 2011 1:17 am

fido-x wrote:The validation on customer passwords checks that the password is not less than 4 characters (ie. sets a 4 character minimum) and not greater than 20. So, the password can be from 4 to 20 characters long.

There is nothing stopping you from using a mix of uppercase and lowercase letters and numbers. You can even use some symbols.

Yes but I wanna force the customers to set a pass with a minimum of say 6 characters and I want it to say that the password is too short if they try setting less than that.

Newbie

Posts

Joined
Tue Nov 29, 2011 6:21 pm

Post by SXGuy » Fri Dec 02, 2011 2:57 am

catalog/controller/account/register.php

find

Code: Select all

if ((strlen(utf8_decode($this->request->post['password'])) < 4) || (strlen(utf8_decode($this->request->post['password'])) > 20)) {
      		$this->error['password'] = $this->language->get('error_password');
    	}
change 4 to 6

i think thats all you need to change. let me know if it works.

Active Member

Posts

Joined
Sun Nov 08, 2009 2:07 am

Post by Gefagahaga » Fri Dec 02, 2011 5:34 am

SXGuy wrote:catalog/controller/account/register.php

find

Code: Select all

if ((strlen(utf8_decode($this->request->post['password'])) < 4) || (strlen(utf8_decode($this->request->post['password'])) > 20)) {
      		$this->error['password'] = $this->language->get('error_password');
    	}
change 4 to 6

i think thats all you need to change. let me know if it works.

Woo, it does. Thanks a lot!

And if anyone is looking for the same solution, don't forget to change the error text in:

/catalog/language/LANGUAGE/account/create.php
/catalog/language/LANGUAGE/account/password.php

So it says "must be longer than X...."

Newbie

Posts

Joined
Tue Nov 29, 2011 6:21 pm
Who is online

Users browsing this forum: No registered users and 4 guests