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
b7777aee
Commit
b7777aee
authored
Sep 18, 2010
by
Max Kanat-Alexander
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 593170: Disallow urls like "show_bug.cgi?id=2323" (with no domain) in
the See Also field. r=timello, a=mkanat
parent
f5474782
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
0 deletions
+11
-0
Bug.pm
Bugzilla/Bug.pm
+9
-0
user-error.html.tmpl
template/en/default/global/user-error.html.tmpl
+2
-0
No files found.
Bugzilla/Bug.pm
View file @
b7777aee
...
...
@@ -2815,6 +2815,15 @@ sub add_see_also {
ThrowUserError
(
'bug_url_invalid'
,
{
url
=>
$input
,
reason
=>
'http'
});
}
# This stops the following edge cases from being accepted:
# * show_bug.cgi?id=1
# * /show_bug.cgi?id=1
# * http:///show_bug.cgi?id=1
if
(
!
$uri
->
authority
or
$uri
->
path
!~
m{/}
)
{
ThrowUserError
(
'bug_url_invalid'
,
{
url
=>
$input
,
reason
=>
'path_only'
});
}
my
$result
;
# Launchpad URLs
if
(
$uri
->
authority
=~
/launchpad.net$/
)
{
...
...
template/en/default/global/user-error.html.tmpl
View file @
b7777aee
...
...
@@ -245,6 +245,8 @@
<code>[% url FILTER html %]</code> is not a valid URL to [% terms.abug %].
[% IF reason == 'http' %]
URLs must start with "http" or "https".
[% ELSIF reason == 'path_only' %]
You must specify a full URL.
[% ELSIF reason == 'show_bug' %]
[%+ field_descs.see_also %] URLs should point to one of:
<ul>
...
...
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