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
e908456f
Commit
e908456f
authored
Jan 18, 2000
by
terry%mozilla.org
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Check for and rebuild busted password stuff.
parent
53e6b664
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
0 deletions
+20
-0
sanitycheck.cgi
sanitycheck.cgi
+20
-0
No files found.
sanitycheck.cgi
View file @
e908456f
...
@@ -80,6 +80,26 @@ if (exists $::FORM{'rebuildvotecache'}) {
...
@@ -80,6 +80,26 @@ if (exists $::FORM{'rebuildvotecache'}) {
print
"OK, now running sanity checks.<P>\n"
;
print
"OK, now running sanity checks.<P>\n"
;
Status
(
"Checking passwords"
);
SendSQL
(
"SELECT COUNT(*) FROM profiles WHERE cryptpassword != ENCRYPT(password, left(cryptpassword, 2))"
);
my
$count
=
FetchOneColumn
();
if
(
$count
)
{
Alert
(
"$count entries have problems in their crypted password."
);
if
(
$::FORM
{
'rebuildpasswords'
})
{
Status
(
"Rebuilding passwords"
);
SendSQL
(
"UPDATE profiles
SET cryptpassword = ENCRYPT(password,
left(cryptpassword, 2))
WHERE cryptpassword != ENCRYPT(password,
left(cryptpassword, 2))"
);
Status
(
"Passwords have been rebuilt."
);
}
else
{
print
qq{<a href="sanitycheck.cgi?rebuildpasswords=1">Click here to rebuild the crypted passwords</a><p>\n}
;
}
}
Status
(
"Checking groups"
);
Status
(
"Checking groups"
);
SendSQL
(
"select bit from groups where bit != pow(2, round(log(bit) / log(2)))"
);
SendSQL
(
"select bit from groups where bit != pow(2, round(log(bit) / log(2)))"
);
while
(
my
$bit
=
FetchOneColumn
())
{
while
(
my
$bit
=
FetchOneColumn
())
{
...
...
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