summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Util.pm
diff options
context:
space:
mode:
authorDavid Lawrence <dkl@mozilla.com>2015-04-24 17:56:26 +0200
committerDavid Lawrence <dkl@mozilla.com>2015-04-24 17:56:26 +0200
commit283be21f66e638667bc2ec7720cab459ecf1f698 (patch)
treecdbfbb79d503373bb2058a96f369cf75542dbe3b /Bugzilla/Util.pm
parented92da4fed393bb0f645f7bad022d49fed336a2f (diff)
downloadbugzilla-283be21f66e638667bc2ec7720cab459ecf1f698.tar.gz
bugzilla-283be21f66e638667bc2ec7720cab459ecf1f698.tar.xz
Bug 1157395: CSRF in log in form
Diffstat (limited to 'Bugzilla/Util.pm')
-rw-r--r--Bugzilla/Util.pm10
1 files changed, 8 insertions, 2 deletions
diff --git a/Bugzilla/Util.pm b/Bugzilla/Util.pm
index 2349dc9e9..67798d470 100644
--- a/Bugzilla/Util.pm
+++ b/Bugzilla/Util.pm
@@ -36,8 +36,8 @@ use base qw(Exporter);
detaint_signed
html_quote url_quote xml_quote
css_class_quote html_light_quote
- i_am_cgi i_am_webservice correct_urlbase remote_ip validate_ip
- do_ssl_redirect_if_required use_attachbase
+ i_am_cgi i_am_webservice correct_urlbase remote_ip
+ validate_ip do_ssl_redirect_if_required use_attachbase
diff_arrays on_main_db
trim wrap_hard wrap_comment find_wrap_point
format_time validate_date validate_time datetime_from
@@ -875,6 +875,7 @@ Bugzilla::Util - Generic utility functions for bugzilla
# Functions that tell you about your environment
my $is_cgi = i_am_cgi();
+ my $is_webservice = i_am_webservice();
my $urlbase = correct_urlbase();
# Data manipulation
@@ -1004,6 +1005,11 @@ Tells you whether or not you are being run as a CGI script in a web
server. For example, it would return false if the caller is running
in a command-line script.
+=item C<i_am_webservice()>
+
+Tells you whether or not the current usage mode is WebServices related
+such as JSONRPC or XMLRPC.
+
=item C<correct_urlbase()>
Returns either the C<sslbase> or C<urlbase> parameter, depending on the