Commit 330d368
committed
Make empty URL:s work in ACL:s
Setting a different default access for a specific user didn't previously work
because
* the ACL must be sorted in reversed alphabetic order which means that an empty
URL (ie. a default rule) must be last, and
* the search for matching ACL rules stops when the top level domain of the
a rule is alphabetically lower than the one searched for.
Ie. given "default_access: allow" and the ACL:
com,example)/ - {"access": "block"}
- {"access": "block", "user": "unknown"}
and searching for "http://iana.org", the last line would not be found so that
the "unknown" user would still be "allowed".1 parent 4a3e7dd commit 330d368
File tree
5 files changed
+24
-5
lines changed- docs/manual
- pywb/warcserver
- sample_archive/access
- tests
5 files changed
+24
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
139 | 139 | | |
140 | 140 | | |
141 | 141 | | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
142 | 148 | | |
143 | 149 | | |
144 | 150 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
269 | 269 | | |
270 | 270 | | |
271 | 271 | | |
272 | | - | |
273 | | - | |
274 | | - | |
| 272 | + | |
275 | 273 | | |
276 | 274 | | |
277 | 275 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
27 | 34 | | |
28 | 35 | | |
29 | 36 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
85 | 85 | | |
86 | 86 | | |
87 | 87 | | |
88 | | - | |
89 | | - | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
0 commit comments