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

umputun / remark42 / 24592686760
84%

Build:
DEFAULT BRANCH: master
Ran 18 Apr 2026 12:38AM UTC
Jobs 1
Files 50
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

18 Apr 2026 12:35AM UTC coverage: 84.16% (-0.2%) from 84.345%
24592686760

push

github

umputun
fix(api): require explicit ?site= in matchSiteID middleware

matchSiteID guarded most authenticated and admin routes with
`if siteID != "" && user.SiteID != siteID`. Dropping the ?site= query
parameter made the check no-op and any authenticated user passed the
middleware. Downstream handlers fell back to reading site from the JSON
body or just used the empty string, so on email/telegram subscribe
endpoints (which read site from body) a user authenticated to siteA
could perform actions targeting siteB without the cross-site guard
ever firing.

Require ?site= to be present and to match user.SiteID. Body-only site
flows are still supported provided the URL also carries the matching
?site= — both must agree, which removes the bypass and keeps the
declared site visible to the middleware.

Reproduction TestRest_matchSiteID enumerates four cases (matching,
mismatched, missing, empty). Existing test calls that relied on the
implicit pass had to add ?site=remark42 to the URL: the addComment
helper now derives the param from c.Locator.SiteID, picture upload
URL gets the param explicitly, and the email/telegram subscribe table
adds it to every endpoint. The negative cases that previously asserted
StatusBadRequest from the handler now correctly assert StatusForbidden
from the middleware.

3 of 3 new or added lines in 1 file covered. (100.0%)

16 existing lines in 1 file now uncovered.

6211 of 7380 relevant lines covered (84.16%)

34.56 hits per line

Coverage Regressions

Lines Coverage ∆ File
16
76.49
-2.81% backend/app/rest/api/rest_private.go
Jobs
ID Job ID Ran Files Coverage
1 24592686760.1 18 Apr 2026 12:38AM UTC 50
84.16
GitHub Action Run
Source Files on build 24592686760
  • Tree
  • List 50
  • Changed 3
  • Source Changed 0
  • Coverage Changed 3
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • f8ba3877 on github
  • Prev Build on master (#24547191483)
  • Next Build on master (#24592734878)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc