Commit cefb6e5
authored
This was found in the NervesCloud Sentry.
If an invalid device identifier, this this case an Erlang term, is
encoded in the shared secret auth,
`Plug.Crypto.non_executable_binary_to_term/2` correctly catches it, but
an error is raised which we don't handle nicely.
This PR rescues `ArgumentError`s, logs a message, and rejects the auth
request.
1 parent 77f7211 commit cefb6e5
File tree
2 files changed
+31
-0
lines changed- lib/nerves_hub_web/channels
- test/nerves_hub_web/channels
2 files changed
+31
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
114 | 114 | | |
115 | 115 | | |
116 | 116 | | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
117 | 128 | | |
118 | 129 | | |
119 | 130 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
481 | 481 | | |
482 | 482 | | |
483 | 483 | | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
484 | 504 | | |
485 | 505 | | |
486 | 506 | | |
| |||
0 commit comments