[pbs-devel] [PATCH proxmox-backup] tape: fix anchoring of datastore map regex
Thomas Lamprecht
t.lamprecht at proxmox.com
Wed Mar 29 14:07:53 CEST 2023
Am 29/03/2023 um 13:54 schrieb Dominik Csapak:
>> small question: should the `(:?` be a non-capturing group (`(?:`) here
>> instead? or am i missing something? afaict this would allow colons at
>> the beginning of the source datastore, creating a similar problem as was
>> fixed here, i'd assume.
good catch!
> yep, you're right, should be '(?:' instead
>
>
> at least 2 other regex also have this wrong:
>
> ----
> pub BLOCKDEVICE_NAME_REGEX = r"^(:?(:?h|s|x?v)d[a-z]+)|(:?nvme\d+n\d+)$";
> ----
>
> and
>
> ----
> pub TAPE_RESTORE_SNAPSHOT_REGEX = concat!(r"^", PROXMOX_SAFE_ID_REGEX_STR!(), r"
> ----
>
> will send a patch...
please also ensure that the capture.group access ID is still right then,
if used
More information about the pbs-devel
mailing list