Import used to report "Imported" while silently dropping anything it couldn't use. Now it says what it left out and why, in the same words on Windows, Linux and macOS.
Import still never writes a key SlimBrave doesn't offer. Issue #33 asked for unknown keys to be passed through as custom policies, and that's declined. SlimBrave runs as administrator, so a shared config file shouldn't be able to set any policy Chromium has. To keep your own policies next to SlimBrave's, see the README's new "Your own policies alongside SlimBrave" section.
What Import now tells you
- Keys SlimBrave has no setting for. For example,
left unmanaged because SlimBrave Neo does not offer it: DiskCacheSize. Keys from older versions sayno longer offers itinstead. - Values no setting writes, or of the wrong type. For example,
IncognitoModeAvailability=0orDefaultNotificationsSetting=3. - Names in the wrong letter case, with the right spelling, such as
torDisabled (use TorDisabled). Names now match exactly on all three platforms. Windows used to accept any letter case, and Linux and macOS dropped mis-cased names silently. - Unknown top-level fields, which are ignored.
Each reason lists up to five names, then and N more. The six presets import without a note everywhere.
Behaviour changes
- Empty imports exit 1.
--importof a file in which nothing can be applied now exits 1 and writes nothing. It used to apply an empty policy over SlimBrave's. - Files Windows can't read are refused everywhere. That covers two keys that differ only in letter case, an empty key, and a number too large to read. Windows PowerShell 5.1 can't read such files, so Linux and macOS now refuse them too, and a file imports the same way on every platform.
- Bad DoH templates are refused. That covers a template that isn't text, or one that holds a control or text-direction character.
- Longer import results in the TUI. The Linux and macOS TUI shows the result on up to four lines, instead of cutting it off after the file path.
- File name only. The result names the file, not its full path.
Fixed
- Two crashes in the Linux and macOS TUI:
- a config with a NUL character in
DnsMode - a value nested tens of thousands of levels deep
- a config with a NUL character in
- Escaping. Text from an imported file can no longer put control or escape sequences on your terminal or in the status bar, or draw outside the DoH template field. File names still show as they are, a Cyrillic, CJK or emoji name included.
Known gaps
Both are listed in AUDIT.md:
- The Windows import changes haven't had a manual run. They pass CI's PowerShell parse and analyzer checks, but haven't yet run on Windows PowerShell 5.1. The steps are under Runtime checks owed.
- Windows and Python parse some unusual JSON differently. For example, Windows reads
"\/Date(0)\/"as a date.