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
ac1f49a8
Commit
ac1f49a8
authored
Sep 12, 2008
by
dkl%redhat.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 453767 - Passwords containing wide characters causes system error
Patch by David Lawrence <dkl@redhat.com> - a/r=mkanat
parent
8e770628
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
2 deletions
+18
-2
DB.pm
Bugzilla/Auth/Verify/DB.pm
+5
-0
Util.pm
Bugzilla/Util.pm
+5
-0
userprefs.cgi
userprefs.cgi
+8
-2
No files found.
Bugzilla/Auth/Verify/DB.pm
View file @
ac1f49a8
...
...
@@ -53,6 +53,11 @@ sub check_credentials {
"SELECT cryptpassword FROM profiles WHERE userid = ?"
,
undef
,
$user_id
);
# Wide characters cause crypt to die
if
(
Bugzilla
->
params
->
{
'utf8'
})
{
utf8::
encode
(
$password
)
if
utf8::
is_utf8
(
$password
);
}
# Using the internal crypted password as the salt,
# crypt the password the user entered.
my
$entered_password_crypted
=
crypt
(
$password
,
$real_password_crypted
);
...
...
Bugzilla/Util.pm
View file @
ac1f49a8
...
...
@@ -480,6 +480,11 @@ sub bz_crypt {
$salt
.=
$saltchars
[
rand
(
64
)];
}
# Wide characters cause crypt to die
if
(
Bugzilla
->
params
->
{
'utf8'
})
{
utf8::
encode
(
$password
)
if
utf8::
is_utf8
(
$password
);
}
# Crypt the password.
my
$cryptedpassword
=
crypt
(
$password
,
$salt
);
...
...
userprefs.cgi
View file @
ac1f49a8
...
...
@@ -90,8 +90,14 @@ sub SaveAccount {
undef
,
$user
->
id
);
$oldcryptedpwd
||
ThrowCodeError
(
"unable_to_retrieve_password"
);
if
(
crypt
(
scalar
(
$cgi
->
param
(
'Bugzilla_password'
)),
$oldcryptedpwd
)
ne
$oldcryptedpwd
)
my
$oldpassword
=
$cgi
->
param
(
'Bugzilla_password'
);
# Wide characters cause crypt to die
if
(
Bugzilla
->
params
->
{
'utf8'
})
{
utf8::
encode
(
$oldpassword
)
if
utf8::
is_utf8
(
$oldpassword
);
}
if
(
crypt
(
$oldpassword
,
$oldcryptedpwd
)
ne
$oldcryptedpwd
)
{
ThrowUserError
(
"old_password_incorrect"
);
}
...
...
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