ttkciar added a subscriber: ttkciar.
ttkciar added a comment.
Jeff Gage asked me to take a look on this problem. Here's a workaround, but
it's a bit icky:
```
*** xmlrpc.cgi 2014-10-24 17:16:49.137457470 -0700
--- xmlrpc.cgi 2014-10-24 20:54:20.652451329 -0700
*************** use Bugzilla::WebService::Server::XMLRPC
*** 22,27 ****
--- 22,29 ----
Bugzilla->usage_mode(USAGE_MODE_XMLRPC);
+ $ENV{'BUGZILLA_WORKAROUND_XMLRPC_ESC'} = 1; # TTK qv
https://phabricator.wikimedia.org/T815
+
# Fix the error code that SOAP::Lite uses for Perl errors.
local $SOAP::Constants::FAULT_SERVER;
$SOAP::Constants::FAULT_SERVER = ERROR_UNKNOWN_FATAL;
*** Bugzilla/Comment.pm 2014-10-24 20:17:09.771281474 -0700
--- Bugzilla/Comment.pm 2014-10-24 20:55:40.316457391 -0700
*************** sub body_full {
*** 156,161 ****
--- 156,165 ----
if ($params->{wrap} and !$self->already_wrapped) {
$body = wrap_comment($body);
}
+ if (defined($ENV{'BUGZILLA_WORKAROUND_XMLRPC_ESC'})) { # TTK qv
https://phabricator.wikimedia.org/T815
+ use bytes;
+ $body =~ s/([\x01-\x08\x0b\x0c\x0f-\x1f\x7f-\xff])/sprintf "\\x%02x",
ord($1)/ge;
+ }
return $body;
}
```
I ran it against a local instance of Bugzilla 4.4.4 and it appears to work,
though only on the comment text. Usernames and summaries with funky characters
will require further escaping:
[[ http://ciar.org/ttk/public/patch.bugzilla.2014-10-24.txt |
http://ciar.org/ttk/public/patch.bugzilla.2014-10-24.txt ]]
TASK DETAIL
https://phabricator.wikimedia.org/T815
REPLY HANDLER ACTIONS
Reply to comment or attach files, or !close, !claim, !unsubscribe or !assign
<username>.
To: ttkciar
Cc: wikibugs-l, chasemp, Dzahn, QChris, Aklapper, Qgil, luser, Amire80, jayvdb,
Liuxinyu970226, Petrb, ttkciar
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l