Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
François GrizzlyDev
ISPConfig 3
Commits
74389236
Commit
74389236
authored
Feb 19, 2016
by
Marius Burkard
Browse files
- use password crypting function of auth module in client edit (Fixes
#3147
)
parent
33e9d6ea
Changes
1
Hide whitespace changes
Inline
Side-by-side
interface/web/client/client_edit.php
View file @
74389236
...
...
@@ -408,13 +408,7 @@ class page_action extends tform_actions {
// password changed
if
(
isset
(
$conf
[
'demo_mode'
])
&&
$conf
[
'demo_mode'
]
!=
true
&&
isset
(
$this
->
dataRecord
[
"password"
])
&&
$this
->
dataRecord
[
"password"
]
!=
''
)
{
$password
=
$this
->
dataRecord
[
"password"
];
$salt
=
"$1$"
;
$base64_alphabet
=
'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'
;
for
(
$n
=
0
;
$n
<
8
;
$n
++
)
{
$salt
.
=
$base64_alphabet
[
mt_rand
(
0
,
63
)];
}
$salt
.
=
"$"
;
$password
=
crypt
(
stripslashes
(
$password
),
$salt
);
$password
=
$app
->
auth
->
crypt_password
(
$password
);
$client_id
=
$this
->
id
;
$sql
=
"UPDATE sys_user SET passwort = ? WHERE client_id = ?"
;
$app
->
db
->
query
(
$sql
,
$password
,
$client_id
);
...
...
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