You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've swapped line 106 in my installations login-nocaptcha.php
from
return trim(filter_var($string, FILTER_SANITIZE_STRING)); //must consist of valid string characters
to
return trim(htmlspecialchars(strip_tags($string), ENT_QUOTES, null, false));
My messy testing file is which shows some of the differences, FILTER_SANITIZE_FULL_SPECIAL_CHARS seems to act quite differently with tags:
`
$strings = array();
$strings[] =" Start Tags: SingleQuote:'".' Tag With Attribute:<span="classname"> Encoded Less Than:< End';
$strings[] ='Start DoubleQuote:" End ';
$strings[] ='Start 中文 End ';
foreach($strings as $string){
In PHP 8.1 FILTER_SANITIZE_STRING seems to be deprecated.
They suggest swapping for htmlspecialchars but that doesn't seem to be an exact swap.
https://www.php.net/manual/en/filter.filters.sanitize.php
I've swapped line 106 in my installations login-nocaptcha.php
from
return trim(filter_var($string, FILTER_SANITIZE_STRING)); //must consist of valid string characters
to
return trim(htmlspecialchars(strip_tags($string), ENT_QUOTES, null, false));
There is a discussion on stack overflow here https://stackoverflow.com/questions/69207368/constant-filter-sanitize-string-is-deprecated
My messy testing file is which shows some of the differences, FILTER_SANITIZE_FULL_SPECIAL_CHARS seems to act quite differently with tags:
`
$strings = array();
$strings[] =" Start Tags: SingleQuote:'".' Tag With Attribute:<span="classname"> Encoded Less Than:< End';
$strings[] ='Start DoubleQuote:" End ';
$strings[] ='Start 中文 End ';
foreach($strings as $string){
`
The text was updated successfully, but these errors were encountered: