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
4cde47cd
Commit
4cde47cd
authored
Feb 28, 2006
by
jocuri%softhome.net
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix ThrowCodeError calls by giving them an unique ID (tree fix).
parent
692dcb72
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
3 deletions
+10
-3
Hook.pm
Bugzilla/Hook.pm
+2
-2
Hook.pm
Bugzilla/Template/Plugin/Hook.pm
+1
-1
code-error.html.tmpl
template/en/default/global/code-error.html.tmpl
+7
-0
No files found.
Bugzilla/Hook.pm
View file @
4cde47cd
...
...
@@ -43,8 +43,8 @@ sub process {
trick_taint
(
$extension
);
if
(
-
e
$extension
.
'/code/'
.
$name
.
'.pl'
)
{
do
(
$extension
.
'/code/'
.
$name
.
'.pl'
);
ThrowCodeError
(
"An error occured processing hook \"$name\" in "
.
"Bugzilla extension \"$extension\": $@"
)
if
$@
;
ThrowCodeError
(
'extension_invalid'
,
{
name
=>
$name
,
extension
=>
$extension
}
)
if
$@
;
}
}
...
...
Bugzilla/Template/Plugin/Hook.pm
View file @
4cde47cd
...
...
@@ -52,7 +52,7 @@ sub process {
# sanity check:
if
(
!
$template
=~
/[\w\.\/\-_\\]+/
)
{
ThrowCodeError
(
"Template with invalid file name found in hook call: $template"
);
ThrowCodeError
(
'template_invalid'
,
{
name
=>
$template
}
);
}
# also get extension hook files that live in extensions/:
...
...
template/en/default/global/code-error.html.tmpl
View file @
4cde47cd
...
...
@@ -103,6 +103,10 @@
[% ELSIF error == "cookies_need_value" %]
Every cookie must have a value.
[% ELSIF error == "extension_invalid" %]
An error occured processing hook [% name FILTER html %] in
extension [% extension FILTER html %].
[% ELSIF error == "field_type_mismatch" %]
Cannot seem to handle <code>[% field FILTER html %]</code>
and <code>[% type FILTER html %]</code> together.
...
...
@@ -292,6 +296,9 @@
[% ELSIF error == "template_error" %]
[% template_error_msg FILTER html %]
[% ELSIF error == "template_invalid" %]
Template with invalid file name found in hook call: [% name FILTER html %].
[% ELSIF error == "unable_to_retrieve_password" %]
I was unable to retrieve your old password from the database.
...
...
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