diff options
author | Andrew Dolgov <[email protected]> | 2015-12-05 03:10:57 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2015-12-05 03:10:57 +0300 |
commit | 24e6ff5d1c29654fad74666a6d1bd061cf15cd30 (patch) | |
tree | 8296ca8a49f9e369295328ee256d140489bc5481 /include/rssfuncs.php | |
parent | bfd902bbcc349757f656baa169cda4ae6dd72de9 (diff) |
calculate_article_hash: strip tags before hashing fields
Diffstat (limited to 'include/rssfuncs.php')
-rwxr-xr-x | include/rssfuncs.php | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/include/rssfuncs.php b/include/rssfuncs.php index af4762c7f..115d9c9c2 100755 --- a/include/rssfuncs.php +++ b/include/rssfuncs.php @@ -9,7 +9,11 @@ foreach ($article as $k => $v) { if ($k != "feed" && isset($v)) { - $tmp .= sha1("$k:" . (is_array($v) ? implode(",", $v) : $v)); + $x = strip_tags(is_array($v) ? implode(",", $v) : $v); + + //_debug("$k:" . sha1($x) . ":" . htmlspecialchars($x), true); + + $tmp .= sha1("$k:" . sha1($x)); } } @@ -1043,6 +1047,8 @@ SET score = '$score' WHERE ref_id = '$ref_id'"); if ($mark_unread_on_update) { + _debug("article updated, marking unread as requested.", $debug_enabled); + db_query("UPDATE ttrss_user_entries SET last_read = null, unread = true WHERE ref_id = '$ref_id'"); } |