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
5f042e84
Commit
5f042e84
authored
Mar 07, 2005
by
mkanat%kerio.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 283924: Move ValidateComment out of CGI.pl
Patch By Max Kanat-Alexander <mkanat@kerio.com> r=LpSolit, a=justdave
parent
494f0e59
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
10 deletions
+16
-10
Bug.pm
Bugzilla/Bug.pm
+15
-0
CGI.pl
CGI.pl
+0
-10
attachment.cgi
attachment.cgi
+1
-0
No files found.
Bugzilla/Bug.pm
View file @
5f042e84
...
...
@@ -44,6 +44,13 @@ use Bugzilla::User;
use
Bugzilla::
Util
;
use
Bugzilla::
Error
;
use
base
qw(Exporter)
;
@
Bugzilla::Bug::
EXPORT
=
qw(
ValidateComment
)
;
use
constant
MAX_COMMENT_LENGTH
=>
65535
;
sub
fields
{
# Keep this ordering in sync with bugzilla.dtd
my
@fields
=
qw(bug_id alias creation_ts short_desc delta_ts
...
...
@@ -585,6 +592,14 @@ sub CountOpenDependencies {
return
@dependencies
;
}
sub
ValidateComment
($)
{
my
(
$comment
)
=
@_
;
if
(
defined
(
$comment
)
&&
length
(
$comment
)
>
MAX_COMMENT_LENGTH
)
{
ThrowUserError
(
"comment_too_long"
);
}
}
sub
AUTOLOAD
{
use
vars
qw($AUTOLOAD)
;
my
$attr
=
$AUTOLOAD
;
...
...
CGI.pl
View file @
5f042e84
...
...
@@ -188,16 +188,6 @@ sub ValidateBugID {
}
}
sub
ValidateComment
{
# Make sure a comment is not too large (greater than 64K).
my
(
$comment
)
=
@_
;
if
(
defined
(
$comment
)
&&
length
(
$comment
)
>
65535
)
{
ThrowUserError
(
"comment_too_long"
);
}
}
sub
PasswordForLogin
{
my
(
$login
)
=
(
@_
);
SendSQL
(
"select cryptpassword from profiles where login_name = "
.
...
...
attachment.cgi
View file @
5f042e84
...
...
@@ -48,6 +48,7 @@ use Bugzilla::Flag;
use
Bugzilla::
FlagType
;
use
Bugzilla::
User
;
use
Bugzilla::
Util
;
use
Bugzilla::
Bug
;
# Check whether or not the user is logged in and, if so, set the $::userid
Bugzilla
->
login
();
...
...
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