Detect and break a loop caused by a broken verification function on the
site we're trying to import from.
Patch by exor674.
diffs (25 lines):
diff -r 19537d7ee2cd -r e4790479f32c .hgtags
--- a/.hgtags Thu Aug 05 23:54:38 2010 +0800
+++ b/.hgtags Fri Aug 06 10:23:21 2010 +0800
@@ -17,3 +17,4 @@ ca48892d3115f048c996663bf35fc8b0830c6b0d
ca48892d3115f048c996663bf35fc8b0830c6b0d 0.11.1
d1c9cbbd12cce61b281263d7c4e51b60de0c1144 0.12.0
000849cd050cc97c67d2756d04fd6e9935e41eb4 0.12.1
+19537d7ee2cd99067e979750dd6886463aa86a21 0.12.2
diff -r 19537d7ee2cd -r e4790479f32c
cgi-bin/DW/Worker/ContentImporter/LiveJournal.pm
--- a/cgi-bin/DW/Worker/ContentImporter/LiveJournal.pm Thu Aug 05 23:54:38
2010 +0800
+++ b/cgi-bin/DW/Worker/ContentImporter/LiveJournal.pm Fri Aug 06 10:23:21
2010 +0800
@@ -435,8 +435,11 @@ sub call_xmlrpc {
my $chal;
while ( ! $chal ) {
- my $get_chal = $class->xmlrpc_call_helper( $opts, $xmlrpc,
'LJ.XMLRPC.getchallenge' );
- $chal = $get_chal->{challenge};
+ my $res = $class->xmlrpc_call_helper( $opts, $xmlrpc,
'LJ.XMLRPC.getchallenge', $depth );
+ if ( $res && $res->{fault} ) {
+ return $res;
+ }
+ $chal = $res->{challenge};
}
my $response = md5_hex( $chal . ( $opts->{md5password} ||
$opts->{password_md5} || md5_hex( $opts->{password} ) ) );
_______________________________________________
dw-changelog mailing list
[email protected]
http://lists.dwscoalition.org/mailman/listinfo/dw-changelog