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
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ivan Ivlev
bugzilla
Commits
406508ea
Commit
406508ea
authored
Aug 26, 2001
by
jake%acutex.net
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix for bug 87769 - doeditvotes.cgi can nuke votes
Patch by Christopher Aillon <christopher@aillon.com> r= jake@acutex.net
parent
cc928066
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
0 deletions
+20
-0
doeditvotes.cgi
doeditvotes.cgi
+20
-0
No files found.
doeditvotes.cgi
View file @
406508ea
...
@@ -19,6 +19,7 @@
...
@@ -19,6 +19,7 @@
# Rights Reserved.
# Rights Reserved.
#
#
# Contributor(s): Terry Weissman <terry@mozilla.org>
# Contributor(s): Terry Weissman <terry@mozilla.org>
# Christopher Aillon <christopher@aillon.com>
use
diagnostics
;
use
diagnostics
;
use
strict
;
use
strict
;
...
@@ -38,6 +39,25 @@ confirm_login();
...
@@ -38,6 +39,25 @@ confirm_login();
# IDs and the field values are the number of votes.
# IDs and the field values are the number of votes.
my
@buglist
=
grep
{
/^[1-9][0-9]*$/
}
keys
(
%::
FORM
);
my
@buglist
=
grep
{
/^[1-9][0-9]*$/
}
keys
(
%::
FORM
);
# If no bugs are in the buglist, let's make sure the user gets notified
# that their votes will get nuked if they continue.
if
((
0
==
@buglist
)
&&
(
!
defined
$::FORM
{
'delete_all_votes'
}))
{
print
"Content-type: text/html\n\n"
;
PutHeader
(
"Remove your votes?"
);
print
"<p>You are about to remove all of your bug votes. Are you sure you wish to remove your vote from every bug you've voted on?</p>"
;
print
qq{<form action="doeditvotes.cgi" method="post">\n}
;
print
qq{<p><input type="radio" name="delete_all_votes" value="1"> Yes</p>\n}
;
print
qq{<p><input type="radio" name="delete_all_votes" value="0" checked="checked"> No</p>\n}
;
print
qq{<p><a href="showvotes.cgi">Review your votes</a></p>\n}
;
print
qq{<p><input type="submit" value="Submit"></p></form>\n}
;
PutFooter
();
exit
();
}
elsif
(
$::FORM
{
'delete_all_votes'
}
==
0
)
{
print
"Location: showvotes.cgi\n\n"
;
exit
();
}
# Call ValidateBugID on each bug ID to make sure it is a positive
# Call ValidateBugID on each bug ID to make sure it is a positive
# integer representing an existing bug that the user is authorized
# integer representing an existing bug that the user is authorized
# to access, and make sure the number of votes submitted is also
# to access, and make sure the number of votes submitted is also
...
...
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