🔒️ fix: Inefficient regular expression
This commit is contained in:
parent
3ef7fe0a14
commit
488f167e13
1 changed files with 1 additions and 1 deletions
|
|
@ -274,7 +274,7 @@ export default function AutoDownloadDialog() {
|
||||||
</Button>
|
</Button>
|
||||||
<Button
|
<Button
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
const folderPathRegex = /^([\/\\])?([^<>:"|?*]+([\/\\])?)+$/;
|
const folderPathRegex = /^[\/\\]?(?:[^<>:"|?*\/\\]+[\/\\]?)*$/;
|
||||||
if (
|
if (
|
||||||
rule.transferRule &&
|
rule.transferRule &&
|
||||||
!folderPathRegex.test(rule.transferRule.destination)
|
!folderPathRegex.test(rule.transferRule.destination)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue