forked from Wavyzz/dolibarr
Merge branch '13.0' of git@github.com:Dolibarr/dolibarr.git into develop
Conflicts: htdocs/accountancy/bookkeeping/list.php htdocs/accountancy/bookkeeping/listbysubaccount.php htdocs/accountancy/class/accountancyexport.class.php htdocs/user/class/usergroup.class.php
This commit is contained in:
@@ -675,7 +675,7 @@ function checkVal($out = '', $check = 'alphanohtml', $filter = null, $options =
|
||||
case 'nohtml':
|
||||
$out = dol_string_nohtmltag($out, 0);
|
||||
break;
|
||||
case 'alpha': // No html and no " and no ../
|
||||
case 'alpha': // No html and no ../ and " replaced with ''
|
||||
case 'alphanohtml': // Recommended for most scalar parameters and search parameters
|
||||
if (!is_array($out)) {
|
||||
// '"' is dangerous because param in url can close the href= or src= and add javascript functions.
|
||||
@@ -686,6 +686,14 @@ function checkVal($out = '', $check = 'alphanohtml', $filter = null, $options =
|
||||
$out = dol_string_nohtmltag($out, 0);
|
||||
}
|
||||
break;
|
||||
case 'alphawithlgt': // No " and no ../ but we keep < > tags
|
||||
if (!is_array($out)) {
|
||||
// '"' is dangerous because param in url can close the href= or src= and add javascript functions.
|
||||
// '../' is dangerous because it allows dir transversals
|
||||
$out = str_replace(array('"', '"'), "", trim($out));
|
||||
$out = str_replace(array('../'), '', $out);
|
||||
}
|
||||
break;
|
||||
case 'restricthtml': // Recommended for most html textarea
|
||||
$out = dol_string_onlythesehtmltags($out, 0, 1, 1);
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user