=========================================================== .___ __ __ _________________ __ __ __| _/|__|/ |_ / ___\_` __ \__ \ | | \/ __ | | \\_ __\ / /_/ > | \// __ \| | / /_/ | | || | \___ /|__| (____ /____/\____ | |__||__| /_____/ \/ \/ grep rough audit - static analysis tool v2.8 written by @Wireghoul =================================[justanotherhacker.com]=== php-horde-content-2.0.6/content-2.0.6/lib/Tagger.php-111- foreach ($this->ensureTags($tags) as $tagId) { php-horde-content-2.0.6/content-2.0.6/lib/Tagger.php:112: if (!$this->_db->selectValue('SELECT 1 from ' . $this->_t('tagged') . ' WHERE user_id = ? AND object_id = ? AND tag_id = ?', array((int)$userId, (int)$objectId, (int)$tagId))) { php-horde-content-2.0.6/content-2.0.6/lib/Tagger.php-113- try { ############################################## php-horde-content-2.0.6/content-2.0.6/lib/Tagger.php-121- // increment tag stats php-horde-content-2.0.6/content-2.0.6/lib/Tagger.php:122: if (!$this->_db->update('UPDATE ' . $this->_t('tag_stats') . ' SET count = count + 1 WHERE tag_id = ' . (int)$tagId)) { php-horde-content-2.0.6/content-2.0.6/lib/Tagger.php-123- $this->_db->insert('INSERT INTO ' . $this->_t('tag_stats') . ' (tag_id, count) VALUES (' . (int)$tagId . ', 1)', null, null, 'tag_id', $tagId); ############################################## php-horde-content-2.0.6/content-2.0.6/lib/Tagger.php-126- // increment user-tag stats php-horde-content-2.0.6/content-2.0.6/lib/Tagger.php:127: if (!$this->_db->update('UPDATE ' . $this->_t('user_tag_stats') . ' SET count = count + 1 WHERE user_id = ' . (int)$userId . ' AND tag_id = ' . (int)$tagId)) { php-horde-content-2.0.6/content-2.0.6/lib/Tagger.php-128- $this->_db->insert('INSERT INTO ' . $this->_t('user_tag_stats') . ' (user_id, tag_id, count) VALUES (' . (int)$userId . ', ' . (int)$tagId . ', 1)'); ############################################## php-horde-content-2.0.6/content-2.0.6/lib/Tagger.php-147- foreach ($this->ensureTags($tags) as $tagId) { php-horde-content-2.0.6/content-2.0.6/lib/Tagger.php:148: if ($this->_db->delete('DELETE FROM ' . $this->_t('tagged') . ' WHERE user_id = ? AND object_id = ? AND tag_id = ?', array($userId, $objectId, $tagId))) { php-horde-content-2.0.6/content-2.0.6/lib/Tagger.php:149: $this->_db->update('UPDATE ' . $this->_t('tag_stats') . ' SET count = count - 1 WHERE tag_id = ?', array($tagId)); php-horde-content-2.0.6/content-2.0.6/lib/Tagger.php:150: $this->_db->update('UPDATE ' . $this->_t('user_tag_stats') . ' SET count = count - 1 WHERE user_id = ? AND tag_id = ?', array($userId, $tagId)); php-horde-content-2.0.6/content-2.0.6/lib/Tagger.php-151- } ############################################## php-horde-content-2.0.6/content-2.0.6/lib/Tagger.php-175- // Get the users who have tagged this so we can update the stats php-horde-content-2.0.6/content-2.0.6/lib/Tagger.php:176: $users = $this->_db->selectValues('SELECT user_id, tag_id FROM ' . $this->_t('tagged') . ' WHERE object_id = ? AND tag_id = ?', array($objectId, $tagId)); php-horde-content-2.0.6/content-2.0.6/lib/Tagger.php-177- php-horde-content-2.0.6/content-2.0.6/lib/Tagger.php-178- // Delete the tags php-horde-content-2.0.6/content-2.0.6/lib/Tagger.php:179: if ($this->_db->delete('DELETE FROM ' . $this->_t('tagged') . ' WHERE object_id = ? AND tag_id = ?', array($objectId, $tagId))) { php-horde-content-2.0.6/content-2.0.6/lib/Tagger.php-180- // Update the stats php-horde-content-2.0.6/content-2.0.6/lib/Tagger.php:181: $this->_db->update('UPDATE ' . $this->_t('tag_stats') . ' SET count = count - ' . count($users) . ' WHERE tag_id = ?', array($tagId)); php-horde-content-2.0.6/content-2.0.6/lib/Tagger.php:182: $this->_db->update('UPDATE ' . $this->_t('user_tag_stats') . ' SET count = count - 1 WHERE user_id IN(' . str_repeat('?, ', count($users) - 1) . '?) AND tag_id = ?', array_merge($users, array($tagId))); php-horde-content-2.0.6/content-2.0.6/lib/Tagger.php-183- ############################################## php-horde-content-2.0.6/content-2.0.6/lib/Tagger.php-266- $args['userId'] = current($this->_userManager->ensureUsers($args['userId'])); php-horde-content-2.0.6/content-2.0.6/lib/Tagger.php:267: $sql = 'SELECT DISTINCT t.tag_id AS tag_id, tag_name FROM ' . $this->_t('tagged') . ' tagged INNER JOIN ' . $this->_t('tags') . ' t ON tagged.tag_id = t.tag_id WHERE tagged.user_id = ' . (int)$args['userId']; php-horde-content-2.0.6/content-2.0.6/lib/Tagger.php-268- $haveWhere = true; ############################################## php-horde-content-2.0.6/content-2.0.6/lib/Tagger.php-275- php-horde-content-2.0.6/content-2.0.6/lib/Tagger.php:276: $inner = $this->_db->addLimitOffset('SELECT object_id FROM ' . $this->_t('tagged') . ' WHERE tag_id = ' . (int)$args['tagId'], array('limit' => $radius)); php-horde-content-2.0.6/content-2.0.6/lib/Tagger.php-277- $sql = $this->_db->addLimitOffset('SELECT DISTINCT tagged2.tag_id AS tag_id, tag_name FROM (' . $inner . ') tagged1 INNER JOIN ' . $this->_t('tagged') . ' tagged2 ON tagged1.object_id = tagged2.object_id INNER JOIN ' . $this->_t('tags') . ' t ON tagged2.tag_id = t.tag_id', array('limit' => $args['limit'])); ############################################## php-horde-content-2.0.6/content-2.0.6/lib/Tagger.php-326- // This doesn't use a stat table, so may be slow. php-horde-content-2.0.6/content-2.0.6/lib/Tagger.php:327: $sql = 'SELECT t.tag_id AS tag_id, tag_name, COUNT(*) AS count FROM ' . $this->_t('tagged') . ' tagged INNER JOIN ' . $this->_t('objects') . ' objects ON tagged.object_id = objects.object_id AND objects.type_id IN (' . implode(',', $args['typeId']) . ') INNER JOIN ' . $this->_t('tags') . ' t ON tagged.tag_id = t.tag_id WHERE tagged.user_id = ' . (int)$args['userId'] . ' GROUP BY t.tag_id, t.tag_name'; php-horde-content-2.0.6/content-2.0.6/lib/Tagger.php-328- } elseif (isset($args['userId'])) { ############################################## php-horde-content-2.0.6/content-2.0.6/lib/Tagger.php-381- $args['userId'] = current($this->_userManager->ensureUsers($args['userId'])); php-horde-content-2.0.6/content-2.0.6/lib/Tagger.php:382: $sql .= ' WHERE tagged.user_id = ' . (int)$args['userId']; php-horde-content-2.0.6/content-2.0.6/lib/Tagger.php-383- } ############################################## php-horde-content-2.0.6/content-2.0.6/lib/Tagger.php-421- 'SELECT tag_id, object_id FROM ' . $this->_t('tagged') php-horde-content-2.0.6/content-2.0.6/lib/Tagger.php:422: . ' WHERE object_id = ' . (int)$args['objectId'], php-horde-content-2.0.6/content-2.0.6/lib/Tagger.php-423- array('limit' => $radius)); ############################################## php-horde-content-2.0.6/content-2.0.6/lib/Tagger.php-460- php-horde-content-2.0.6/content-2.0.6/lib/Tagger.php:461: $sql .= ' WHERE tagged.tag_id = ' . (int)$tags[0]; php-horde-content-2.0.6/content-2.0.6/lib/Tagger.php-462- ############################################## php-horde-content-2.0.6/content-2.0.6/lib/Tagger.php-582- $args['userId'] = current($this->_userManager->ensureUsers($args['userId'])); php-horde-content-2.0.6/content-2.0.6/lib/Tagger.php:583: $sql .= ' WHERE tagged.user_id = ' . (int)$args['userId']; php-horde-content-2.0.6/content-2.0.6/lib/Tagger.php-584- } ############################################## php-horde-content-2.0.6/content-2.0.6/lib/Tagger.php-600- $args['objectId'] = $this->_ensureObject($args['objectId']); php-horde-content-2.0.6/content-2.0.6/lib/Tagger.php:601: $sql = 'SELECT t.user_id, user_name FROM ' . $this->_t('tagged') . ' t INNER JOIN ' . $this->_t('users') . ' u ON t.user_id = u.user_id WHERE object_id = ' . (int)$args['objectId']; php-horde-content-2.0.6/content-2.0.6/lib/Tagger.php-602- } elseif (isset($args['userId'])) { ############################################## php-horde-content-2.0.6/content-2.0.6/lib/Tagger.php-604- $radius = isset($args['radius']) ? (int)$args['radius'] : $this->_defaultRadius; php-horde-content-2.0.6/content-2.0.6/lib/Tagger.php:605: $sql = 'SELECT others.user_id, user_name FROM ' . $this->_t('tagged') . ' others INNER JOIN ' . $this->_t('users') . ' u ON u.user_id = others.user_id INNER JOIN (SELECT tag_id FROM ' . $this->_t('tagged') . ' WHERE user_id = ' . (int)$args['userId'] . ' GROUP BY tag_id HAVING COUNT(tag_id) >= ' . $radius . ') self ON others.tag_id = self.tag_id GROUP BY others.user_id'; php-horde-content-2.0.6/content-2.0.6/lib/Tagger.php-606- } elseif (isset($args['tagId'])) { ############################################## php-horde-content-2.0.6/content-2.0.6/lib/Tagger.php-629- php-horde-content-2.0.6/content-2.0.6/lib/Tagger.php:630: $sql .= ' WHERE tagged.tag_id = ' . (int)$tags[0]; php-horde-content-2.0.6/content-2.0.6/lib/Tagger.php-631- ############################################## php-horde-content-2.0.6/content-2.0.6/lib/Tagger.php-683- $radius = isset($args['radius']) ? (int)$args['radius'] : $this->_defaultRadius; php-horde-content-2.0.6/content-2.0.6/lib/Tagger.php:684: $sql = 'SELECT others.user_id, (others.count - self.count) AS rank FROM ' . $this->_t('user_tag_stats') . ' others INNER JOIN (SELECT tag_id, count FROM ' . $this->_t('user_tag_stats') . ' WHERE user_id = ' . (int)$args['userId'] . ' AND count >= ' . $radius . ') self ON others.tag_id = self.tag_id ORDER BY rank DESC'; php-horde-content-2.0.6/content-2.0.6/lib/Tagger.php-685-