Details
-
Bug
-
Resolution: Fixed
-
Critical
-
7.1.0
-
Triaged
-
1
-
Yes
-
Tools 2022-March
Description
What's the issue?
The staging/syncing of the cloud staging directory uses regular expressions, some of which are compiled at runtime; at the moment we've got a couple of places which are not (no longer) escaping characters that need to be matched as a fixed string.
What does this effect?
1) Populating/syncing the staging directory on Windows (e.g. backup to S3 no longer works on Windows)
2) Populating/syncing the staging directory where the archive/repo name contains an invalid regex character (this could lead to users being unable to use existing archives)
What's the fix?
The fix is simple, we should be using the 'QuoteMeta' function exposed by the standard library; this takes the given string and escapes it so that once compiled as a regular expression, it matches the given string exactly (e.g. results in valid/invalid regular expression characters being treated as their fixed string alternative).
Steps to reproduce
1) Try to configure an archive/repo with an invalid regex character
alternatively
1) Try to configure an archive/repo on Windows (the path separator is already an invalid character)
exit status 1: Backup repository `2a3f893b-0ec7-427e-8aad-9a858f7e10c4` created successfully in archive `s3://storage/archive-172.23.136.106`\\nPost sub-command object store task failed: error parsing regexp: invalid escape sequence: `\\\\c`\\n
|
Attachments
Issue Links
- mentioned in
-
Page Loading...