Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
lolo888
ISPConfig 3
Commits
2cb656cf
Commit
2cb656cf
authored
Sep 05, 2012
by
mcramer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed: "old" style folder protection without comment lines in htaccess (3.0.4.6) get removed, too.
parent
fd688978
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
+6
-0
server/plugins-available/apache2_plugin.inc.php
server/plugins-available/apache2_plugin.inc.php
+6
-0
No files found.
server/plugins-available/apache2_plugin.inc.php
View file @
2cb656cf
...
...
@@ -1812,6 +1812,8 @@ class apache2_plugin {
if
(
preg_match
(
'/'
.
preg_quote
(
$begin_marker
,
'/'
)
.
'(.*?)'
.
preg_quote
(
$end_marker
,
'/'
)
.
'/s'
,
$ht_file
,
$matches
))
{
$ht_file
=
str_replace
(
$matches
[
0
],
''
,
$ht_file
);
}
else
{
$ht_file
=
str_replace
(
"AuthType Basic
\n
AuthName
\"
Members Only
\"\n
AuthUserFile "
.
$folder_path
.
".htpasswd
\n
require valid-user"
,
''
,
$ht_file
);
}
if
(
trim
(
$ht_file
)
==
''
)
{
...
...
@@ -1890,6 +1892,8 @@ class apache2_plugin {
if
(
preg_match
(
'/'
.
preg_quote
(
$begin_marker
,
'/'
)
.
'(.*?)'
.
preg_quote
(
$end_marker
,
'/'
)
.
'/s'
,
$ht_file
,
$matches
))
{
$ht_file
=
str_replace
(
$matches
[
0
],
''
,
$ht_file
);
}
else
{
$ht_file
=
str_replace
(
"AuthType Basic
\n
AuthName
\"
Members Only
\"\n
AuthUserFile "
.
$old_folder_path
.
".htpasswd
\n
require valid-user"
,
''
,
$ht_file
);
}
if
(
trim
(
$ht_file
)
==
''
)
{
...
...
@@ -1930,6 +1934,8 @@ class apache2_plugin {
if
(
preg_match
(
'/'
.
preg_quote
(
$begin_marker
,
'/'
)
.
'(.*?)'
.
preg_quote
(
$end_marker
,
'/'
)
.
'/s'
,
$ht_file
,
$matches
))
{
$ht_file
=
str_replace
(
$matches
[
0
],
''
,
$ht_file
);
}
else
{
$ht_file
=
str_replace
(
"AuthType Basic
\n
AuthName
\"
Members Only
\"\n
AuthUserFile "
.
$new_folder_path
.
".htpasswd
\n
require valid-user"
,
''
,
$ht_file
);
}
if
(
trim
(
$ht_file
)
==
''
)
{
...
...
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