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

cameri / nostream / 45572238906
80%

Build:
DEFAULT BRANCH: main
Ran 25 Nov 2026 08:01AM UTC
Jobs 2
Files 351
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

25 Nov 2026 07:57AM UTC coverage: 79.934% (+0.007%) from 79.927%
45572238906

push

github

web-flow
fix(admin): record a logout in the audit history only when the request has a valid session (#1234)

## Description
`POST /admin/logout` is public by design: it has to clear the session
cookie whoever sends the request. `handleLogout` called the audit hook
(`void this.auditHook?.('logout', request)`) for every request, whether
or not the request carried a valid session, so each anonymous `POST
/admin/logout` wrote an `admin.logout` record, with the caller's
address, to the shared audit history in Redis. That history is
retention-limited, so someone who can reach the admin routes could post
to this endpoint in a loop, fill it with logouts that never happened,
and push the real administrator records (settings changes, logins) out
of it.

- the audit record is now written only when the request presents a valid
session, as a cookie or a Bearer token, and only after that session has
been revoked, which is where the code already was for a valid session;
- a request with no token, a token that was not signed by the relay, a
malformed one or an expired one still gets the cookie cleared and a 200
(the response stays idempotent, as it was), and writes nothing;
- a failed revocation still answers 500 and writes nothing, as before.

I did not add a separate record for the anonymous requests. The issue
mentions that as optional, and a record per anonymous request is the
very thing that filled the history.

## Related Issue
Partly addresses #1022 (finding F-040). That issue groups nine findings,
so this PR does not close it. F-013 is in #1231.

## Motivation and Context
The audit history is the record an operator reads after an incident. A
caller with no session should not be able to write to it.

## How Has This Been Tested?



## Screenshots (if appropriate):

## Types of changes
- [ ] Non-functional change (docs, style, minor refactor)
- [x] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] B... (continued)

6201 of 8397 branches covered (73.85%)

Branch coverage included in aggregate %.

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

12578 of 15096 relevant lines covered (83.32%)

640.14 hits per line

Jobs
ID Job ID Ran Files Coverage
1 Unit - 45572238906.1 25 Nov 2026 08:03AM UTC 351
77.93
GitHub Action Run
2 Integration - 45572238906.2 25 Nov 2026 08:01AM UTC 351
36.2
GitHub Action Run
Source Files on build 45572238906
  • Tree
  • List 351
  • 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 #45572238906
  • 2dd9ba24 on github
  • Prev Build on main (#45438757963)
  • Next Build on main (#45587279340)
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