Skip to content

Commit

Permalink
Remove Files directive created by this module #1
Browse files Browse the repository at this point in the history
  • Loading branch information
jcameron committed Jun 14, 2020
1 parent bc9538e commit 9a68088
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions delete.cgi
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ if ($in{'dom'}) {
}

my @dirs = &htaccess_htpasswd::list_directories();
my $htusers = $htaccess_htpasswd::config{'htpasswd'} || "htusers";
foreach my $path (@d) {
&can_directory($path, $d) || &error($text{'delete_ecannot'});
my ($dir) = grep { $_->[0] eq $path } @dirs;
Expand All @@ -31,6 +32,9 @@ foreach my $path (@d) {
&apache::save_directive("AuthType", [ ], $conf, $conf);
&apache::save_directive("AuthName", [ ], $conf, $conf);
&apache::save_directive("require", [ ], $conf, $conf);
my @files = &apache::find_directive_struct("Files", $conf);
@files = grep { $_->{'value'} ne $htusers } @files;
&apache::save_directive("Files", \@files, $conf, $conf);
if ($main::file_cache{$file}) {
&virtual_server::write_as_domain_user($d,
sub { &flush_file_lines($file) });
Expand Down

0 comments on commit 9a68088

Please sign in to comment.