[solved]FEU setting page special character when changing pwd

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
f34nc015
Forum Members
Forum Members
Posts: 14
Joined: Wed Dec 11, 2013 12:50 pm

[solved]FEU setting page special character when changing pwd

Post by f34nc015 »

Hi,

I'd like to force front end users to have a special character, a number, and a capital letter, when they change their password.
(I mean, there: {FrontEndUsers form="changesettings"} )

What would you suggest?
- having some javascript check? Could be bypassed (should be ok though), but also js could be disabled on the client. (And first quick tests has my js code not being loaded)
- modifying the FEU module?
- other?

thanks, I'm a bit clueless on this one...! :)
Last edited by f34nc015 on Thu Oct 09, 2014 2:38 pm, edited 1 time in total.
JohnnyB
Dev Team Member
Dev Team Member
Posts: 731
Joined: Tue Nov 21, 2006 5:05 pm

Re: FEU setting page force special character when changing p

Post by JohnnyB »

I would use JS and feel it was very reliable for my target audience. I think right now, there are less than .25% of users that either use a browser that doesn't accept JS or have it disabled. Mostly bots.

I think it would be safe to use JS that sets up an input mask for your password field, and upon submit checks if a special char is used.

If for some reason, someone slips by that JS, maybe you can then do a PHP regex on their password when their profile page is viewed. For example, in the FEU user profile template, use some regex to check for a special char. If there is not one, display a message strongly urging them to fix their password.
"The art of life lies in a constant readjustment to our surroundings." -Okakura Kakuzo

--
LinkedIn profile
--
I only speak/write in English so I may not translate well on International posts.
--
User avatar
velden
Dev Team Member
Dev Team Member
Posts: 3497
Joined: Mon Nov 28, 2011 9:29 am

Re: FEU setting page force special character when changing p

Post by velden »

Or additionally have a look at the Events Manager. FEU has some events on change of user. Maybe you can create the server-side check in a UDT. If password fails, disable account or notifyu admin or ...
f34nc015
Forum Members
Forum Members
Posts: 14
Joined: Wed Dec 11, 2013 12:50 pm

Re: FEU setting page force special character when changing p

Post by f34nc015 »

Hey, I think a post has been lost, I repost

Thanks a lot for the answers

client side: javascript works ok.

server side: it's not an option to have a not secure password set, at any time. And also I don't think I can regex it once it's saved, since it's crypted.

There's the option of modifying the feu module api, when the user set his password.
Any other (and better :-) ideas?

Thanks!
User avatar
velden
Dev Team Member
Dev Team Member
Posts: 3497
Joined: Mon Nov 28, 2011 9:29 am

Re: FEU setting page force special character when changing p

Post by velden »

You might consider sponsoring this feature in the module. Ask the module developer (Calguy1000/Robert) what it would cost to implement.

I think adding a regex check would not be an awful lot of work and others could profit too in the future.
User avatar
Jo Morg
Dev Team Member
Dev Team Member
Posts: 1978
Joined: Mon Jan 29, 2007 4:47 pm

Re: FEU setting page force special character when changing p

Post by Jo Morg »

velden wrote:You might consider sponsoring this feature in the module. Ask the module developer (Calguy1000/Robert) what it would cost to implement.
Agree 100%.
f34nc015 wrote:There's the option of modifying the feu module api, when the user set his password.
Never EVER! Unless you want to lose support from the developer/s...
In any case, if you have knowledge enough to hack the module API, you should be able to use the recommended way: an UDT linked to the OnUpdateUser event. This way there are no hacks involved.


Again, I agree with velden 100%!
"There are 10 types of people in this world, those who understand binary... and those who don't."
* by the way: English is NOT my native language (sorry for any mistakes...).
Code of Condut | CMSMS Docs | Help Support CMSMS
My developer Page on the Forge
GeekMoot 2015 in Ghent, Belgium: I was there!
GeekMoot 2016 in Leicester, UK: I was there!
DevMoot 2023 in Cynwyd, Wales: I was there!
f34nc015
Forum Members
Forum Members
Posts: 14
Joined: Wed Dec 11, 2013 12:50 pm

Re: FEU setting page force special character when changing p

Post by f34nc015 »

velden wrote:You might consider sponsoring this feature in the module. Ask the module developer (Calguy1000/Robert) what it would cost to implement.
I asked, let's see what happens :)
Jo Morg wrote:an UDT linked to the OnUpdateUser event. This way there are no hacks involved.
Hum, but... Once I'm in this udt, there's no way to gain access to the uncrypted password of this user (hopefully?)
Or is there a way..?

Thanks
User avatar
velden
Dev Team Member
Dev Team Member
Posts: 3497
Joined: Mon Nov 28, 2011 9:29 am

Re: FEU setting page force special character when changing p

Post by velden »

If the user object indeed is saved before the Event/UDT is called and as you do not get a handle to the original input (the plain password) I don't think it's possible to react properly.

By the way, the password is hashed (and salted) not encrypted. An encrypted password would be decryptable.
f34nc015
Forum Members
Forum Members
Posts: 14
Joined: Wed Dec 11, 2013 12:50 pm

Re: FEU setting page force special character when changing p

Post by f34nc015 »

Thanks for the double clarification :)

First, thanks all of you for the precious help.

Second, my boss said: yes, ask Calguy1000.

Best,
f
Post Reply

Return to “Modules/Add-Ons”