Jump to content

Password strength not working


DennisHermannsen

Recommended Posts

Hi,

 

I'm builing a new design using Foundation, but I've been having troubles with the password strength indicator. No matter what I type, the indicator just tells me to type a password...

 

I'm pretty sure this could have something to do with js, but I'm not sure. Anyone who got a clue?

 

- - - Updated - - -

 

I'm thinking the password strength isn't possible to show without BootStrap. Could I just make a stripped down version of Bootstrap and load in the pwstrength.tpl?

Link to comment
Share on other sites

i've just spotted there's a file called 'pwstrength.js' file in 'includes/jscript/' - it's called in all the viewcart template files (plus some classic & portal pages)...

 

<script type="text/javascript" src="includes/jscript/pwstrength.js"></script>

 

are you calling the script in your code?

Link to comment
Share on other sites

  • 4 months later...

I just updated from 5.2.16 to 5.3.7 and i have just finished all my template mods.

 

I just noticed that the PW strength js is not showing on my comparison view cart page. Is there a on and off selection in admin or am i missing something here?

 

Thanks :)

 

UPDATE: Required Password Strength on security tab is set to 60, still nothing on view cart page.

 

UPDATE: Does not work with the pwstrength.js file replaced with the one from backup either. Looks like naming conventions are correct so i know im calling the right function in the right file.

 

UPDATE: i did a quick test. I added a simple function to that pwstrength.js file like so.

 

function testshowbar() {
document.write('hello');
}

 

then in the view cart i did this

 

<tr><td colspan="2" align="center"><script language="javascript">testshowbar();</script></td></tr>

 

and that either does not show. so im wondering if this is a permission issue and if the js file is even executing at all.

 

UPDATE: well thats not the issue either.

The pw strength meter is suppose to show as you type the PW correct?

 

UPDATE AGAIN LOL: I used the FF console and it does show

 

 

SyntaxError: missing name after . operator pwstrength.js:60

ReferenceError: showStrengthBar is not defined register.php:260

ReferenceError: testshowbar is not defined register.php:263

Use of attributes' specified attribute is deprecated. It always returns true. jquery.js:2

 

 

 

since i added that test function, it moves the lines a bit but line 60 in the default file would be

 

document.write('<table align="center"><tr><td>'.langPasswordStrength.':</td><td width="102"><div id="pwstrengthpos" style="position:relative;float:left;width:0px;background-color:#33CC00;border:1px solid #000;border-right:0px;"> </div><div id="pwstrengthneg" style="position:relative;float:right;width:100px;background-color:#efefef;border:1px solid #000;border-left:0px;"> </div></td><td><div id="pwstrength">'.langPasswordWeak.'</div></td></tr></table>');

 

UPDATE: YEP when i comment out the doc write, i get my js hello test. so its def a syntax error with using the . syntax.

ill do some research to see the deal with using '.langPasswordStrength.' i think the syntax has to be either [] when it has a parent or some other way.. ill keep you updated. Getting closer lol :)

Edited by durangod
Link to comment
Share on other sites

wow what luck, first try man... i got it

 

the syntax needs to be (there are two places) in the doc write for the js file.

 

<td>'+langPasswordStrength+':</td>  and '+langPasswordWeak+'

 

 

and whalllaaa there it is on the page.

 

guess ill file a bug report on this... wow what luck, im not a js guru but i knew about + and just tried it...

 

cool beans...

Link to comment
Share on other sites

I have open an internal case, number 4660, regarding this bug. While durangod's workaround does seem to resolve this issue, please note that this has not been fully tested and is not supported by WHMCS. Please review all aspects of the provided workaround before implementing on a production install of WHMCS.

 

--Thanks

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated