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
fcf2c1a1
Commit
fcf2c1a1
authored
Apr 12, 2004
by
kiko%async.com.br
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix for bug 238865-v1: remove %FORM from page.cgi. Does so, fixing the
linked page template and adding a code error for the "bad id provided" case. r=vladd, a=myk.
parent
4d1ced8f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
6 deletions
+18
-6
page.cgi
page.cgi
+9
-4
code-error.html.tmpl
template/en/default/global/code-error.html.tmpl
+5
-0
linked.html.tmpl
template/en/default/pages/linked.html.tmpl
+4
-2
No files found.
page.cgi
View file @
fcf2c1a1
...
...
@@ -42,14 +42,19 @@ Bugzilla->login();
my
$cgi
=
Bugzilla
->
cgi
;
if
(
$::FORM
{
'id'
})
{
my
$id
=
$cgi
->
param
(
'id'
);
if
(
$id
)
{
# Remove all dodgy chars, and split into name and ctype.
$::FORM
{
'id'
}
=~
s/[^\w\-\.]//g
;
$::FORM
{
'id'
}
=~
/(.*)\.(.*)/
;
$id
=~
s/[^\w\-\.]//g
;
$id
=~
/(.*)\.(.*)/
;
if
(
!
$2
)
{
# if this regexp fails to match completely, something bad came in
ThrowCodeError
(
"bad_page_cgi_id"
,
{
"page_id"
=>
$id
});
}
my
$format
=
GetFormat
(
"pages/$1"
,
undef
,
$2
);
$
vars
->
{
'form'
}
=
\%::
FORM
;
$
cgi
->
param
(
'id'
,
$id
);
print
$cgi
->
header
(
$format
->
{
'ctype'
});
...
...
template/en/default/global/code-error.html.tmpl
View file @
fcf2c1a1
...
...
@@ -56,6 +56,11 @@
[% ELSIF error == "authres_unhandled" %]
An authorization handler return value was not handled by the login code.
[% ELSIF error == "bad_page_cgi_id" %]
[% title = "Invalid Page ID" %]
The ID <code>[% page_id FILTER html %]</code> is not a
valid page identifier.
[% ELSIF error == "bug_error" %]
Trying to retrieve [% terms.bug %] [%+ bug.bug_id FILTER html %] returned
the error [% bug.error FILTER html %].
...
...
template/en/default/pages/linked.html.tmpl
View file @
fcf2c1a1
...
...
@@ -21,6 +21,8 @@
#%]
[% INCLUDE global/header.html.tmpl title = "Your Linkified Text" %]
[% USE Bugzilla %]
[% cgi = Bugzilla.cgi %]
<p>
Copy and paste the text below:
...
...
@@ -30,7 +32,7 @@
<p>
<pre>
[%-
form.text
FILTER quoteUrls FILTER html -%]
[%-
cgi.param("text")
FILTER quoteUrls FILTER html -%]
</pre>
</p>
...
...
@@ -45,7 +47,7 @@
<p>
<pre>
[%-
form.text
FILTER quoteUrls -%]
[%-
cgi.param("text")
FILTER quoteUrls -%]
</pre>
</p>
...
...
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