Skip to content

fix(config): add '\n' when writing to config files for POSIX compliance#5

Merged
night-slayer18 merged 1 commit intonight-slayer18:mainfrom
greymistcube:fix-json-output
Mar 10, 2026
Merged

fix(config): add '\n' when writing to config files for POSIX compliance#5
night-slayer18 merged 1 commit intonight-slayer18:mainfrom
greymistcube:fix-json-output

Conversation

@greymistcube
Copy link
Copy Markdown
Contributor

I noticed when running cat on TUI generated files such as config.json and workspaces.json, they were missing newline characters at the end making them POSIX non-compliant. I haven't fixed this for credentials.json as it relies on an external module and there's also a whole different issue pertaining to security.

@night-slayer18
Copy link
Copy Markdown
Owner

Thanks for the fix and for flagging the credentials.json issue! You're right that skipping it here makes sense since conf manages it differently.

The underlying problem is that conf creates the file with 644 permissions, leaving the session cookie and CSRF token world-readable on multi-user systems. I'll follow up with a dedicated fix in credentials.ts — after each set() call, a chmodSync to 0o600 will lock it down to owner-only. I'll track this as a separate security issue. I've been meaning to fix with encryption as well.

Merging this PR now — great catch on the POSIX compliance!

@night-slayer18 night-slayer18 merged commit 9b486bd into night-slayer18:main Mar 10, 2026
12 checks passed
@greymistcube greymistcube deleted the fix-json-output branch March 10, 2026 14:25
night-slayer18 added a commit that referenced this pull request Mar 10, 2026
- add breaking-change release notes for keychain-first credential storage and legacy plaintext deprecation

- document backend selection env vars and windows powershell setup examples

- update docker/headless auth guidance for env read-only mode

- include merged PR #5 newline-formatting fix in release notes

Signed-off-by: night-slayer18 <samanuaia257@gmail.com>
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.

2 participants