mirror of
https://github.com/tauri-apps/plugins-workspace.git
synced 2026-09-20 21:20:42 +02:00
Merge commit from fork
* fix(shell): properly validate open scope * change empty regex to an impossible match --------- Co-authored-by: Lucas Nogueira <lucas@tauri.app> Co-authored-by: Chip Reed <chip@chip.sh>
This commit is contained in:
co-authored by
Lucas Nogueira
Chip Reed
parent
4dd5c51436
commit
9cf0390a52
@@ -18,6 +18,9 @@ pub struct Config {
|
||||
#[serde(untagged, deny_unknown_fields)]
|
||||
#[non_exhaustive]
|
||||
pub enum ShellAllowlistOpen {
|
||||
/// Shell open API allowlist is not defined by the user.
|
||||
/// In this case we add the default validation regex (same as [`Self::Flag(true)`]).
|
||||
Unset,
|
||||
/// If the shell open API should be enabled.
|
||||
///
|
||||
/// If enabled, the default validation regex (`^((mailto:\w+)|(tel:\w+)|(https?://\w+)).+`) is used.
|
||||
@@ -35,6 +38,6 @@ pub enum ShellAllowlistOpen {
|
||||
|
||||
impl Default for ShellAllowlistOpen {
|
||||
fn default() -> Self {
|
||||
Self::Flag(false)
|
||||
Self::Unset
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user