summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
ad5f4f1)
I also tried setting RPC::XML::ENCODING but that did not prevent the crash,
and it seems that blogspam.net doesn't like getting xml encoded in unicode,
since it mis-flagged comments as spammy that way that are normally allowed
through.
use warnings;
use strict;
use IkiWiki 3.00;
use warnings;
use strict;
use IkiWiki 3.00;
my $defaulturl='http://test.blogspam.net:8888/';
my $defaulturl='http://test.blogspam.net:8888/';
my $url=$defaulturl;
$url = $config{blogspam_server} if exists $config{blogspam_server};
my $url=$defaulturl;
$url = $config{blogspam_server} if exists $config{blogspam_server};
my $client = RPC::XML::Client->new($url);
my @options = split(",", $config{blogspam_options})
my $client = RPC::XML::Client->new($url);
my @options = split(",", $config{blogspam_options})
my %req=(
ip => $session->remote_addr(),
my %req=(
ip => $session->remote_addr(),
- comment => defined $params{diff} ? $params{diff} : $params{content},
- subject => defined $params{subject} ? $params{subject} : "",
- name => defined $params{author} ? $params{author} : "",
- link => exists $params{url} ? $params{url} : "",
+ comment => encode_utf8(defined $params{diff} ? $params{diff} : $params{content}),
+ subject => encode_utf8(defined $params{subject} ? $params{subject} : ""),
+ name => encode_utf8(defined $params{author} ? $params{author} : ""),
+ link => encode_utf8(exists $params{url} ? $params{url} : ""),
options => join(",", @options),
options => join(",", @options),
+ site => encode_utf8($config{url}),
version => "ikiwiki ".$IkiWiki::version,
);
my $res = $client->send_request('testComment', \%req);
version => "ikiwiki ".$IkiWiki::version,
);
my $res = $client->send_request('testComment', \%req);
* actiontabs: Improve tab padding.
* blueview: Fix display of links to translated pages in the page header.
* Set isPermaLink="no" for guids in rss feeds.
* actiontabs: Improve tab padding.
* blueview: Fix display of links to translated pages in the page header.
* Set isPermaLink="no" for guids in rss feeds.
+ * blogspam: Fix crash when content contained utf-8.
-- Joey Hess <joeyh@debian.org> Tue, 07 Sep 2010 12:08:05 -0400
-- Joey Hess <joeyh@debian.org> Tue, 07 Sep 2010 12:08:05 -0400
The interesting part is that the comment preview works fine, just the save fails. Probably
this means that the blogspam plugin is the culprit (hence the error in RPC::XML::Client library).
I'm using version 3.20100815~bpo50+. Thanks!
The interesting part is that the comment preview works fine, just the save fails. Probably
this means that the blogspam plugin is the culprit (hence the error in RPC::XML::Client library).
I'm using version 3.20100815~bpo50+. Thanks!
+
+> I've filed an upstream bug about this on RPC::XML:
+> <https://rt.cpan.org/Ticket/Display.html?id=61333>
+>
+> Worked around it in blogspam by decoding. --[[Joey]]