mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-02-07 16:41:48 +01:00
Merge branch 'develop' into 11.0_https
This commit is contained in:
@@ -130,6 +130,24 @@ class SecurityTest extends PHPUnit\Framework\TestCase
|
||||
print __METHOD__."\n";
|
||||
}
|
||||
|
||||
/**
|
||||
* testSetLang
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function testSetLang()
|
||||
{
|
||||
global $conf;
|
||||
$conf=$this->savconf;
|
||||
|
||||
$tmplangs = new Translate('', $conf);
|
||||
|
||||
$_SERVER['HTTP_ACCEPT_LANGUAGE'] = "' malicious text with quote";
|
||||
$tmplangs->setDefaultLang('auto');
|
||||
print __METHOD__.' $tmplangs->defaultlang='.$tmplangs->defaultlang."\n";
|
||||
$this->assertEquals($tmplangs->defaultlang, 'malicioustextwithquote_MALICIOUSTEXTWITHQUOTE');
|
||||
}
|
||||
|
||||
/**
|
||||
* testGETPOST
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user