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
0b729766
Commit
0b729766
authored
Jun 26, 2002
by
bbaetz%student.usyd.edu.au
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 154036 - ccing an invalid user on a bug posts the bug anyway
r=jouni, gerv
parent
b77ad821
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
16 deletions
+21
-16
post_bug.cgi
post_bug.cgi
+21
-16
No files found.
post_bug.cgi
View file @
0b729766
...
...
@@ -200,6 +200,24 @@ if (exists $::FORM{'bug_status'}
$::FORM
{
'everconfirmed'
}
=
1
;
}
my
%
ccids
;
my
@cc
;
# Create the ccid hash for inserting into the db
# and the list for passing to processmail
# use a hash rather than a list to avoid adding users twice
if
(
defined
$::FORM
{
'cc'
})
{
foreach
my
$person
(
split
(
/[ ,]/
,
$::FORM
{
'cc'
}))
{
if
(
$person
ne
""
)
{
my
$ccid
=
DBNameToIdAndCheck
(
$person
);
if
(
$ccid
&&
!
$ccids
{
$ccid
})
{
$ccids
{
$ccid
}
=
1
;
push
(
@cc
,
$person
);
}
}
}
}
# Build up SQL string to add bug.
my
$sql
=
"INSERT INTO bugs "
.
"("
.
join
(
","
,
@used_fields
)
.
", reporter, creation_ts, groupset) "
.
...
...
@@ -256,22 +274,9 @@ my $id = FetchOneColumn();
SendSQL
(
"INSERT INTO longdescs (bug_id, who, bug_when, thetext)
VALUES ($id, $::userid, now(), "
.
SqlQuote
(
$comment
)
.
")"
);
my
%
ccids
;
my
$ccid
;
my
@cc
;
# Add the CC list
if
(
defined
$::FORM
{
'cc'
})
{
foreach
my
$person
(
split
(
/[ ,]/
,
$::FORM
{
'cc'
}))
{
if
(
$person
ne
""
)
{
$ccid
=
DBNameToIdAndCheck
(
$person
);
if
(
$ccid
&&
!
$ccids
{
$ccid
})
{
SendSQL
(
"INSERT INTO cc (bug_id, who) VALUES ($id, $ccid)"
);
$ccids
{
$ccid
}
=
1
;
push
(
@cc
,
$person
);
}
}
}
# Insert the cclist into the database
foreach
my
$ccid
(
keys
(
%
ccids
))
{
SendSQL
(
"INSERT INTO cc (bug_id, who) VALUES ($id, $ccid)"
);
}
SendSQL
(
"UNLOCK TABLES"
)
if
Param
(
"shadowdb"
);
...
...
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