Is there a problem with PWD_ENCRYPT ?

If you have questions or if you want to share your opinion about Aware IM post your message on this forum
Post Reply
Jaymer
Posts: 2430
Joined: Tue Jan 13, 2015 10:58 am
Location: Tampa, FL
Contact:

Is there a problem with PWD_ENCRYPT ?

Post by Jaymer »

I'm trying to set a user's password to a known string.

SystemUser.Password=PWD_ENCRYPT('Hello')

this returns blank when viewed in the logger.

PWD_ENCRYPT has been around 10 years and not talked about much - did it get replaced by something else?
or is it just broke?
Click Here to see a collection of my tips & hacks on this forum. Or search for "JaymerTip" in the search bar at the top.

Jaymer
Aware Programming & Consulting - Tampa FL
BobK
Posts: 544
Joined: Thu Jan 31, 2008 2:14 pm
Location: Cincinnati, Ohio, USA

Re: Is there a problem with PWD_ENCRYPT ?

Post by BobK »

Jaymer wrote:did it get replaced by something else?
NO
Jaymer wrote:or is it just broke?
NO

Works for me.
Bob
Jaymer
Posts: 2430
Joined: Tue Jan 13, 2015 10:58 am
Location: Tampa, FL
Contact:

Re: Is there a problem with PWD_ENCRYPT ?

Post by Jaymer »

what version bob?
Click Here to see a collection of my tips & hacks on this forum. Or search for "JaymerTip" in the search bar at the top.

Jaymer
Aware Programming & Consulting - Tampa FL
Jaymer
Posts: 2430
Joined: Tue Jan 13, 2015 10:58 am
Location: Tampa, FL
Contact:

Re: Is there a problem with PWD_ENCRYPT ?

Post by Jaymer »

4e4894ebe502f1ca4ebdd3efb982f2b7

this is getting stored in the Password field when I execute this:

PWD_ENCRYPT('Hello')

1) It shows blank in the Logger (like i said in original post)
2) You can't log in with 'Hello'
3) Hello is f51ae753bc6112ead827d588bc7804a9, so I'm not sure where the 4e48 is coming from.
Click Here to see a collection of my tips & hacks on this forum. Or search for "JaymerTip" in the search bar at the top.

Jaymer
Aware Programming & Consulting - Tampa FL
BobK
Posts: 544
Joined: Thu Jan 31, 2008 2:14 pm
Location: Cincinnati, Ohio, USA

Re: Is there a problem with PWD_ENCRYPT ?

Post by BobK »

I am using Version 8.3 Build 2631.

The field I am storing the encrypted value is a plain old Plain Text field and I did not select the Password option.
Bob
Jaymer
Posts: 2430
Joined: Tue Jan 13, 2015 10:58 am
Location: Tampa, FL
Contact:

Re: Is there a problem with PWD_ENCRYPT ?

Post by Jaymer »

no, i don't mess with the "password" option either.
tho I'm trying to store the result into the user's actual Password field, so he can log in with that password.

it just seems like the function is broke if its not going to display a value in the Logger LIKE EVERY OTHER function & assignment does in Aware.

stumped.
Click Here to see a collection of my tips & hacks on this forum. Or search for "JaymerTip" in the search bar at the top.

Jaymer
Aware Programming & Consulting - Tampa FL
BobK
Posts: 544
Joined: Thu Jan 31, 2008 2:14 pm
Location: Cincinnati, Ohio, USA

Re: Is there a problem with PWD_ENCRYPT ?

Post by BobK »

I changed my test to try populating the Password field of the RegularUser BO and I got the same results as you.
The solution is to not use the PWD_ENCRYPT function. Just move 'Hello' into the Password Field of the RU and Aware will automatically encrypt it. Changes to that specific field do not show in the logs probably for security reasons.
Bob
aware_support
Posts: 7523
Joined: Sun Apr 24, 2005 12:36 am
Contact:

Re: Is there a problem with PWD_ENCRYPT ?

Post by aware_support »

Bob is right - Aware IM treats the Password attribute of the SystemUser object in a special way - it automatically encrypts everything that gets stored there. So:

RegularUser.Password = 'Hello' // this is CORRECT
RegularUser.Password=PWD_ENCRYPT ('Hello') // this is WRONG!
SomeObject.SomeAttribute=PWD_ENCRYPT ('Hello') // this is CORRECT!
Aware IM Support Team
Post Reply