Skip to content
Snippets Groups Projects
Commit c3c63298 authored by Laurent's avatar Laurent
Browse files

Merge branch 'hotline#86891_vulnerabilites_bokeh' into 'hotline'

hotline #86891: XSS vulnerabilities in search queries

See merge request !3104
parents c64ac9f0 5bc04964
Branches
Tags
5 merge requests!3297WIP: Master,!3107Master,!3106Master,!3105Hotline,!3104hotline #86891: XSS vulnerabilities in search queries
Pipeline #6883 failed with stage
in 31 minutes and 37 seconds
- ticket #86891 : Correction de faille de sécurité sur le moteur de recherche
\ No newline at end of file
......@@ -102,7 +102,7 @@ class Class_CriteresRecherche_ValidatorInArray {
public function isValid($key, $params) {
return in_array($params[$key], $this->_possibles);
return is_numeric($params[$key]) && in_array($params[$key], $this->_possibles);
}
}
......
......@@ -115,4 +115,13 @@ class Security_SearchTest extends AbstractControllerTestCase {
$this->dispatch('/recherche/simple?' . http_build_query(['expressionRecherche' => '1 <script>_q_q=random()</script>']));
$this->assertNotContains('1 <script>_q_q=random()</script>', $this->_response->getBody());
}
/** @test */
public function mysqlShouldNotCrashOnInvalidSectionId() {
$this->fixture('Class_CodifSection',
['id' => 1,
'libelle' => 'adultes']);
$this->dispatch('/recherche/simple?section=1\'');
}
}
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment