Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
I
ISPConfig 3
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ISPConfig
ISPConfig 3
Commits
f17dab42
Commit
f17dab42
authored
14 years ago
by
vogelor
Browse files
Options
Downloads
Patches
Plain Diff
The webdav user pwd was hased twice. Now it is working fine
parent
94927b95
No related branches found
No related tags found
2 merge requests
!46
Master
,
!21
Master
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
interface/web/sites/webdav_user_edit.php
+3
-2
3 additions, 2 deletions
interface/web/sites/webdav_user_edit.php
server/plugins-available/apache2_plugin.inc.php
+4
-6
4 additions, 6 deletions
server/plugins-available/apache2_plugin.inc.php
with
7 additions
and
8 deletions
interface/web/sites/webdav_user_edit.php
+
3
−
2
View file @
f17dab42
...
...
@@ -166,12 +166,13 @@ class page_action extends tform_actions {
$data
=
$app
->
db
->
queryOneRecord
(
"SELECT * FROM webdav_user WHERE webdav_user_id = "
.
intval
(
$this
->
id
));
$this
->
dataRecord
[
"username"
]
=
$data
[
'username'
];
$this
->
dataRecord
[
"dir"
]
=
$data
[
'dir'
];
$passwordOld
=
$data
[
'password'
];
/*
* We shall not save the pwd in plaintext, so we store it as the hash, the apache-moule
* needs (only if the pwd is changed
* needs (only if the pwd is changed
)
*/
if
(
isset
(
$this
->
dataRecord
[
"password"
])
&&
$this
->
dataRecord
[
"password"
]
!=
''
)
{
if
(
(
isset
(
$this
->
dataRecord
[
"password"
])
)
&&
(
$this
->
dataRecord
[
"password"
]
!=
''
)
&&
(
$this
->
dataRecord
[
"password"
]
!=
$passwordOld
))
{
$hash
=
md5
(
$this
->
dataRecord
[
"username"
]
.
':'
.
$this
->
dataRecord
[
"dir"
]
.
':'
.
$this
->
dataRecord
[
"password"
]);
$this
->
dataRecord
[
"password"
]
=
$hash
;
}
...
...
This diff is collapsed.
Click to expand it.
server/plugins-available/apache2_plugin.inc.php
+
4
−
6
View file @
f17dab42
...
...
@@ -1085,7 +1085,6 @@ class apache2_plugin {
$changed
=
false
;
$in
=
fopen
(
$filename
,
'r'
);
$output
=
''
;
/*
* read line by line and search for the username and authname
*/
...
...
@@ -1096,10 +1095,9 @@ class apache2_plugin {
/*
* found the user. delete or change it?
*/
if
(
$pwd
!=
''
)
{
$tmp
[
2
]
=
$pwdhash
;
$output
.
=
$tmp
[
0
]
.
':'
.
$tmp
[
1
]
.
':'
.
$tmp
[
2
]
.
"
\n
"
;
}
if
(
$pwdhash
!=
''
)
{
$output
.
=
$tmp
[
0
]
.
':'
.
$tmp
[
1
]
.
':'
.
$pwdhash
.
"
\n
"
;
}
$changed
=
true
;
}
else
{
...
...
@@ -1110,7 +1108,7 @@ class apache2_plugin {
* if we didn't change anything, we have to add the new user at the end of the file
*/
if
(
!
$changed
)
{
$output
.
=
$username
.
':'
.
$authname
.
':'
.
md5
(
$username
.
':'
.
$authname
.
':'
.
$pwd
)
.
"
\n
"
;
$output
.
=
$username
.
':'
.
$authname
.
':'
.
$pwdhash
.
"
\n
"
;
}
fclose
(
$in
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment