summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Template.pm
diff options
context:
space:
mode:
authorDave Lawrence <dlawrence@mozilla.com>2013-10-25 21:00:45 +0200
committerDave Lawrence <dlawrence@mozilla.com>2013-10-25 21:00:45 +0200
commit9c5c3b20f521097f106b37fa9fa1c67ecd50f167 (patch)
treeabda009ec13da7749f887f3ad4efef19ff8ee14e /Bugzilla/Template.pm
parentbc3208378008a78c3cc2494eecd7f5144c7c79fa (diff)
downloadbugzilla-9c5c3b20f521097f106b37fa9fa1c67ecd50f167.tar.gz
bugzilla-9c5c3b20f521097f106b37fa9fa1c67ecd50f167.tar.xz
Bug 921523 - backport upstream bug 917669 to bmo/4.2 to throw error when invalid cookies/tokens are used with webservices
Diffstat (limited to 'Bugzilla/Template.pm')
-rw-r--r--Bugzilla/Template.pm5
1 files changed, 1 insertions, 4 deletions
diff --git a/Bugzilla/Template.pm b/Bugzilla/Template.pm
index b529caf89..c3839b11b 100644
--- a/Bugzilla/Template.pm
+++ b/Bugzilla/Template.pm
@@ -832,10 +832,7 @@ sub create {
# (Wrapping the message in the WebService is unnecessary
# and causes awkward things like \n's appearing in error
# messages in JSON-RPC.)
- unless (Bugzilla->usage_mode == USAGE_MODE_JSON
- or Bugzilla->usage_mode == USAGE_MODE_XMLRPC
- or Bugzilla->usage_mode == USAGE_MODE_REST)
- {
+ unless (i_am_webservice()) {
$var = wrap_comment($var, 72);
}
$var =~ s/\&nbsp;/ /g;