sec: FIX: doc_id precheck to prevent app DoS #26

This commit is contained in:
Caffeine Fueled 2026-05-25 01:37:46 +02:00
parent 44dc0ee6b6
commit 25b7b21412
Signed by: cf7
GPG key ID: CA295D643074C68C
2 changed files with 26 additions and 4 deletions

View file

@ -23,7 +23,7 @@ The goal is to keep it simple! For feature-rich solutions please check out [hedg
**Available**:
- live collab notepad
- line numbers
- custom path `{pad_id}` for more privacy
- custom path `{pad_id}` for more privacy (164 chars, `[a-zA-Z0-9_-]`)
- optional caching with valkey/redis
- pad creation with HTTP post requests with curl (see *Usage*)
- `{pad_id}/raw` HTTP endpoint
@ -117,6 +117,7 @@ The following environment variables can be configured:
| `MAX_TEXT_SIZE` | `5` | Maximum text size in MB (5MB default) |
| `MAX_CONNECTIONS_PER_IP` | `10` | Maximum concurrent connections per IP address |
| `RETENTION_HOURS` | `48` | How long to retain pads in hours after last access |
| `MAX_ROOMS` | `10000` | Maximum number of pads kept in memory; new pads are refused (WS close 1008) when full until cleanup reclaims space |
| `DESCRIPTION` | `powered by aukpad.com` | Instance description shown on info page |
---