We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
*
1 parent fdc11e6 commit fd0deb9Copy full SHA for fd0deb9
tuf/src/metadata.rs
@@ -66,7 +66,6 @@ static PATH_ILLEGAL_STRINGS: &[&str] = &[
66
"\"",
67
"|",
68
"?",
69
- "*",
70
// control characters, all illegal in FAT
71
"\u{000}",
72
"\u{001}",
@@ -2314,6 +2313,23 @@ mod test {
2314
2313
}
2315
2316
+ #[test]
2317
+ fn allow_asterisk_in_target_path() {
2318
+ let good_paths = &[
2319
+ "*",
2320
+ "*/some/path",
2321
+ "*/some/path/",
2322
+ "some/*/path",
2323
+ "some/*/path/*",
2324
+ ];
2325
+
2326
+ for path in good_paths.iter() {
2327
+ assert!(safe_path(path).is_ok());
2328
+ assert!(TargetPath::new(path.to_string()).is_ok());
2329
+ assert!(MetadataPath::new(path.to_string()).is_ok());
2330
+ }
2331
2332
2333
#[test]
2334
fn path_matches_chain() {
2335
let test_cases: &[(bool, &str, &[&[&str]])] = &[
0 commit comments