diff --git a/dashcaddy-api/__tests__/share-dc083.routes.test.js b/dashcaddy-api/__tests__/share-dc083.routes.test.js new file mode 100644 index 0000000..099b472 --- /dev/null +++ b/dashcaddy-api/__tests__/share-dc083.routes.test.js @@ -0,0 +1,483 @@ +/** + * DC-083 -- Public share endpoint input hardening. + * + * The two CSRF-exempt public endpoints (POST /share/:token/subscribe + + * POST /share/:token/redeem-tailscale) accept untrusted body fields. The + * pre-fix code had three coupled bugs: + * + * 1. `email.includes('@')` accepted `@`, `a@`, `