Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
bugzilla
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
etersoft
bugzilla
Commits
971d7345
Commit
971d7345
authored
Sep 06, 2006
by
mkanat%bugzilla.org
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 349764: Errors print out a whole HTML page, even when we're not in USAGE_MODE_BROWSER
Patch By Max Kanat-Alexander <mkanat@bugzilla.org> r=kevin.benton, a=myk
parent
7c689d36
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
12 deletions
+11
-12
CGI.pm
Bugzilla/CGI.pm
+7
-4
code-error.html.tmpl
template/en/default/global/code-error.html.tmpl
+2
-4
user-error.html.tmpl
template/en/default/global/user-error.html.tmpl
+2
-4
No files found.
Bugzilla/CGI.pm
View file @
971d7345
...
@@ -37,6 +37,7 @@ use CGI qw(-no_xhtml -oldstyle_urls :private_tempfiles :unique_headers SERVER_PU
...
@@ -37,6 +37,7 @@ use CGI qw(-no_xhtml -oldstyle_urls :private_tempfiles :unique_headers SERVER_PU
use
base
qw(CGI)
;
use
base
qw(CGI)
;
use
Bugzilla::
Constants
;
use
Bugzilla::
Error
;
use
Bugzilla::
Error
;
use
Bugzilla::
Util
;
use
Bugzilla::
Util
;
...
@@ -61,10 +62,12 @@ sub new {
...
@@ -61,10 +62,12 @@ sub new {
my
$self
=
$class
->
SUPER::
new
(
@args
);
my
$self
=
$class
->
SUPER::
new
(
@args
);
# This happens here so that command-line scripts don't spit out
if
(
Bugzilla
->
error_mode
eq
ERROR_MODE_WEBPAGE
)
{
# their errors in HTML format.
# This happens here so that command-line scripts don't spit out
require
CGI::
Carp
;
# their errors in HTML format.
import
CGI::
Carp
qw(fatalsToBrowser)
;
require
CGI::
Carp
;
import
CGI::
Carp
qw(fatalsToBrowser)
;
}
# Make sure our outgoing cookie list is empty on each invocation
# Make sure our outgoing cookie list is empty on each invocation
$self
->
{
Bugzilla_cookie_list
}
=
[]
;
$self
->
{
Bugzilla_cookie_list
}
=
[]
;
...
...
template/en/default/global/code-error.html.tmpl
View file @
971d7345
...
@@ -393,11 +393,9 @@
...
@@ -393,11 +393,9 @@
[% END %]
[% END %]
[% END %]
[% END %]
[%# If we are in ERROR_MODE_DIE, we want the error message to be plain text,
[%# We only want HTML error messages for ERROR_MODE_WEBPAGE %]
# not HTML
%]
[% USE Bugzilla %]
[% USE Bugzilla %]
[% IF Bugzilla.error_mode
== ERROR_MODE_DI
E %]
[% IF Bugzilla.error_mode
!= ERROR_MODE_WEBPAG
E %]
[% error_message FILTER none %]
[% error_message FILTER none %]
[% RETURN %]
[% RETURN %]
[% END %]
[% END %]
...
...
template/en/default/global/user-error.html.tmpl
View file @
971d7345
...
@@ -1475,11 +1475,9 @@
...
@@ -1475,11 +1475,9 @@
[% END %]
[% END %]
[% END %]
[% END %]
[%# If we are in ERROR_MODE_DIE, we want the error message to be plain text,
[%# We only want HTML error messages for ERROR_MODE_WEBPAGE %]
# not HTML
%]
[% USE Bugzilla %]
[% USE Bugzilla %]
[% IF Bugzilla.error_mode
== ERROR_MODE_DI
E %]
[% IF Bugzilla.error_mode
!= ERROR_MODE_WEBPAG
E %]
[% error_message FILTER none %]
[% error_message FILTER none %]
[% RETURN %]
[% RETURN %]
[% END %]
[% END %]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment