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
< in Passwords
#8
Ah, I see in your original post that you said registration, not login! Apologies for that, I lost you some time.

The reason the passwords don't match is because in the "matches" validation rule, the ingoing value ($_POST['confirm']) is sanitized while the value it matches ($_POST['password']) is not. Change this line in 'classes/Validation/php' (at or around line 54):

Code:
case 'matches':
Code:
if ($value != $source[$rule_value]) {
to:
Code:
case 'matches':
Code:
if ($value != sanitize($source[$rule_value])) {

Also, don't forget to bypass sanitizing of the password you send to the User->create() method on join.php line 182, using the modification we made to the Input class before:
Code:
password_hash(Input::get('password'), PASSWORD_BCRYPT, array('cost' => 12)),
to
Code:
password_hash(Input::get('password', true), PASSWORD_BCRYPT, array('cost' => 12)),

Let me know if this works, I can't test it myself right now unfortunately.
  Reply


Messages In This Thread
< in Passwords - by Brandin - 07-03-2017, 06:33 PM
< in Passwords - by karsen - 07-09-2017, 07:28 PM
< in Passwords - by Brandin - 07-12-2017, 11:30 AM
< in Passwords - by mudmin - 07-12-2017, 12:26 PM
< in Passwords - by Brandin - 07-13-2017, 10:05 PM
< in Passwords - by karsen - 07-15-2017, 04:27 PM
< in Passwords - by Brandin - 07-16-2017, 06:10 PM
< in Passwords - by karsen - 07-16-2017, 08:34 PM
< in Passwords - by Brandin - 07-18-2017, 12:15 PM
< in Passwords - by Brandin - 07-18-2017, 12:18 PM
< in Passwords - by karsen - 07-18-2017, 05:13 PM
< in Passwords - by Brandin - 07-18-2017, 06:23 PM
< in Passwords - by karsen - 07-18-2017, 06:40 PM
< in Passwords - by Brandin - 07-18-2017, 06:43 PM

Forum Jump:


Users browsing this thread: 2 Guest(s)