Skip to content

Commit 7021cb5

Browse files
committed
Update Readme
1 parent 1c92b2d commit 7021cb5

1 file changed

Lines changed: 28 additions & 24 deletions

File tree

README.md

Lines changed: 28 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,10 @@
44

55
SayNoMore is a simple One Time Secret service for sharing passwords or sensitive information that can only be viewed once.
66

7-
> ### ⚠ BREAKING UPDATE — v6 (end-to-end encryption)
8-
>
7+
> ### ⚠ BREAKING UPDATE (end-to-end encryption)
8+
>
99
> Since **v6**, encryption and decryption happen **entirely in the browser** (Web Crypto, AES-256-GCM). The server never sees the plaintext nor the AES key, in any phase. **Read before upgrading:**
10+
>
1011
> - **Secrets created with previous versions become unreadable** (the on-disk format and the key scheme changed). Since secrets are ephemeral (max 30 days), do a clean cutover: empty the `data/` folder on deploy, or wait for old secrets to expire.
1112
> - **Creating and reading now require JavaScript and a secure context.** On clearnet you need **HTTPS**; on a `.onion` hidden service it works. On plain-HTTP clearnet, encryption is disabled with an explicit on-screen message — never a silent downgrade.
1213
> - **OpenSSL is no longer required on the server** for secret encryption (it moved to the browser); it is only used by the optional email notifications over SSL/STARTTLS.
@@ -27,7 +28,7 @@ SayNoMore is a simple One Time Secret service for sharing passwords or sensitive
2728
- 🧅 Tor support: links generated on `.onion` hidden services automatically use `http://` instead of `https://`
2829
- 💻 No database required, just the file system
2930

30-
## 🚀 How it works (v6, end-to-end)
31+
## 🚀 How it works
3132

3233
**Creating a secret**
3334

@@ -119,19 +120,19 @@ information for an attacker.
119120

120121
The main parameters are constants at the top of `index.php`, `view.php`, and `cleanup.php`:
121122

122-
| Constant | File | Default | Description |
123-
|---|---|---|---|
124-
| `DEFAULT_TTL_DAYS` | index.php | 7 | Default validity in days for new secrets |
125-
| `MIN_TTL_DAYS` | index.php | 1 | Minimum TTL selectable by the user |
126-
| `MAX_TTL_DAYS` | index.php | 30 | Maximum TTL selectable by the user |
127-
| `MAX_SECRET_BYTES` | index.php | 65536 (64 KB) | Plaintext size limit (enforced client-side, re-checked server-side as `ciphertext − 16` GCM tag) |
128-
| `MAX_CT_B64_BYTES` | index.php | 98304 (96 KB) | Hard cap on the base64 ciphertext accepted by the server (bounds memory before decoding) |
129-
| `GCM_IV_LEN` | index.php | 12 | Expected GCM IV length in bytes (validated server-side) |
130-
| `MAX_ATTEMPTS` | view.php | 5 | Maximum number of password attempts before destruction |
131-
| `CLEANUP_ENABLED` | index.php / view.php | true | Master switch for in-request cleanup. Set to `false` to disable it entirely (useful when you run `cleanup.php` via cron) |
132-
| `CLEANUP_PROB_PCT` | index.php / view.php | 50 | Probability (%) of running a global cleanup on each request (ignored when `CLEANUP_ENABLED` is `false`) |
133-
| `TMP_ORPHAN_TTL` | all | 3600 | Orphan temporary files (failed writes) older than X seconds are removed |
134-
| `LEGACY_TTL_SEC` | all | 7 days | Fallback TTL for secrets created with previous versions (`created` field) |
123+
| Constant | File | Default | Description |
124+
| ------------------ | -------------------- | ------------- | ------------------------------------------------------------------------------------------------------------------------ |
125+
| `DEFAULT_TTL_DAYS` | index.php | 7 | Default validity in days for new secrets |
126+
| `MIN_TTL_DAYS` | index.php | 1 | Minimum TTL selectable by the user |
127+
| `MAX_TTL_DAYS` | index.php | 30 | Maximum TTL selectable by the user |
128+
| `MAX_SECRET_BYTES` | index.php | 65536 (64 KB) | Plaintext size limit (enforced client-side, re-checked server-side as `ciphertext − 16` GCM tag) |
129+
| `MAX_CT_B64_BYTES` | index.php | 98304 (96 KB) | Hard cap on the base64 ciphertext accepted by the server (bounds memory before decoding) |
130+
| `GCM_IV_LEN` | index.php | 12 | Expected GCM IV length in bytes (validated server-side) |
131+
| `MAX_ATTEMPTS` | view.php | 5 | Maximum number of password attempts before destruction |
132+
| `CLEANUP_ENABLED` | index.php / view.php | true | Master switch for in-request cleanup. Set to `false` to disable it entirely (useful when you run `cleanup.php` via cron) |
133+
| `CLEANUP_PROB_PCT` | index.php / view.php | 50 | Probability (%) of running a global cleanup on each request (ignored when `CLEANUP_ENABLED` is `false`) |
134+
| `TMP_ORPHAN_TTL` | all | 3600 | Orphan temporary files (failed writes) older than X seconds are removed |
135+
| `LEGACY_TTL_SEC` | all | 7 days | Fallback TTL for secrets created with previous versions (`created` field) |
135136

136137
## 🌍 Internationalization
137138

@@ -171,11 +172,11 @@ return [
171172

172173
Common SMTP profiles:
173174

174-
| Mode | Port | `secure` |
175-
|---|---|---|
176-
| SSL implicit | 465 | `'ssl'` |
177-
| STARTTLS (recommended) | 587 | `'tls'` |
178-
| Plaintext (internal only) | 25 | `''` |
175+
| Mode | Port | `secure` |
176+
| ------------------------- | ---- | -------- |
177+
| SSL implicit | 465 | `'ssl'` |
178+
| STARTTLS (recommended) | 587 | `'tls'` |
179+
| Plaintext (internal only) | 25 | `''` |
179180

180181
### How it works
181182

@@ -225,11 +226,13 @@ Cons: if traffic is very low, expired files may stay on disk longer than expecte
225226
The `cleanup.php` script is a standalone CLI job that guarantees cleanup. It is safe to run in parallel with web requests thanks to non-blocking locking (in-use files are skipped).
226227

227228
**Manual test:**
229+
228230
```bash
229231
php /var/www/saynomore/cleanup.php
230232
```
231233

232234
Example output:
235+
233236
```
234237
[2025-01-20 03:15:02] SayNoMore cleanup:
235238
scanned: 42
@@ -241,16 +244,19 @@ Example output:
241244
```
242245

243246
**Crontab (every hour at :15):**
247+
244248
```cron
245249
15 * * * * /usr/bin/php /var/www/saynomore/cleanup.php >/dev/null 2>&1
246250
```
247251

248252
**Crontab (once a day at 3:15, fine for personal use):**
253+
249254
```cron
250255
15 3 * * * /usr/bin/php /var/www/saynomore/cleanup.php >/dev/null 2>&1
251256
```
252257

253258
**If you want to keep a cleanup log:**
259+
254260
```cron
255261
15 3 * * * /usr/bin/php /var/www/saynomore/cleanup.php >> /var/log/saynomore-cleanup.log 2>&1
256262
```
@@ -346,8 +352,6 @@ This script is useful for monitoring secret lifecycle management and preventing
346352
Write your secret, choose a password, set expiration, and generate the link
347353
![image](https://github.com/user-attachments/assets/ec9b9d69-1d1a-41cd-a053-4cb80a957e05)
348354

349-
350-
351355
Copy the link using the Copy button, or manually if you prefer, and send it to the recipient
352356
![image](https://github.com/user-attachments/assets/45c0349c-c363-4a43-9ebb-aaccd258b4dc)
353357

@@ -374,5 +378,5 @@ This project is distributed under the **GNU General Public License v2.0 (GPL-2.0
374378

375379
## Author
376380

377-
Created by **Leproide** <https://github.com/Leproide>
381+
Created by **Leproide**: <https://github.com/Leproide>
378382
Project: <https://github.com/Leproide/SayNoMore>

0 commit comments

Comments
 (0)