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
Zvonimir
ISPConfig 3
Commits
2cb656cf
Commit
2cb656cf
authored
Sep 05, 2012
by
mcramer
Browse files
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
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
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