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
Registration
#1
Hi,

I'm currently testing the registration form and the Username requires "No Spaces or Special Characters - Min 5 characters", but there is no check for spaces or special chars. Thus I included an new rule in "join.php", i.e.
Code:
'no_special_char' => true,
And in "Validate.php" I then added:
<pre>
Code:
case 'no_special_char':
    if (!ctype_alnum($value)) {
       $this->addError(["{$display} must not contain special characters or spaces.",$item]);
    }
    break;
</pre>


Further, I found that it is not possible to use passwords containing some special chars, e.g. mypassword§${3bc1fe685386cc4c3ab89a3f76566d8931e181ad17f08aed9ad73b30bf28114d}, the validation says "Password and Confirm must match". Thus I found in "Validate.php" that the "$value" is sanitized, which is essentially the "htmlentities" check in "helpers.php". But, for the "match" case "$source[$rule_value]" is not sanitized. Thus I simply applied the sanitize function to "$source[$rule_value]" and everything works fine.

Cheers,
Sebastian
  Reply


Messages In This Thread
Registration - by Sebastian - 05-30-2016, 11:09 AM
Registration - by danh - 05-30-2016, 12:48 PM
Registration - by Trioxin - 09-05-2016, 05:33 PM
Registration - by mudmin - 09-06-2016, 02:12 PM

Forum Jump:


Users browsing this thread: 2 Guest(s)