Merge branch 'main' into wt/t_fc02d8b6
All checks were successful
ci / test (pull_request) Successful in 3m2s
All checks were successful
ci / test (pull_request) Successful in 3m2s
This commit is contained in:
commit
dcb98132e2
13 changed files with 552 additions and 21 deletions
|
|
@ -37,6 +37,15 @@ fn name_with_dotdot_or_slash_rejected() {
|
|||
assert!(file::safe_name("ok.txt").is_ok());
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn name_with_bidi_or_controls_rejected() {
|
||||
assert!(file::safe_name("ok.txt").is_ok());
|
||||
assert!(file::safe_name("safe.txt\u{202e}gpj.exe").is_err());
|
||||
assert!(file::safe_name("a\u{1b}b.txt").is_err());
|
||||
assert!(file::safe_name("a\u{009b}b.txt").is_err());
|
||||
assert!(file::safe_name("a\tb.txt").is_err());
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn oversize_rejected_before_send() {
|
||||
let too_big = vec![0u8; MAX_BYTES + 1];
|
||||
|
|
|
|||
Loading…
Reference in a new issue