mirror of
https://github.com/tauri-apps/plugins-workspace.git
synced 2026-06-12 14:17:48 +02:00
feat(shell): enhance regex validators to match on entire string (#1603)
This commit is contained in:
committed by
GitHub
parent
b1e5cae5a0
commit
34df132fb1
@@ -25,6 +25,9 @@ pub enum ShellAllowlistOpen {
|
||||
|
||||
/// Enable the shell open API, with a custom regex that the opened path must match against.
|
||||
///
|
||||
/// The regex string is automatically surrounded by `^...$` to match the full string.
|
||||
/// For example the `https?://\w+` regex would be registered as `^https?://\w+$`.
|
||||
///
|
||||
/// If using a custom regex to support a non-http(s) schema, care should be used to prevent values
|
||||
/// that allow flag-like strings to pass validation. e.g. `--enable-debugging`, `-i`, `/R`.
|
||||
Validate(String),
|
||||
|
||||
Reference in New Issue
Block a user