fix: allow double -- in permissions as command can have double __ (#12884)

* allow double `--` in permissions as command can have double `__`

* Create change-pr-12884.md

* Update .changes/change-pr-12884.md

Co-authored-by: Fabian-Lars <github@fabianlars.de>

---------

Co-authored-by: Fabian-Lars <github@fabianlars.de>
This commit is contained in:
Oscar Beaumont
2025-03-14 23:13:48 +08:00
committed by GitHub
parent d91bfa5cb9
commit 3cc4ad3c38
2 changed files with 7 additions and 1 deletions

View File

@@ -0,0 +1,5 @@
---
"tauri-utils": "patch:bug"
---
fix: allow double `--` in permissions as command can have double `__`

View File

@@ -104,7 +104,8 @@ impl ValidByte {
(_, IDENTIFIER_SEPARATOR) => Some(ValidByte::Separator),
(ValidByte::Separator, next) => ValidByte::alpha_numeric(next),
(ValidByte::Byte(b'-'), next) => ValidByte::alpha_numeric(next),
(ValidByte::Byte(b'-'), next) => ValidByte::alpha_numeric_hyphen(next),
(ValidByte::Byte(b'_'), next) => ValidByte::alpha_numeric_hyphen(next),
(ValidByte::Byte(_), next) => ValidByte::alpha_numeric_hyphen(next),
}
}