mirror of
https://github.com/Ark0N/Codeman.git
synced 2026-11-15 02:49:33 +01:00
fix(files): the editor never reaches Codeman's own .env by another spelling, and a save keeps the file's group (#797)
The four review items of #797, applied at merge. The editor's name rule lowercases, the data dir's .env pattern did not: .codeman/.ENV passed both, and on a case-insensitive filesystem (the macOS default) that is ~/.codeman/.env, the login file codeman attach reads. A session whose workspace is the home folder could open and save it. The pattern is case-insensitive now, pinned in the blocklist table and on the three editor routes. A save writes a new file and renames it over the old one, so the file took the server's own group: a 0640 .env owned you:www-data came back you:you and the web server lost read access. The save now puts the old user and group back where the account may (best effort), and the wiki says mode and group instead of permissions. Tests: an .env in an outside worktree is refused on edit=1 and PUT too, now that the editor's own gate lets dotenv through; the comment on why .env.example is blocked for downloads and attachments is back. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
1 parent
18b309fc02
commit
59d4bbca2d
7 files changed
+89
-6
No files matched your search
@@ -77,9 +77,10 @@ convenient:
|
||||
unrecoverable to someone who wanted to fix a typo.
|
||||
- **Non-UTF-8 content is refused**, verified by a round-trip comparison.
|
||||
- **Dotenv files are editable, other credential files are not.** `.env`, `.env.local` and
|
||||
`prod.env` open in the editor like any config file, and a save keeps the file's permissions
|
||||
(a `0600` file stays `0600`). `.npmrc`, `credentials.json`, anything under `.ssh/` and
|
||||
Codeman's own `~/.codeman/.env` stay read-only here.
|
||||
`prod.env` open in the editor like any config file, and a save keeps the file's mode (a
|
||||
`0600` file stays `0600`) and, where your account may set it, its group, so a `.env` a web
|
||||
server reads through its group stays readable. `.npmrc`, `credentials.json`, anything under
|
||||
`.ssh/` and Codeman's own `~/.codeman/.env` stay read-only here.
|
||||
|
||||
## Attachments
|
||||
|
||||
|
||||
Reference in new issue
Block a user