]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Escape argument to prevent SQL injection attack in
authorJoshua Wise <jwise@nvidia.com>
Tue, 16 Jul 2013 17:47:29 +0000 (10:47 -0700)
committerEvan Prodromou <evan@e14n.com>
Tue, 16 Jul 2013 17:47:29 +0000 (10:47 -0700)
User::getTaggedSubscriptions()

This change escapes the $tag argument to prevent a SQL injection
attack in User::getTaggedSubscriptions(). The parameter was not
escaped higher up the stack, so this vulnerability could be exploited.

classes/User.php

index cd99a3dd4fe5d9034b2bb0e0aeb0c185e8265195..e8aaaf6a103c47d1d26a420a59b08b3354b2a67d 100644 (file)
@@ -758,7 +758,7 @@ class User extends Managed_DataObject
 
         $profile = new Profile();
 
-        $profile->query(sprintf($qry, $this->id, $tag));
+        $profile->query(sprintf($qry, $this->id, $profile->escape($tag)));
 
         return $profile;
     }