Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[looks good] Other solution for #728 Encrypt user_id on account verification #780

Open
wants to merge 6 commits into
base: develop
Choose a base branch
from

Conversation

slaveek
Copy link
Contributor

@slaveek slaveek commented Jan 10, 2016

I like @OmarElgabry Encrypt user_id on account verification from #774 however not quite like the "long and ugly" url's so this is a bit other way to get this work with no "long and ugly" url's

In short:

  • Hash user's id and user's activation hash together and send to user.
    The link will be looks like:
    http://127.0.0.1/register/verify/hashed_user_id_and_user_activation_hash/user_activation_hash
  • then get user's id and user's activation hash from database by user_activation_hash (second parameter in activation link)
  • hash user's id and user's activation hash from database the same way as sent to user by email. This should give as the same hash as in first parameter
  • check both hashes that they are identical

slaveek and others added 6 commits January 7, 2016 22:07
Fix for missing code (my fault :)) in PR 773, Ticket panique#770: redirect a…
We get nice looking hashed value without any special chars. This works
good in url's without add ?param_name=param_value
Get user's id and activation hash. This will be hashed the same way as
sent by email to user, then check that is the same as in email
If hashed user's id + user's activation code from data base is the same
as hash code from email, registration is passed.
@panique panique changed the title Other solution for #728 Encrypt user_id on account verification [looks good] Other solution for #728 Encrypt user_id on account verification Jan 11, 2016
@ghost
Copy link

ghost commented Feb 4, 2017

@slaveek I like this!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant