• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

cameri / nostream / 45241399966
80%

Build:
DEFAULT BRANCH: main
Ran 23 Nov 2026 06:46PM UTC
Jobs 2
Files 346
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

23 Nov 2026 06:43PM UTC coverage: 79.806% (+0.03%) from 79.779%
45241399966

push

github

web-flow
fix(admin): the settings API cannot change the admin password hash through a parent path (#1231)

## Description
`PATCH /admin/settings` refuses to write `admin.passwordHash`, but
`isWriteProtectedSettingsPath` is only applied to the **path of each
request**. A request for the path `admin` passes (`admin` exists in the
default settings schema and is not itself protected), and `setByPath`
replaces the whole `admin` object, `passwordHash` included. I reproduced
it on the real route: `PATCH /settings {"path": "admin", "value": {...,
"passwordHash": <another hash>}}` answered 200 and stored the new hash.
Removing the hash (an `admin` object without it) and a batch in which
one of several changes replaces `admin` did the same.

Anyone holding a valid admin session, or a copy of its token, could
therefore set a password hash they chose, or delete it, without knowing
the current password, and the change outlives the session. This is the
same family as the session work in #1145: an admin session was meant to
be revocable and should not be able to turn itself into a permanent
credential.

- new `collectWriteProtectedSettings` and
`changedWriteProtectedSettingsPaths` in
`src/utils/settings-redaction.ts` list every write-protected value in a
settings document, by path, and report the ones that differ between two
documents (replaced, added or removed);
- the controller takes the protected values of the stored user settings
before applying the changes, applies them, and refuses the whole request
with `Path is write-protected` for each protected path that would differ
in the document it is about to save. It runs inside the write lock, next
to the existing merged validation, and before anything is saved, audited
or notified, so a refused request changes nothing;
- the checks on the request paths stay as they were; this one is on top,
so it covers a parent path, several changes in one request and any path
that ends up writing a protected value.

Still allowed: changi... (continued)

5946 of 8068 branches covered (73.7%)

Branch coverage included in aggregate %.

24 of 24 new or added lines in 2 files covered. (100.0%)

12225 of 14701 relevant lines covered (83.16%)

655.2 hits per line

Jobs
ID Job ID Ran Files Coverage
1 Unit - 45241399966.1 23 Nov 2026 06:49PM UTC 346
77.75
GitHub Action Run
2 Integration - 45241399966.2 23 Nov 2026 06:46PM UTC 346
36.19
GitHub Action Run
Source Files on build 45241399966
  • Tree
  • List 346
  • Changed 3
  • Source Changed 2
  • Coverage Changed 3
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #45241399966
  • 7ca4c180 on github
  • Prev Build on main (#45064109639)
  • Next Build on main (#45241960134)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc