Double feed URL escaping in update_daemon_common method of RSSUtils


#1

db_escape_string is called twice for feed URL the update_daemon_common method of RSSUtils class. Conflicted lines:

  • line 143 and line 154 that results in incorrect feed URL in the logs.
  • line 143 and line 180 that can produce empty DB query result => no feeds have found => no feed have updated.

Patch example:

--- a/classes/rssutils.php
+++ b/classes/rssutils.php
@@ -140,7 +140,7 @@ class RSSUtils {
                // Here is a little cache magic in order to minimize risk of double feed updates.
                $feeds_to_update = array();
                while ($line = db_fetch_assoc($result)) {
-                       array_push($feeds_to_update, db_escape_string($line['feed_url']));
+                       array_push($feeds_to_update, $line['feed_url']);
                }
 
                // We update the feed last update started date before anything else.

#2

i wonder was i drunk when i wrote that or was it some pull request because holy lol at the broken english in comments

		// We update the feed last update started date before anything else.
		// There is no lag due to feed contents downloads
		// It prevent an other process to update the same feed.

what

anyway thanks for the heads up, i guess not many people have quote characters in their feeds