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
8ceb5a0b
Commit
8ceb5a0b
authored
Nov 13, 2012
by
Matt Tyson
Committed by
Byron Jones
Nov 13, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
But 800196: Sanitise line-endings for textarea fields
r=glob, a=LpSolit
https://bugzilla.mozilla.org/show_bug.cgi?id=800196
parent
2a6f7d46
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
0 deletions
+16
-0
Bug.pm
Bugzilla/Bug.pm
+16
-0
No files found.
Bugzilla/Bug.pm
View file @
8ceb5a0b
...
...
@@ -152,6 +152,9 @@ sub VALIDATORS {
elsif
(
$field
->
type
==
FIELD_TYPE_BUG_ID
)
{
$validator
=
\&
_check_bugid_field
;
}
elsif
(
$field
->
type
==
FIELD_TYPE_TEXTAREA
)
{
$validator
=
\&
_check_textarea_field
;
}
else
{
$validator
=
\&
_check_default_field
;
}
...
...
@@ -2022,6 +2025,19 @@ sub _check_bugid_field {
return
$checked_id
;
}
sub
_check_textarea_field
{
my
(
$invocant
,
$text
,
$field
)
=
@_
;
$text
=
(
defined
$text
)
?
trim
(
$text
)
:
''
;
# Web browsers submit newlines as \r\n.
# Sanitize all input to match the web standard.
# XMLRPC input could be either \n or \r\n
$text
=~
s/\r?\n/\r\n/g
;
return
$text
;
}
sub
_check_relationship_loop
{
# Generates a dependency tree for a given bug. Calls itself recursively
# to generate sub-trees for the bug's dependencies.
...
...
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