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
bbec76da
Commit
bbec76da
authored
Oct 05, 2002
by
matty%chariot.net.au
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug #93667: More movement, commenting, and remove an unused variable.
parent
4d06a5bd
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
28 deletions
+32
-28
sanitycheck.cgi
sanitycheck.cgi
+32
-28
No files found.
sanitycheck.cgi
View file @
bbec76da
...
...
@@ -29,26 +29,9 @@ require "CGI.pl";
use
vars
qw(%FORM $unconfirmedstate)
;
ConnectToDatabase
();
confirm_login
();
# Make sure the user is authorized to access sanitycheck.cgi. Access
# is restricted to logged-in users who have "editbugs" privileges,
# which is a reasonable compromise between allowing all users to access
# the script (creating the potential for denial of service attacks)
# and restricting access to this installation's administrators (which
# prevents users with a legitimate interest in Bugzilla integrity
# from accessing the script).
UserInGroup
(
"editbugs"
)
||
DisplayError
(
"You are not authorized to access this script,
which is reserved for users with the ability to edit bugs."
)
&&
exit
;
print
"Content-type: text/html\n"
;
print
"\n"
;
my
$offervotecacherebuild
=
0
;
###########################################################################
# General subs
###########################################################################
sub
Status
{
my
(
$str
)
=
(
@_
);
...
...
@@ -65,17 +48,30 @@ sub BugLink {
return
"<a href=\"show_bug.cgi?id=$id\">$id</a>"
;
}
sub
AlertBadVoteCache
{
my
(
$id
)
=
(
@_
);
Alert
(
"Bad vote cache for bug "
.
BugLink
(
$id
));
$offervotecacherebuild
=
1
;
}
###########################################################################
# Start
###########################################################################
my
@badbugs
;
ConnectToDatabase
()
;
confirm_login
();
# Make sure the user is authorized to access sanitycheck.cgi. Access
# is restricted to logged-in users who have "editbugs" privileges,
# which is a reasonable compromise between allowing all users to access
# the script (creating the potential for denial of service attacks)
# and restricting access to this installation's administrators (which
# prevents users with a legitimate interest in Bugzilla integrity
# from accessing the script).
UserInGroup
(
"editbugs"
)
||
DisplayError
(
"You are not authorized to access this script,
which is reserved for users with the ability to edit bugs."
)
&&
exit
;
print
"Content-type: text/html\n"
;
print
"\n"
;
my
@row
;
my
@checklist
;
PutHeader
(
"Bugzilla Sanity Check"
);
...
...
@@ -354,6 +350,14 @@ while (my ($id,$email) = (FetchSQLData())) {
# Perform vote/keyword cache checks
###########################################################################
my
$offervotecacherebuild
=
0
;
sub
AlertBadVoteCache
{
my
(
$id
)
=
(
@_
);
Alert
(
"Bad vote cache for bug "
.
BugLink
(
$id
));
$offervotecacherebuild
=
1
;
}
SendSQL
(
"SELECT bug_id,votes,keywords FROM bugs "
.
"WHERE votes != 0 OR keywords != ''"
);
...
...
@@ -456,7 +460,7 @@ while (1) {
push
(
@list
,
$k
);
}
@badbugs
=
();
my
@badbugs
=
();
foreach
my
$b
(
keys
(
%
keyword
))
{
if
(
!
exists
$realk
{
$b
}
||
$realk
{
$b
}
ne
$keyword
{
$b
})
{
...
...
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