mirror of
https://github.com/kuhyx/utils.git
synced 2026-11-10 21:27:14 +01:00
|
Some checks are pending
crdt-sync pre-commit / pre-commit (push) Waiting to run
crdt-sync tests / test (push) Waiting to run
dependency freshness / dependencies on newest stable (push) Waiting to run
file length / file-length (push) Waiting to run
md-naming / markdown naming convention (push) Waiting to run
palette drift / palette (push) Waiting to run
repo-contract / repo contract (push) Waiting to run
shared gate tests / gate unit tests (push) Waiting to run
**FileCredentialStore.save wrote every save through one fixed `<cache>.tmp`.** Two processes share a credential cache (a long-running stream and a periodic sync), so one could rename the other's half-written temp file into place and leave a truncated refresh token behind. Each save now gets its own mkstemp file in the same directory -- created 0600 from the outset, so the token is never world-readable -- and replaces the cache atomically. A failed write unlinks its temp file and leaves the previous cache untouched. Tests cover: no temp file left after a save, distinct temp names per write, and an interrupted write keeping the old credentials with no leaked temp. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018RHwVPyiiQMPh4M3JQwQku |
||
|---|---|---|
| .. | ||
| tests | ||
| __init__.py | ||
| _autherrors.py | ||
| _config.py | ||
| _credentials.py | ||
| _device.py | ||
| _fberrors.py | ||
| _fbkeys.py | ||
| _firebase_auth.py | ||
| _firebase.py | ||
| _gherrors.py | ||
| _github.py | ||
| _hlc.py | ||
| _http.py | ||
| _log.py | ||
| _mirror.py | ||
| _pull.py | ||
| _record.py | ||
| _remote.py | ||
| _revisions.py | ||
| _store.py | ||
| _sync.py | ||
| _syncargs.py | ||
| _syncstate.py | ||