forked from claw/flaskpaste
docs: update for simplified MIME detection (v1.5.1)
This commit is contained in:
@@ -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
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
|
||||
Reference in New Issue
Block a user