From 6225b5ec869922a8e292610794bfda0f4dfdd77d Mon Sep 17 00:00:00 2001 From: Thomas Tanghus Date: Thu, 2 Feb 2012 17:53:46 +0100 Subject: [PATCH] More in-/output sanitation, --- apps/contacts/ajax/createaddressbook.php | 2 +- apps/contacts/templates/part.chooseaddressbook.rowfields.php | 2 +- apps/contacts/templates/part.editaddressbook.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/contacts/ajax/createaddressbook.php b/apps/contacts/ajax/createaddressbook.php index edcf794f497..3d766b6a60a 100644 --- a/apps/contacts/ajax/createaddressbook.php +++ b/apps/contacts/ajax/createaddressbook.php @@ -15,7 +15,7 @@ OC_JSON::checkLoggedIn(); OC_JSON::checkAppEnabled('contacts'); $userid = OC_User::getUser(); -$bookid = OC_Contacts_Addressbook::add($userid, $_POST['name'], null); +$bookid = OC_Contacts_Addressbook::add($userid, strip_tags($_POST['name']), null); if(!$bookid) { OC_JSON::error(array('data' => array('message' => $l->t('Error adding addressbook.')))); OC_Log::write('contacts','ajax/createaddressbook.php: Error adding addressbook: '.$_POST['name'], OC_Log::ERROR); diff --git a/apps/contacts/templates/part.chooseaddressbook.rowfields.php b/apps/contacts/templates/part.chooseaddressbook.rowfields.php index 0cbfe2bf803..95a4b2362aa 100644 --- a/apps/contacts/templates/part.chooseaddressbook.rowfields.php +++ b/apps/contacts/templates/part.chooseaddressbook.rowfields.php @@ -1,5 +1,5 @@ "; - echo ""; + echo ""; echo "t("CardDav Link") . "\" class=\"action\">t("Download") . "\" class=\"action\">t("Edit") . "\" class=\"action\" onclick=\"Contacts.UI.Addressbooks.editAddressbook(this, " . $_['addressbook']["id"] . ");\">t("Delete") . "\" class=\"action\">"; diff --git a/apps/contacts/templates/part.editaddressbook.php b/apps/contacts/templates/part.editaddressbook.php index 48fe5c3b378..c1c585687c4 100644 --- a/apps/contacts/templates/part.editaddressbook.php +++ b/apps/contacts/templates/part.editaddressbook.php @@ -11,7 +11,7 @@ t('Displayname') ?> - +