mirror of
https://github.com/storytold/wordcraft.git
synced 2026-10-25 02:47:33 -06:00
info, text, convert, render and inspect took no password, though file.open understood one, so an agent driving the CLI could not open a protected document at all. --password, --password-file and WORDCRAFT_PASSWORD, in that order. The file form exists because a password on a command line is readable by every other process on the machine; a trailing newline is dropped so a file written by echo works. Never logged, never named in an error. Rebased onto current main, which moved `open` from &str to &Path so that a file name that isn't valid Unicode no longer crashes the CLI (#1440). Both changes touch the same function, so the resolution keeps their shape: the closure that substitutes the real path still stands, and it takes the password as a second argument. Co-authored-by: Bra1nZ <bra1nz@astraoffice.com> Co-authored-by: Brandon Thomas <echelon@gmail.com>