Repository navigation
Commit 224b7d9
committed
π Restrict demo endpoint access to authorized operators or E2E secret
- π‘οΈ Demo URL is publicly reachable, so gate it behind either a logged-in
operator with the "lhchat"/"use" permission or an anonymous request
presenting an e2e_secret matching the E2E_SECRET environment variable
- π Use hash_equals for constant-time secret comparison to prevent timing
attacks on the shared E2E token
- π« Redirect unauthenticated visitors to the login page and return a
no-permission response for logged-in users lacking access, preserving
the previous behavior
- β Whitelist e2e_secret as an allowed uparam and drop the global "use"
function requirement so the e2e path can be evaluated inside the view1 parent 2859fb5 commit 224b7d9
2 files changed
Lines changed: 31 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
12 | 42 | | |
13 | 43 | | |
14 | 44 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
579 | 579 | | |
580 | 580 | | |
581 | 581 | | |
582 | | - | |
| 582 | + | |
583 | 583 | | |
584 | | - | |
585 | 584 | | |
586 | 585 | | |
587 | 586 | | |
| |||
0 commit comments