]> git.wh0rd.org Git - tt-rss.git/commitdiff
escape fetch error message before saving in the db (closes #550)
authorAndrew Dolgov <fox@madoka.volgo-balt.ru>
Mon, 11 Mar 2013 10:14:28 +0000 (14:14 +0400)
committerAndrew Dolgov <fox@madoka.volgo-balt.ru>
Mon, 11 Mar 2013 10:14:28 +0000 (14:14 +0400)
include/rssfuncs.php

index 2b13f9457191a4246f2e1c6ba4632cff9216a5f6..0b1d06564c3d93547f7b1f4a7635e473d28d22b9 100644 (file)
                                _debug("update_rss_feed: unable to fetch: $fetch_last_error");
                        }
 
+                       $error_escaped = db_escape_string($fetch_last_error);
+
                        db_query($link,
-                               "UPDATE ttrss_feeds SET last_error = '$fetch_last_error',
+                               "UPDATE ttrss_feeds SET last_error = '$error_escaped',
                                        last_updated = NOW() WHERE id = '$feed'");
 
                        return;