Skip to content

macOS: stop truncating long values, verify every store - #26

Merged
royashbrook merged 2 commits into
mainfrom
fix/macos-long-values
Sep 24, 2026
Merged

royashbrook merged 2 commits into
mainfrom
fix/macos-long-values

Conversation

@royashbrook

Copy link
Copy Markdown
Owner

fix #25

single-line values on macOS now go to security -i, which reads the whole add command from stdin. the value still never touches argv, and the 128-byte prompt limit is gone. security -i has its own 4096-byte command-line limit, so a longer single-line value takes the argv path, same as multiline values already do.

every single-line store is now read back and compared. if the keychain did not keep the value intact, hush removes it and fails loudly, it never reports a cut value as stored.

tests: long values (129, 1000, 5000 bytes) and awkward characters round-trip in test/test.sh on every backend. against the old script the same tests fail at 128 bytes. the fake security in the sync suites learned -i, and the lastpass suite now asserts single-line stores arrive over stdin.

known limit, unchanged: macOS returns a value holding control characters (a tab) as hex. the read-back now refuses those loudly instead of storing something that reads back wrong.

bumps to 1.6.1.

@royashbrook
royashbrook merged commit 858d8a6 into main Sep 24, 2026
1 check passed
@royashbrook
royashbrook deleted the fix/macos-long-values branch September 24, 2026 04:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

macOS: hush set silently truncates single-line values over 128 bytes

1 participant