fu: Close-up of Fu, bringing a scoop of water to her mouth (Default)
fu ([personal profile] fu) wrote in [site community profile] changelog2010-08-17 04:18 am

[dw-free] clean up error logs

[commit: http://hg.dwscoalition.org/dw-free/rev/c90874268293]

http://bugs.dwscoalition.org/show_bug.cgi?id=2812

Be more lax when checking whether the topicurl from the subscription matches
that in the DB. Account for escaping and make the match case insensitive.

Patch by [personal profile] kareila.

Files modified:
  • htdocs/misc/hubbub.bml
--------------------------------------------------------------------------------
diff -r a36081550f4a -r c90874268293 htdocs/misc/hubbub.bml
--- a/htdocs/misc/hubbub.bml	Tue Aug 17 11:48:44 2010 +0800
+++ b/htdocs/misc/hubbub.bml	Tue Aug 17 12:18:12 2010 +0800
@@ -19,6 +19,7 @@ _c?><?_code
     use strict;
     use vars qw/ %GET %POST /;
     use LJ::SynSuck;
+    use CGI::Util qw( unescape );
 
     # general purpose handler sub
     my $ret = sub {
@@ -84,7 +85,7 @@ _c?><?_code
     # if the topic url doesn't match, then that's a terrible thing and we're not sure
     # why, so log extra information
     return $err->( 'topic_url mismatch: db=' . $topicurldb . ', hub=' . $topicurl )
-        unless $topicurl eq $topicurldb;
+        unless lc unescape( $topicurl ) eq lc $topicurldb;
 
     # validate the user is still valid (didn't get suspended or anything)
     my $u = LJ::load_userid( $uid ) or return $fail->( 'failed to load user' );
--------------------------------------------------------------------------------