Commit c8daaa0
committed
fix(auth): reject null/empty secret cleanly, configure CI Facebook creds
Root cause of the CI failure on testMatchedUserIsUnlinkedAndReturnsConfirmation:
.env.testing (which supplies FACEBOOK_CLIENT_SECRET locally) is gitignored,
and none of the three GitHub Actions workflows ever set FACEBOOK_CLIENT_ID/
FACEBOOK_CLIENT_SECRET - a pre-existing gap this PR was the first to depend
on. Config::get('services.facebook.client_secret') resolved to null in CI,
and FacebookSignedRequestParser::parse()'s non-nullable string $secret
parameter turned that into a fatal TypeError (500) instead of a clean
rejection.
- Widen parse()'s $secret to ?string and reject immediately on null/'' -
a webhook endpoint should fail closed with 400 on missing server config,
never 500.
- Add FACEBOOK_CLIENT_ID/FACEBOOK_CLIENT_SECRET/FACEBOOK_REDIRECT_URI
(same dummy test values as .env.testing) to all three CI workflows.
- Two new parser tests lock in the defensive null/empty-secret behavior.
Reverts the temporary response-body-dump instrumentation from 477109d,
which was used to capture the real TypeError from CI's APP_DEBUG=true
error page.1 parent 477109d commit c8daaa0
6 files changed
Lines changed: 27 additions & 6 deletions
File tree
- .github/workflows
- app/libs/Auth
- tests
- unit
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
35 | 38 | | |
36 | 39 | | |
37 | 40 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
40 | 43 | | |
41 | 44 | | |
42 | 45 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
36 | 39 | | |
37 | 40 | | |
38 | 41 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
| 26 | + | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
| 29 | + | |
30 | 30 | | |
| 31 | + | |
| 32 | + | |
31 | 33 | | |
32 | 34 | | |
33 | 35 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | 68 | | |
73 | 69 | | |
74 | 70 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
95 | 109 | | |
0 commit comments