1
0
mirror of https://github.com/owncloudarchive/contacts.git synced 2025-01-18 07:52:21 +01:00

Contacts: sanitize input on adding groups.

This commit is contained in:
Thomas Tanghus 2012-11-22 19:34:31 +01:00
parent ddf2b4fdd6
commit 46c6ccafcc

View File

@ -13,9 +13,9 @@ OCP\JSON::callCheck();
require_once __DIR__.'/../loghandler.php';
$category = isset($_POST['category']) ? $_POST['category'] : null;
$category = isset($_POST['category']) ? trim(strip_tags($_POST['category'])) : null;
if(is_null($category)) {
if(is_null($category) || $category === "") {
bailOut(OCA\Contacts\App::$l10n->t('No category name given.'));
}