Skip to content

Keep yaz-client authentication out of disk history - #249

Merged
adamdickmeiss merged 1 commit into
masterfrom
keep-yaz-client-auth-out-of-disk-history
Nov 7, 2026
Merged

adamdickmeiss merged 1 commit into
masterfrom
keep-yaz-client-auth-out-of-disk-history

Conversation

@adamdickmeiss

Copy link
Copy Markdown
Contributor

Preserve authentication recall within the current session while excluding these commands from persistent history. Filter existing entries on load and remove them from disk on normal exit.

Redact passwords and OpenStyle strings in confirmations and settings. Cover abbreviations, nested push_command entries, and history cleanup with regression tests. Document the behavior.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The test can fail on clean builds or use a stale client executable, and early exits from command files can leave persisted credentials uncleared.

2 open issues
What changed in this PR

This PR separates yaz-client’s session history from persistent history to keep authentication commands off disk while preserving in-session recall.

Changes:

  • Filter authentication commands, including abbreviations and nested push_command entries, and clean existing history on normal exit.
  • Redact passwords and OpenStyle strings in confirmations and settings.
  • Add regression tests and document the behavior and its limits.
File Description
test/​test_client_history.sh Tests persistent-history filtering and cleanup.
test/​test_client_history.c Tests command classification, session recall, and redaction.
test/​Makefile.am Registers and links the new tests.
test/​.gitignore Ignores the new test executable.
doc/​yaz-client-man.xml Documents history filtering and credential redaction.
client/​fhistory.h Adds an optional history-filter predicate.
client/​fhistory.c Filters history entries and supports empty-file cleanup.
client/​client.c Classifies authentication commands and redacts displayed credentials.

Review effort: Balanced

Comment thread test/Makefile.am Resolved
Comment thread client/client.c Resolved
@adamdickmeiss
adamdickmeiss force-pushed the keep-yaz-client-auth-out-of-disk-history branch 2 times, most recently from 7c189d2 to f986eaf Compare November 7, 2026 14:20
@adamdickmeiss
adamdickmeiss requested a balanced review from Copilot November 7, 2026 14:23

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Startup commands can exit before filtered history is loaded, leaving credentials on disk after a normal exit, and duplicate tests are not registered to run under make check.

1 open issue
2 resolved since last review

Review effort: Balanced

Comment thread test/test_client_history.c Resolved
@adamdickmeiss
adamdickmeiss force-pushed the keep-yaz-client-auth-out-of-disk-history branch from f986eaf to d742f96 Compare November 7, 2026 14:29
@adamdickmeiss
adamdickmeiss requested a balanced review from Copilot November 7, 2026 14:32

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Persistent history can still leak plaintext passwords through multiline entries, while startup scripts that exit early bypass cleanup of previously saved credentials.

1 open issue
1 resolved since last review

Review effort: Balanced

Comment thread client/client.c Resolved
Preserve authentication recall within the current session while
excluding these commands from persistent history. Filter existing
entries on load and remove them from disk on normal exit.

Redact passwords and OpenStyle strings in confirmations and settings.
Cover abbreviations, nested push_command entries, and history cleanup
with regression tests. Document the behavior.
@adamdickmeiss
adamdickmeiss force-pushed the keep-yaz-client-auth-out-of-disk-history branch from d742f96 to 0c187db Compare November 7, 2026 14:39
@adamdickmeiss
adamdickmeiss requested a balanced review from Copilot November 7, 2026 14:41

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

A startup command file that executes quit exits before history is loaded, leaving previously saved credentials on disk despite a normal exit.

No open issues 🎉

1 resolved since last review

Review effort: Balanced

@adamdickmeiss
adamdickmeiss merged commit a4612d1 into master Nov 7, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants