]> git.donarmstrong.com Git - infobot.git/blobdiff - src/Modules/RSSFeeds.pl
* Security patch for binmode UTF8 handling for CVE-2007-5116
[infobot.git] / src / Modules / RSSFeeds.pl
index 2697faf056de58753edb251f383df5a2604d7b0e..035ea981a3f86bad9ef88f2ee2b6b260f7e2f15f 100644 (file)
@@ -19,7 +19,7 @@ sub getCacheEntry {
        &::DEBUG("rssFeed: Searching cache for $url");
 
        open CACHE, "<$file" or return;
-       binmode( CACHE, ":utf8" );
+       binmode( CACHE, ":encoding(UTF-8)" );
 
        while (<CACHE>) {
                next unless /^$url:/;
@@ -38,8 +38,8 @@ sub saveCache {
        open IN,  "<$file"     or return;
        open OUT, ">$file.tmp" or return;
 
-       binmode( IN,  ":utf8" );
-       binmode( OUT, ":utf8" );
+       binmode( IN,  ":encoding(UTF-8)" );
+       binmode( OUT, ":encoding(UTF-8)" );
 
        # copy all but old ones
        while (<IN>) {
@@ -159,4 +159,5 @@ sub RSS {
 }
 
 1;
-# vim: ts=2 sw=2
+
+# vim:ts=4:sw=4:expandtab:tw=80