1 |
jpp |
1.1 |
diff -Nur --no-dereference smeserver-mod_dav-1.1.old/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/95Addmod_dav2ibays smeserver-mod_dav-1.1/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/95Addmod_dav2ibays |
2 |
|
|
--- smeserver-mod_dav-1.1.old/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/95Addmod_dav2ibays 2022-07-28 23:51:31.454000000 -0400 |
3 |
|
|
+++ smeserver-mod_dav-1.1/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/95Addmod_dav2ibays 2022-07-29 00:15:04.844000000 -0400 |
4 |
|
|
@@ -13,7 +13,7 @@ |
5 |
|
|
$OUT .= "\n # ibay $key disabled for httpd so no DAV access\n" if $access eq 'none'; |
6 |
|
|
next if $access eq 'none'; |
7 |
|
|
# true if have to be password accessible from somewhere. |
8 |
|
|
- my $satisfy = ($access eq 'global-pw-remote')? 'any': 'all'; |
9 |
|
|
+ my $satisfy = ($access eq 'global-pw-remote')? 'RequireAny': 'RequireAll'; |
10 |
|
|
if ($properties{'ModDav'}) |
11 |
|
|
{ |
12 |
|
|
if ($properties{'ModDav'} eq 'enabled') |
13 |
|
|
@@ -35,7 +35,7 @@ |
14 |
|
|
$OUT .= " <FilesMatch \\.php\$>\n"; |
15 |
|
|
$OUT .= " #disabling php\n"; |
16 |
|
|
$OUT .= " SetHandler !\n"; # could use also SetHandler none |
17 |
|
|
- $OUT .= " deny from all\n" if ( $properties{'ModDavHidePHP'} || 'enabled' ) eq 'enabled'; |
18 |
|
|
+ $OUT .= " Require all denied\n" if ( $properties{'ModDavHidePHP'} || 'enabled' ) eq 'enabled'; |
19 |
|
|
$OUT .= " </FilesMatch>\n"; |
20 |
|
|
$OUT .= " Options -ExecCGI\n"; |
21 |
|
|
$OUT .= " RemoveHandler .cgi .php .php3 .php4 .php5 .phtml .pl .py .pyc .pyo\n"; |
22 |
|
|
@@ -54,15 +54,14 @@ |
23 |
|
|
$OUT .= " DirectoryIndex disabled\n\n" unless ( ($properties{'ModDavNoDirectoryIndex'}||"enabled" ) eq "disabled"); |
24 |
|
|
$OUT .= " #DirectoryIndex disabled : DavNoDirectoryIndex has been defined to force DirectoryIndex \n\n" if ( ($properties{'ModDavNoDirectoryIndex'}||"enabled" ) eq "disabled"); |
25 |
|
|
|
26 |
|
|
- $OUT .= " order deny,allow\n"; |
27 |
|
|
- $OUT .= " deny from all\n"; |
28 |
|
|
- $OUT .= " " . $ReadAllow . "\n"; |
29 |
|
|
$OUT .= " AuthName \"$properties{'Name'}\"\n"; |
30 |
|
|
$OUT .= " AuthBasicProvider external\n"; |
31 |
|
|
$OUT .= " AuthType Basic\n"; |
32 |
|
|
$OUT .= " AuthExternal pwauth\n"; |
33 |
|
|
- $OUT .= " " . $ReadRequire . "\n"; |
34 |
|
|
- $OUT .= " Satisfy $satisfy\n\n"; |
35 |
|
|
+ $OUT .= " <$satisfy>\n"; |
36 |
|
|
+ $OUT .= " " . $ReadRequire . "\n"; |
37 |
|
|
+ $OUT .= " " . $ReadAllow . "\n"; |
38 |
|
|
+ $OUT .= " </$satisfy>\n\n"; |
39 |
|
|
|
40 |
|
|
# Ensure only valid users get to do stuff... update 2021/02: |
41 |
|
|
# GET, POST, PUT, DELETE, CONNECT, OPTIONS, PATCH, PROPFIND, PROPPATCH, MKCOL, COPY, MOVE, LOCK, UNLOCK |
42 |
|
|
@@ -72,14 +71,15 @@ |
43 |
|
|
# however we put our limit to the whole folder with the Require user .... above, so the whole block under seems useless |
44 |
|
|
# unless we reduce it to one user, or are fool to enlarge to Require valid-user |
45 |
|
|
# $OUT .= " <Limit GET PUT POST DELETE PROPFIND PROPPATCH MKCOL COPY MOVE LOCK UNLOCK>\n\n"; |
46 |
|
|
-# $OUT .= " Allow from all\n"; |
47 |
|
|
+# $OUT .= " #Require all granted\n"; |
48 |
|
|
# $OUT .= " Require user $userlist\n\n"; |
49 |
|
|
# $OUT .= " </Limit>\n\n"; |
50 |
|
|
|
51 |
|
|
$OUT .= " <LimitExcept GET POST PROPFIND OPTIONS CONNECT>\n"; |
52 |
|
|
- $OUT .= " " . $WriteRequire . "\n"; |
53 |
|
|
- $OUT .= " Satisfy All\n"; |
54 |
|
|
- $OUT .= " ". $WriteAllow ."\n"; |
55 |
|
|
+ $OUT .= " <RequireAll>n"; |
56 |
|
|
+ $OUT .= " " . $WriteRequire . "\n"; |
57 |
|
|
+ $OUT .= " ". $WriteAllow ."\n"; |
58 |
|
|
+ $OUT .= " </RequireAll>n"; |
59 |
|
|
$OUT .= " </LimitExcept>\n\n"; |
60 |
|
|
$OUT .= "</Directory>\n"; |
61 |
|
|
} |
62 |
|
|
diff -Nur --no-dereference smeserver-mod_dav-1.1.old/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/VirtualHosts/21IbayWebDav smeserver-mod_dav-1.1/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/VirtualHosts/21IbayWebDav |
63 |
|
|
--- smeserver-mod_dav-1.1.old/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/VirtualHosts/21IbayWebDav 2022-07-28 23:51:31.454000000 -0400 |
64 |
|
|
+++ smeserver-mod_dav-1.1/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/VirtualHosts/21IbayWebDav 2022-07-29 00:03:53.101000000 -0400 |
65 |
|
|
@@ -14,8 +14,6 @@ |
66 |
|
|
$OUT .= "\n # ibay $key disabled for httpd so no DAV access\n" if $access eq 'none'; |
67 |
|
|
next if $access eq 'none'; |
68 |
|
|
# true if have to be password accessible from somewhere. |
69 |
|
|
- my $ispassibay = $access =~ /-pw/; |
70 |
|
|
- my $satisfy = ($access eq 'global-pw-remote')? 'any': 'all'; |
71 |
|
|
if ($properties{'ModDav'}) |
72 |
|
|
{ |
73 |
|
|
if ($properties{'ModDav'} eq 'enabled') |
74 |
|
|
diff -Nur --no-dereference smeserver-mod_dav-1.1.old/root/usr/share/perl5/vendor_perl/esmith/DAV.pm smeserver-mod_dav-1.1/root/usr/share/perl5/vendor_perl/esmith/DAV.pm |
75 |
|
|
--- smeserver-mod_dav-1.1.old/root/usr/share/perl5/vendor_perl/esmith/DAV.pm 2022-07-28 23:51:31.457000000 -0400 |
76 |
|
|
+++ smeserver-mod_dav-1.1/root/usr/share/perl5/vendor_perl/esmith/DAV.pm 2022-07-29 00:09:32.842000000 -0400 |
77 |
|
|
@@ -67,22 +67,22 @@ |
78 |
|
|
sub getAllow { |
79 |
|
|
my ($mode, $key, $localAccess ) = @_; |
80 |
|
|
$localAccess = (defined $localAccess ) ? $localAccess : "127.0.0.1"; |
81 |
|
|
- my $ibay = $adb->get($key) or return "allow from 127.0.0.1"; |
82 |
|
|
- my %properties = $ibay->props or return "allow from 127.0.0.1"; |
83 |
|
|
+ my $ibay = $adb->get($key) or return "Require ip 127.0.0.1"; |
84 |
|
|
+ my %properties = $ibay->props or return "Require ip 127.0.0.1"; |
85 |
|
|
my $Public = $properties{'PublicAccess'} || 'none'; |
86 |
|
|
|
87 |
|
|
- my $allow = "allow from 127.0.0.1"; |
88 |
|
|
+ my $allow = "Require ip 127.0.0.1"; |
89 |
|
|
if ($Public eq 'none') |
90 |
|
|
{ |
91 |
|
|
$allow = "# allow from set to NONE"; |
92 |
|
|
} |
93 |
|
|
elsif ($Public =~ /(local|remote)/ ) |
94 |
|
|
{ |
95 |
|
|
- $allow = "allow from " . $localAccess; |
96 |
|
|
+ $allow = "Require ip " . $localAccess; |
97 |
|
|
} |
98 |
|
|
elsif ($Public =~ /global/) |
99 |
|
|
{ |
100 |
|
|
- $allow = "allow from all"; |
101 |
|
|
+ $allow = "Require all granted"; |
102 |
|
|
} |
103 |
|
|
return $allow; |
104 |
|
|
} |