Skip to content
Snippets Groups Projects
Commit 59fd4c05 authored by Ghislain Loas's avatar Ghislain Loas
Browse files

hotline #36925 fix sql error when inserting special char

parent 261a1444
Branches
Tags
10 merge requests!1587Master,!1553Master,!1519Master,!1502Master,!1501Stable,!1491Master,!1490Hotline master,!1472Stable,!1468Stable,!1459Hotline#36925 admin users index
......@@ -48,7 +48,14 @@ class Admin_UsersController extends ZendAfi_Controller_Action {
? $this->_getParam('by_role_level', 'all')
: $this->_getParam('by_role_level', ZendAfi_Acl_AdminControllerRoles::ABONNE_SIGB);
$search_value = $this->_getParam('search_for', null);
$search_value = str_replace(["\000",
"\n",
"\r",
"\"",
"\'",
"'",
"\032"], '', $this->_getParam('search_for', null));
$valide_subscription = $this->_getParam('by_valide_subscription', null);
$limit = ['limitPage' => [$this->view->page, 20]];
......
......@@ -144,7 +144,7 @@ class UsersControllerIndexTest extends UsersControllerWithMarcusTestCase {
->beStrict();
$this->dispatch('/admin/users?by_id_site=all&by_role_level=2&by_valide_subscription=1&search_for=francis', true);
$this->dispatch('/admin/users?by_id_site=all&by_role_level=2&by_valide_subscription=1&search_for=\"\'fra"n\'cis"', true);
}
......
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