The following warnings occurred:
Warning [2] Undefined variable $unreadreports - Line: 26 - File: global.php(961) : eval()'d code PHP 8.2.25 (Linux)
File Line Function
/global.php(961) : eval()'d code 26 errorHandler->error
/global.php 961 eval
/showthread.php 28 require_once





× This forum is read only. As of July 23, 2019, the UserSpice forums have been closed. To receive support, please join our Discord by clicking here. Thank you!

  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Status Update 017
#7
@Brandin. Are you talking about auto generate passwords?

What I tend to do is to do a token generate then bcrypt that then bycrypt the bcrypt so it's essentially an unknowable password (since bcrypt is not a deterministic hash the results of the same token are different). Then I force the user to go through the password reset to get their own password. If you're talking about autogenerating a password that we send them, my thought would be to bcrypt something to get pseudorandom noise and then give them characters 8-19 as their password to give them a pseudorandom unpredictable password that we can share.

Does that make sense?
1. Generate a random token.
2. Bcrypt it (don't store it)
3. Shorten the string to only characters 8-19 (since characters 1-7 are always $2y$12$
4. Bcrypt that 12 character string as their password store that to the database and then you can send them the password.

The problem is that doing it that way, the pw would be in plain text in email, so they should still reset the pw, which brings you back to creating a password that even you don't know.
  Reply


Messages In This Thread
Status Update 017 - by mudmin - 09-17-2017, 08:14 PM
Status Update 017 - by mudmin - 09-17-2017, 08:16 PM
Status Update 017 - by Brandin - 09-17-2017, 09:05 PM
Status Update 017 - by Brandin - 09-17-2017, 09:06 PM
Status Update 017 - by Brandin - 09-18-2017, 10:45 PM
Status Update 017 - by karsen - 09-19-2017, 07:02 PM
Status Update 017 - by mudmin - 09-19-2017, 11:23 PM
Status Update 017 - by mudmin - 09-19-2017, 11:27 PM
Status Update 017 - by mudmin - 09-20-2017, 12:45 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)