docs: update for simplified MIME detection (v1.5.1)
Some checks failed
CI / Lint & Format (push) Failing after 16s
CI / Unit Tests (push) Has been skipped
CI / Memory Leak Check (push) Has been skipped
CI / SBOM Generation (push) Has been skipped
CI / Security Scan (push) Successful in 19s
CI / Security Tests (push) Has been skipped
CI / Advanced Security Tests (push) Has been skipped

This commit is contained in:
Username
2025-12-26 19:52:40 +01:00
parent a7f1c09634
commit 6da80aec76
6 changed files with 29 additions and 32 deletions

View File

@@ -707,17 +707,16 @@ export FLASKPASTE_MIN_ENTROPY_SIZE=256 # Only check content >= this size (defaul
- Plaintext (valid UTF-8) is rejected with 400
- Only binary content (invalid UTF-8) is allowed
**Configuration:**
```bash
export FLASKPASTE_REQUIRE_BINARY=1 # Reject plaintext (0=disabled)
export FLASKPASTE_REQUIRE_BINARY=1 # Reject recognizable formats (0=disabled)
```
**Response (400 Bad Request):**
**Response (400 Bad Request):**
```json
{
"error": "Recognizable format not allowed",
"detected": "text/plain",
"detected": "text/plain",
"hint": "Encrypt content before uploading (fpaste encrypts by default)"
}
```
@@ -729,16 +728,11 @@ export FLASKPASTE_REQUIRE_BINARY=1 # Reject recognizable formats (0=disabled)
| Binary | Valid UTF-8 text | Reject plaintext |
Use both together for maximum encryption enforcement:
|--------|---------|-----------------|
| Entropy | Random-looking data | Compressed files pass |
| Binary | No magic bytes + invalid UTF-8 | Minimal |
Use both together for maximum encryption enforcement:
```bash
export FLASKPASTE_REQUIRE_BINARY=1
export FLASKPASTE_MIN_ENTROPY=6.0
export FLASKPASTE_MIN_SIZE=64
```
export FLASKPASTE_REQUIRE_BINARY=1
export FLASKPASTE_MIN_ENTROPY=6.0
export FLASKPASTE_MIN_SIZE=64
```
---