[Pkg-owncloud-commits] [owncloud] 286/394: Group name does't need to be sanitized before storing it in the database

David Prévot taffit at alioth.debian.org
Fri Nov 8 23:12:30 UTC 2013


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to annotated tag v4.5.10
in repository owncloud.

commit 25a051ffeb701b587d45f1ee27281eb127e0f125
Author: Bart Visscher <bartv at thisnet.nl>
Date:   Tue Nov 27 20:22:45 2012 +0100

    Group name does't need to be sanitized before storing it in the database
    
    It should only be sanitized before display
---
 settings/ajax/togglegroups.php    |    2 +-
 settings/ajax/togglesubadmins.php |    4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/settings/ajax/togglegroups.php b/settings/ajax/togglegroups.php
index 0c51f09..0b4fe9a 100644
--- a/settings/ajax/togglegroups.php
+++ b/settings/ajax/togglegroups.php
@@ -8,7 +8,7 @@ OCP\JSON::callCheck();
 
 $success = true;
 $username = $_POST["username"];
-$group = OC_Util::sanitizeHTML($_POST["group"]);
+$group = $_POST["group"];
 
 if($username == OC_User::getUser() && $group == "admin" &&  OC_Group::inGroup($username, 'admin')){
 	$l = OC_L10N::get('core');
diff --git a/settings/ajax/togglesubadmins.php b/settings/ajax/togglesubadmins.php
index 5f7126d..cab5dcf 100644
--- a/settings/ajax/togglesubadmins.php
+++ b/settings/ajax/togglesubadmins.php
@@ -7,7 +7,7 @@ OC_JSON::checkAdminUser();
 OCP\JSON::callCheck();
 
 $username = $_POST["username"];
-$group = OC_Util::sanitizeHTML($_POST["group"]);
+$group = $_POST["group"];
 
 // Toggle group
 if(OC_SubAdmin::isSubAdminofGroup($username, $group)) {
@@ -16,4 +16,4 @@ if(OC_SubAdmin::isSubAdminofGroup($username, $group)) {
 	OC_SubAdmin::createSubAdmin($username, $group);
 }
 
-OC_JSON::success();
\ No newline at end of file
+OC_JSON::success();

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git



More information about the Pkg-owncloud-commits mailing list