Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Register
Sign in
Toggle navigation
Menu
Open sidebar
Zvonimir
ISPConfig 3
Commits
b5f654a2
Commit
b5f654a2
authored
Mar 08, 2010
by
tbrehm
Browse files
Fixed the salt generation algorithm in remoting lib.
parent
4e7add49
Changes
1
Hide whitespace changes
Inline
Side-by-side
interface/lib/classes/remoting_lib.inc.php
View file @
b5f654a2
...
...
@@ -492,8 +492,10 @@ class remoting_lib {
$sql_insert_key
.
=
"`
$key
`, "
;
if
(
$field
[
'encryption'
]
==
'CRYPT'
)
{
$salt
=
"$1$"
;
$base64_alphabet
=
'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'
;
for
(
$n
=
0
;
$n
<
8
;
$n
++
)
{
$salt
.
=
chr
(
mt_rand
(
64
,
126
));
//$salt.=chr(mt_rand(64,126));
$salt
.
=
$base64_alphabet
[
mt_rand
(
0
,
63
)];
}
$salt
.
=
"$"
;
// $salt = substr(md5(time()),0,2);
...
...
@@ -519,8 +521,10 @@ class remoting_lib {
if
(
$field
[
'formtype'
]
==
'PASSWORD'
)
{
if
(
$field
[
'encryption'
]
==
'CRYPT'
)
{
$salt
=
"$1$"
;
$base64_alphabet
=
'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'
;
for
(
$n
=
0
;
$n
<
8
;
$n
++
)
{
$salt
.
=
chr
(
mt_rand
(
64
,
126
));
//$salt.=chr(mt_rand(64,126));
$salt
.
=
$base64_alphabet
[
mt_rand
(
0
,
63
)];
}
$salt
.
=
"$"
;
// $salt = substr(md5(time()),0,2);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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