Skip to content

Commit 3cc4ad3

Browse files
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 <[email protected]> --------- Co-authored-by: Fabian-Lars <[email protected]>
1 parent d91bfa5 commit 3cc4ad3

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

.changes/change-pr-12884.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"tauri-utils": "patch:bug"
3+
---
4+
5+
fix: allow double `--` in permissions as command can have double `__`

crates/tauri-utils/src/acl/identifier.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,8 @@ impl ValidByte {
104104

105105
(_, IDENTIFIER_SEPARATOR) => Some(ValidByte::Separator),
106106
(ValidByte::Separator, next) => ValidByte::alpha_numeric(next),
107-
(ValidByte::Byte(b'-'), next) => ValidByte::alpha_numeric(next),
107+
(ValidByte::Byte(b'-'), next) => ValidByte::alpha_numeric_hyphen(next),
108+
(ValidByte::Byte(b'_'), next) => ValidByte::alpha_numeric_hyphen(next),
108109
(ValidByte::Byte(_), next) => ValidByte::alpha_numeric_hyphen(next),
109110
}
110111
}

0 commit comments

Comments
 (0)