2 Jul 2025 |
emily | (I believe that case-sensitive APFS will still do Unicode normalization which carries similar evils FWIW, although those are at least evils that don't break checking out the Linux source tree) | 23:40:05 |
Katalin 🔪 | eh, normalization is actually fine imo | 23:42:35 |
Randy Eckenrode | Didn’t Apple try to get rid of normalization with the APFS transition, and it caused a bunch of problems? | 23:42:54 |
Katalin 🔪 | it’s pretty much the opposite of case insensitivity :P | 23:43:01 |
Katalin 🔪 | and not locale-dependent… right? | 23:43:40 |
Randy Eckenrode | It’s also weird that iOS is case sensitive while macOS is not. | 23:44:24 |
Randy Eckenrode | * It’s also weird that iOS is case-sensitive while macOS is not. | 23:44:35 |
emily | it is Unicode version dependent. | 23:45:35 |
emily | and it fundamentally leads to the same CVE generator that case-insensitivity does (filenames that are secretly other files) | 23:46:16 |
emily | Unicode is not a good thing for a kernel to try and get itself involved in | 23:46:27 |
Zhaofeng Li | Oh right, before the advent of the files app a few year ago, did file pickers just not exist on iOS? | 23:48:43 |
emily | https://github.com/jj-vcs/jj/blob/312c610c592b41ec81f0661e124fd660cb510ab0/lib/tests/test_local_working_copy.rs#L1845 onwards has a bunch of cursed regression tests for a CVE that came from filesystems not treating flenames as opaque | 23:48:52 |
Zhaofeng Li | and users just weren't exposed to files? | 23:48:55 |
emily | including a Mac exclusive one: #[test_case("\u{200c}.git/pwned"; "root .git dir")] | 23:49:15 |
emily | because Unicode normalization strips ZERO WIDTH NON-JOINER 🤪 | 23:49:38 |
Katalin 🔪 | lmao | 23:49:58 |
emily | Windows gets to join in too:
#[test_case(".git/pwned", &["GIT~1/pwned", "GI2837~1/pwned"]; "root .git dir short name")]
#[test_case(".jj/pwned", &["JJ~1/pwned", "JJ2E09~1/pwned"]; "root .jj dir short name")]
#[test_case(".git/pwned", &[".GIT./pwned"]; "root .git dir trailing dots")]
#[test_case(".jj/pwned", &[".JJ../pwned"]; "root .jj dir trailing dots")]
#[test_case("sub/.git", &["sub/.GIT.."]; "sub .git file trailing dots")]
#[test_case("sub/.jj", &["sub/.JJ."]; "sub .jj file trailing dots")]
| 23:50:00 |
Katalin 🔪 | okay maybe it should just enforce that file-names are utf-8 and nothing else | 23:50:13 |
emily | meanwhile Linux-native filesystems are unaffected because they don't try and be clever about filenames | 23:50:17 |
emily | yes, this is sensible | 23:50:25 |
emily | e.g. ZFS utf8only | 23:50:28 |
Randy Eckenrode | In reply to @zhaofeng:zhaofeng.li Oh right, before the advent of the files app a few year ago, did file pickers just not exist on iOS? The picker came before the separate Files app IIRC. Before that, apps had to manage files on their own. | 23:50:32 |
emily | that I can approve of, since if UTF-8 ever changes I'm going to quit programming | 23:50:48 |
emily | FWIW i think case-insensitivity is reasonable from a user interface perspective | 23:51:42 |
emily | but all these normalization schemes are just a bad idea to put in the kernel and a bad idea to put in the layer that programs use to store and organize their own data | 23:52:01 |
emily | I'm curious, does iOS let end users create files that differ only in case? | 23:53:29 |
Katalin 🔪 | let me see | 23:53:42 |
Katalin 🔪 |  Download 8738D916-9444-43A1-BD38-C82A51F3C2B8.jpeg | 23:54:23 |
Randy Eckenrode |  Download 15CAE2DD-B9A1-4B9E-926F-3556419745C8.jpeg | 23:54:41 |
Randy Eckenrode | In reply to @emilazy:matrix.org I'm curious, does iOS let end users create files that differ only in case? Yes (see above). | 23:54:50 |