mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-01-06 00:53:00 +01:00
FIX missing token and save of survey description
This commit is contained in:
@@ -508,6 +508,7 @@ function GETPOST($paramname, $check = 'none', $method = 0, $filter = null, $opti
|
||||
// We do this only if var is a GET. If it is a POST, may be we want to post the text with vars as the setup text.
|
||||
if (!is_array($out) && empty($_POST[$paramname]) && empty($noreplace))
|
||||
{
|
||||
$reg = array();
|
||||
$maxloop = 20; $loopnb = 0; // Protection against infinite loop
|
||||
while (preg_match('/__([A-Z0-9]+_?[A-Z0-9]+)__/i', $out, $reg) && ($loopnb < $maxloop)) // Detect '__ABCDEF__' as key 'ABCDEF' and '__ABC_DEF__' as key 'ABC_DEF'. Detection is also correct when 2 vars are side by side.
|
||||
{
|
||||
@@ -5579,7 +5580,7 @@ function dol_string_onlythesehtmltags($stringtoclean, $cleanalsosomestyles = 1)
|
||||
$allowed_tags_string = '<'.$allowed_tags_string.'>';
|
||||
|
||||
if ($cleanalsosomestyles) {
|
||||
$stringtoclean = preg_replace('/position\s*:\s*(absolute|fixed)\s*!\s*important/', '', $stringtoclean); // Note: If hacker try to introduce css comment into string to avoid this, string should be encoded by the dol_htmlentitiesbr so be harmless
|
||||
$stringtoclean = preg_replace('/position\s*:\s*(absolute|fixed)\s*!\s*important/', '', $stringtoclean); // Note: If hacker try to introduce css comment into string to bypass this regex, the string must also be encoded by the dol_htmlentitiesbr during output so it become harmless
|
||||
}
|
||||
|
||||
$temp = strip_tags($stringtoclean, $allowed_tags_string);
|
||||
|
||||
Reference in New Issue
Block a user