mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-08-07 01:03:31 +02:00
issue #1150 also protect groupe name on API methods
This commit is contained in:
@@ -61,7 +61,7 @@ SELECT
|
|||||||
*/
|
*/
|
||||||
function ws_groups_add($params, &$service)
|
function ws_groups_add($params, &$service)
|
||||||
{
|
{
|
||||||
$params['name'] = pwg_db_real_escape_string($params['name']);
|
$params['name'] = pwg_db_real_escape_string(strip_tags(stripslashes($params['name'])));
|
||||||
|
|
||||||
// is the name not already used ?
|
// is the name not already used ?
|
||||||
$query = '
|
$query = '
|
||||||
@@ -180,7 +180,7 @@ SELECT COUNT(*)
|
|||||||
|
|
||||||
if (!empty($params['name']))
|
if (!empty($params['name']))
|
||||||
{
|
{
|
||||||
$params['name'] = pwg_db_real_escape_string($params['name']);
|
$params['name'] = pwg_db_real_escape_string(strip_tags(stripslashes($params['name'])));
|
||||||
|
|
||||||
// is the name not already used ?
|
// is the name not already used ?
|
||||||
$query = '
|
$query = '
|
||||||
|
|||||||
Reference in New Issue
Block a user