forked from Wavyzz/dolibarr
Merge branch '21.0' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
@@ -202,6 +202,13 @@ class SecurityTest extends CommonClassTest
|
||||
$result = testSqlAndScriptInject($test, 0);
|
||||
$this->assertGreaterThanOrEqual($expectedresult, $result, 'Error on testSqlAndScriptInject bbb');
|
||||
|
||||
$test='<marquee onbeforeintput="alert(1)">';
|
||||
$result=testSqlAndScriptInject($test, 0);
|
||||
$this->assertGreaterThanOrEqual($expectedresult, $result, 'Error on testSqlAndScriptInject onbeforeintput');
|
||||
$test='<marquee onbounce="alert(1)">';
|
||||
$result=testSqlAndScriptInject($test, 0);
|
||||
$this->assertGreaterThanOrEqual($expectedresult, $result, 'Error on testSqlAndScriptInject onbounce');
|
||||
|
||||
$test = '<SCRIPT SRC=http://xss.rocks/xss.js></SCRIPT>';
|
||||
$result = testSqlAndScriptInject($test, 0);
|
||||
$this->assertGreaterThanOrEqual($expectedresult, $result, 'Error on testSqlAndScriptInject ccc');
|
||||
@@ -702,6 +709,7 @@ class SecurityTest extends CommonClassTest
|
||||
// Must be allowed
|
||||
|
||||
global $leftmenu; // Used into strings to eval
|
||||
$conf->global->MAIN_FEATURES_LEVEL = 1;
|
||||
|
||||
$leftmenu = 'AAA';
|
||||
$result = dol_eval('$conf->currency && preg_match(\'/^(AAA|BBB)/\',$leftmenu)', 1, 1, '1');
|
||||
@@ -726,7 +734,7 @@ class SecurityTest extends CommonClassTest
|
||||
|
||||
$leftmenu = 'XXX';
|
||||
$conf->global->MAIN_FEATURES_LEVEL = 1; // Force for the case option is -1
|
||||
$string = '(isModEnabled("agenda") || isModEnabled("resource")) && getDolGlobalInt("MAIN_FEATURES_LEVEL") >= 0 && preg_match(\'/^(admintools|all|XXX)/\', $leftmenu)';
|
||||
$string = '(isModEnabled("user") || isModEnabled("resource")) && getDolGlobalInt("MAIN_FEATURES_LEVEL") >= 0 && preg_match(\'/^(admintools|all|XXX)/\', $leftmenu)';
|
||||
$result = dol_eval($string, 1, 1, '1');
|
||||
print "result17 = ".$result."\n";
|
||||
$this->assertTrue($result);
|
||||
|
||||
Reference in New Issue
Block a user