Skip to content

Release diff: master → previous_release - #24

Closed
Th0rgal wants to merge 2 commits into
previous_releasefrom
master
Closed

Release diff: master → previous_release#24
Th0rgal wants to merge 2 commits into
previous_releasefrom
master

Conversation

@Th0rgal

@Th0rgal Th0rgal commented Dec 28, 2025

Copy link
Copy Markdown
Member

Automated PR. The 'previous_release' branch is force-updated on every push to master to point at the commit before the push, so this PR always represents the current release diff.


Note

Strengthens auth, networking, and UX across API, plugin, and web.

  • API security/utilities: New auth module with parse_bearer_token, sha256_hex, constant‑time comparisons; routes (handshake, ingest, heartbeat, observations, callbacks) refactored to use it and validate tokens in constant time
  • Server address propagation: Extracts address from X-Server-Address/X-Forwarded-For/X-Real-IP; persists to servers.callback_url; plugin sends X-Server-Address when configured
  • CORS tightening: Adds CORS_PERMISSIVE_DEV flag; defaults to restrictive CORS unless explicitly set; config/env updated
  • Plugin robustness: DiskSpool writes to temp then atomically renames; sampling predicate adjusted; always capture PLAYER_ABILITIES despite exemptions; improved USE_ITEM_ON field extraction; new api.server_address config; handshake/ingest include address; version bump to 0.3.0
  • Dashboard/UI: Connection status shows "unknown" when API unreachable; overall status logic respects optional server address; minor truncation/placeholder handling; docs updated for config, CORS, and connection metrics

Written by Cursor Bugbot for commit fdd73b5. This will update automatically on new commits. Configure here.

* feat: implement automatic server address discovery for API ping feature

Add Option 4 (hybrid auto-detect with override) for the dashboard's "API → Server" ping feature:

**Plugin Changes:**
- Add `server_address` config option to AsyncAnticheatConfig
- Send `X-Server-Address` header from plugin when configured

**API Changes:**
- Extract and store server address from headers in order of priority:
  1. Explicit `X-Server-Address` header (from plugin config)
  2. Auto-detected from `X-Forwarded-For` header
  3. Auto-detected from `X-Real-IP` header
- Filter out local/private IPs to avoid storing unusable addresses
- Store detected address in `callback_url` column for both handshake and ingest endpoints
- Moved `parse_bearer_token` and `sha256_hex` to shared `auth` module
- Add `extract_server_address` and `is_local_ip` utilities to `auth` module

**Security Improvements:**
- Add constant-time comparison for module callback token authentication
- Make CORS permissive mode explicit opt-in (requires `CORS_PERMISSIVE_DEV=true`)
- Use `subtle` crate for constant-time operations

**Documentation:**
- Update dashboard docs to explain automatic detection and manual override
- Clarify priority order and how the feature works

This allows most servers to automatically report their IP without configuration, while providing an override for edge cases (NAT, reverse proxies, etc).

* chore: bump plugin version to 0.3.0
@vercel

vercel Bot commented Dec 28, 2025

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
asyncanticheat.com Ready Ready Preview, Comment Dec 28, 2025 5:33pm

Comment thread api/src/auth.rs
|| ip.starts_with("172.17.")
|| ip.starts_with("172.18.")
|| ip.starts_with("172.19.")
|| ip.starts_with("172.2")

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Private IP detection incorrectly matches public 172.2.x.x addresses

The pattern ip.starts_with("172.2") incorrectly matches public IP addresses in the 172.2.x.x range as local/private. RFC 1918 defines the private range as 172.16.0.0/12 (172.16.0.0 to 172.31.255.255), so 172.2.x.x addresses are actually public. This pattern was likely intended to match 172.20-172.29, but as written it also matches 172.2.x.x. Servers with public IPs like 172.2.1.1 would have their addresses rejected by extract_server_address, causing the dashboard ping feature to not work for those servers.

Fix in Cursor Fix in Web

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant