close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Using server validation to check SHA1 encrypted password value

Thread began 5/19/2022 7:18 am by Mags | Last modified 5/20/2022 9:31 am by Ray Borduin | 202 views | 6 replies |

Mags

Using server validation to check SHA1 encrypted password value

Hi Ray, I need to update a user update page so that the user must input their current password in order to update the record. It's failing the validation though - can you see where I'm going wrong? Current code is as follows:

$WAFV_Errors .= WAValidateLE((WA_SHA1Encryption((isset($_POST["password"]))?$_POST["password"]:"")) ."" . "",($SecurityAssistparausers["user_pass"]) . "",true,9);

<input id="password" name="password" type="password" value="">

Sign in to reply to this post

Ray BorduinWebAssist

Maybe the value of $SecurityAssistparausers["user_pass"] isn't set correctly? I'd have to look at the entire page so I can see the code in context.

Sign in to reply to this post
Did this help? Tips are appreciated...

Mags

I've attached the page for you, many thanks.

Sign in to reply to this post

Ray BorduinWebAssist

Your $SecurityAssistparausers recordset has to be moved above the validation code, since you are using it in the validation.

Sign in to reply to this post
Did this help? Tips are appreciated...

Mags

Ah, of course! However I moved it and tried again, and it's now giving the following error:

Fatal error: Uncaught Error: Cannot use object of type WA_MySQLi_RS as array in /var/www/xxx/mysite.com/xxx/pagename.php:38 Stack trace: #0 {main} thrown in /var/www/xxx/mysite.com/xxx/pagename.php on line 38. I've attached my updated page.

Sign in to reply to this post

Ray BorduinWebAssist

This is the old recordset syntax:
$SecurityAssistparausers["user_pass"]

The new syntax would be:
$SecurityAssistparausers->getColumnVal("user_pass",false)

Sign in to reply to this post
Did this help? Tips are appreciated...

Mags

Thank you, working now!

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...