Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Post New Thread Reply

Register GFY Rules Calendar
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed.

 
Thread Tools
Old 11-09-2022, 08:50 AM   #1
Publisher Bucks
Confirmed User
 
Industry Role:
Join Date: Oct 2018
Location: New Orleans, Louisiana. / Newcastle, England.
Posts: 1,116
Show logged in users password when using password_hash

So I have a registration system setup for my employees, it allows them to update their information as needed however, it does not currently show their existing passsword, instead it shows a hash value.

I'm using the following to add the password to the database:

$password = password_hash($_POST['password'], PASSWORD_DEFAULT);

Which displays something like this on their profile for their password:

$2y$10$bUxrx6rFxS1AISpSCKgGXegQ0CeYMJCrCdUshxQhsjC mC5/yDTRIu

Is there a way that I can unencode that stored variabe to show the logged in user what their password actually is on their profile page, instead of the hash, so they can then go ahead and change it if needed?

Thanks.
__________________
NOTHING TO SEE HERE
Publisher Bucks is online now   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 11-09-2022, 08:59 AM   #2
sarettah
see you later, I'm gone
 
Industry Role:
Join Date: Oct 2002
Posts: 14,053
You don't want to do that. Just imho, of course.

If the user does not know their password then how did they log into the system to get to the password change screen to begin with?



.
__________________
All cookies cleared!
sarettah is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 11-09-2022, 09:08 AM   #3
Publisher Bucks
Confirmed User
 
Industry Role:
Join Date: Oct 2018
Location: New Orleans, Louisiana. / Newcastle, England.
Posts: 1,116
Quote:
Originally Posted by sarettah View Post
You don't want to do that. Just imho, of course.
Good enough advice for me

Quote:
If the user does not know their password then how did they log into the system to get to the password change screen to begin with?
.
They could have it saved in their browser.

So just do a regular reset/forgot password link it is
__________________
NOTHING TO SEE HERE
Publisher Bucks is online now   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 11-09-2022, 09:35 AM   #4
lezinterracial
Confirmed User
 
Industry Role:
Join Date: Jul 2012
Posts: 3,064
Quote:
Originally Posted by sarettah View Post
You don't want to do that. Just imho, of course.


.
Yea, Just do a password reset. They make hashes one way, you can't decode. So, if your database ever gets compromised there aren't a bunch of compromised passwords out there. People still reuse passwords. They may use the same password and email address for their porn account as they use for their local bitcoin account.

Hackers would have to run a program like OCL-Hashcat. Usually run a dictionary file of common passwords. The program hashes a password and compares it to your hash.
It takes a long time. Hashing algos like MD5 are not recommended anymore because they are too easy to process. Looks like a bcrypt algo you got there. That is a good one.

There are websites, one that was shut down called raidforums, it was replaced by breached.to. Where people share stolen databases. They also share combolists. Usernames along with the cracked passwords.
__________________
Live Sex Shows
lezinterracial is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 11-09-2022, 09:36 AM   #5
sarettah
see you later, I'm gone
 
Industry Role:
Join Date: Oct 2002
Posts: 14,053
Quote:
Originally Posted by Publisher Bucks View Post
Good enough advice for me



They could have it saved in their browser.

So just do a regular reset/forgot password link it is


And they can go into their browser password manager and get it from there.

.
sarettah is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 11-09-2022, 09:36 AM   #6
Kittens
👏 REVOLUTIONARY 👏
 
Kittens's Avatar
 
Industry Role:
Join Date: Jan 2016
Posts: 1,440
No, you do not display the password in anyway possible. That is a security issue. The hash is one way, you do not unhash it to show them the real password "incase they want to change it"

You use the comparing functions to hash their input and compare it with what you have stored. If it comes back good, then you know they typed the right password.

That is all you use it for. Store the hash for retrieval and comparing on login. That's it, do not display it to them.
__________________
Kittens is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Post New Thread Reply
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >

Bookmarks

Tags
password, hash, profile, logged, displays, ahead, change, variabe, stored, user, page, unencode, employees, information, update, setup, system, users, password_hash, registration, add, database, $password, existing, passsword



Advertising inquiries - marketing at gfy dot com

Contact Admin - Advertise - GFY Rules - Top

©2000-, AI Media Network Inc



Powered by vBulletin
Copyright © 2000- Jelsoft Enterprises Limited.