]> 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 16cfcc0610436b9e6e9cf4b18572b25e631ed780..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>) {