Jump to content

UPW generation algorithm


monovm

Recommended Posts

we use uid and upw for logining in  to whmcs in our own application. 

i think after whmcs7.3 algorithm of generation of upw have been changed.

we used this algorithm before whmcs 7.3 and it was worked fine .

$_SESSION['upw'] = sha1($userRow['id'] . $userRow['password'] . $_SERVER['REMOTE_ADDR'] . substr(sha1($cc_encryption_hash),0,20));

 

i want to know is this algorithm have been changed ? 

 

Link to comment
Share on other sites

Hi,

I would agree that it has been changed.

I asked their support but 'due to the sensitive nature of the hashing functionality that WHMCS replies upon' they refuse to go into any further details on how it is generated.

They offered to help find an alternative, but given how long it took for them to answer my question properly, I'll build my own solution. 

Thanks,
Martin

 

Link to comment
Share on other sites

  • WHMCS Developer
On 22/10/2017 at 4:58 PM, monovm said:

$_SESSION['upw'] = sha1($userRow['id'] . $userRow['password'] . $_SERVER['REMOTE_ADDR'] . substr(sha1($cc_encryption_hash),0,20));

Put a | between each value.

Ideally you would use the Validate Login API command and use the passwordHash response from there - https://developers.whmcs.com/api-reference/validatelogin/

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