mirror of
https://github.com/tauri-apps/tauri.git
synced 2024-11-24 12:14:05 +03:00
fix(core): fix require_literal_leading_dot
flipped behavior (#7227)
This commit is contained in:
parent
28921cb8e8
commit
066c09a6ea
@ -7,6 +7,7 @@
|
||||
"bug": "Bug Fixes",
|
||||
"pref": "Performance Improvements",
|
||||
"changes": "What's Changed",
|
||||
"sec": "Security fixes",
|
||||
"deps": "Dependencies"
|
||||
},
|
||||
"defaultChangeTag": "changes",
|
||||
|
5
.changes/core-leading-dot.md
Normal file
5
.changes/core-leading-dot.md
Normal file
@ -0,0 +1,5 @@
|
||||
---
|
||||
'tauri': 'patch:sec'
|
||||
---
|
||||
|
||||
Fix regression in `1.4` where the default behavior of the file system scope was changed to allow reading hidden files and directories by default.
|
@ -2102,7 +2102,7 @@
|
||||
}
|
||||
},
|
||||
"requireLiteralLeadingDot": {
|
||||
"description": "Whether or not paths that contain components that start with a `.` will require that `.` appears literally in the pattern; `*`, `?`, `**`, or `[...]` will not match. This is useful because such files are conventionally considered hidden on Unix systems and it might be desirable to skip them when listing files.\n\nDefaults to `false` on Unix systems and `true` on Windows",
|
||||
"description": "Whether or not paths that contain components that start with a `.` will require that `.` appears literally in the pattern; `*`, `?`, `**`, or `[...]` will not match. This is useful because such files are conventionally considered hidden on Unix systems and it might be desirable to skip them when listing files.\n\nDefaults to `true` on Unix systems and `false` on Windows",
|
||||
"type": [
|
||||
"boolean",
|
||||
"null"
|
||||
|
@ -1329,7 +1329,7 @@ pub enum FsAllowlistScope {
|
||||
/// conventionally considered hidden on Unix systems and it might be
|
||||
/// desirable to skip them when listing files.
|
||||
///
|
||||
/// Defaults to `false` on Unix systems and `true` on Windows
|
||||
/// Defaults to `true` on Unix systems and `false` on Windows
|
||||
// dotfiles are not supposed to be exposed by default on unix
|
||||
#[serde(alias = "require-literal-leading-dot")]
|
||||
require_literal_leading_dot: Option<bool>,
|
||||
|
@ -114,9 +114,9 @@ impl Scope {
|
||||
} => *require,
|
||||
// dotfiles are not supposed to be exposed by default on unix
|
||||
#[cfg(unix)]
|
||||
_ => false,
|
||||
#[cfg(windows)]
|
||||
_ => true,
|
||||
#[cfg(windows)]
|
||||
_ => false,
|
||||
};
|
||||
|
||||
Ok(Self {
|
||||
@ -287,9 +287,9 @@ mod tests {
|
||||
require_literal_separator: true,
|
||||
// dotfiles are not supposed to be exposed by default on unix
|
||||
#[cfg(unix)]
|
||||
require_literal_leading_dot: false,
|
||||
#[cfg(windows)]
|
||||
require_literal_leading_dot: true,
|
||||
#[cfg(windows)]
|
||||
require_literal_leading_dot: false,
|
||||
..Default::default()
|
||||
},
|
||||
}
|
||||
|
@ -2102,7 +2102,7 @@
|
||||
}
|
||||
},
|
||||
"requireLiteralLeadingDot": {
|
||||
"description": "Whether or not paths that contain components that start with a `.` will require that `.` appears literally in the pattern; `*`, `?`, `**`, or `[...]` will not match. This is useful because such files are conventionally considered hidden on Unix systems and it might be desirable to skip them when listing files.\n\nDefaults to `false` on Unix systems and `true` on Windows",
|
||||
"description": "Whether or not paths that contain components that start with a `.` will require that `.` appears literally in the pattern; `*`, `?`, `**`, or `[...]` will not match. This is useful because such files are conventionally considered hidden on Unix systems and it might be desirable to skip them when listing files.\n\nDefaults to `true` on Unix systems and `false` on Windows",
|
||||
"type": [
|
||||
"boolean",
|
||||
"null"
|
||||
|
Loading…
Reference in New Issue
Block a user