Re: [pve-devel] [PATCH access-control 2/2] fix #1499: check ACL path validity

2017-10-19 Thread Wolfgang Bumiller
On Tue, Oct 10, 2017 at 03:44:19PM +0200, Philip Abernethy wrote: > +sub validate_path { > +my $path = shift; > +return 0 if $path !~ > m'^/(vms|nodes|storage|pool|access/(?:groups|realms))(?:/([[:alnum:]\.\-\_]+))?$'; > + > +if ($1 eq 'vms') {PVE::JSONSchema::pve_verify_vmid($2) if $2

Re: [pve-devel] [PATCH access-control 2/2] fix #1499: check ACL path validity

2017-10-10 Thread Thomas Lamprecht
On 10/10/2017 03:58 PM, Philip Abernethy wrote: > On Tue, Oct 10, 2017 at 03:53:45PM +0200, Thomas Lamprecht wrote: >> On 10/10/2017 03:44 PM, Philip Abernethy wrote: >>> Checks ACL paths for logical validity before application. Checks of >>> the various IDs are done by the existing format checkers

Re: [pve-devel] [PATCH access-control 2/2] fix #1499: check ACL path validity

2017-10-10 Thread Philip Abernethy
On Tue, Oct 10, 2017 at 03:53:45PM +0200, Thomas Lamprecht wrote: > On 10/10/2017 03:44 PM, Philip Abernethy wrote: > > Checks ACL paths for logical validity before application. Checks of > > the various IDs are done by the existing format checkers to avoid code > > duplication. > > Also introduces

Re: [pve-devel] [PATCH access-control 2/2] fix #1499: check ACL path validity

2017-10-10 Thread Thomas Lamprecht
On 10/10/2017 03:44 PM, Philip Abernethy wrote: > Checks ACL paths for logical validity before application. Checks of > the various IDs are done by the existing format checkers to avoid code > duplication. > Also introduces a distinction between malformed (syntactically > incorrect) and invalid (sy

[pve-devel] [PATCH access-control 2/2] fix #1499: check ACL path validity

2017-10-10 Thread Philip Abernethy
Checks ACL paths for logical validity before application. Checks of the various IDs are done by the existing format checkers to avoid code duplication. Also introduces a distinction between malformed (syntactically incorrect) and invalid (syntactically correct, but contextually wrong) paths. --- P