• Joined on 2026-06-16
hermes pushed to feature/guest-checkout at jocke/bilhej 2026-06-19 20:47:57 +00:00
afe70125f1 fix(db): make V12 migration H2-compatible (drop partial-index WHERE clauses)
hermes commented on pull request jocke/bilhej#17 2026-06-19 20:37:20 +00:00
feat(guest): guest checkout without login (Swish + QR)

🔴 Swish QR quiet zone too small — won't scan on desktop.

hermes commented on pull request jocke/bilhej#17 2026-06-19 20:37:20 +00:00
feat(guest): guest checkout without login (Swish + QR)

🔵 Isolate QR generation in its own try/catch.

hermes commented on pull request jocke/bilhej#17 2026-06-19 20:37:20 +00:00
feat(guest): guest checkout without login (Swish + QR)

🟡 No rate limiting on this public endpoint.

hermes commented on pull request jocke/bilhej#17 2026-06-19 20:37:20 +00:00
feat(guest): guest checkout without login (Swish + QR)

🟡 Honor-system pay — no payment verification.

hermes commented on pull request jocke/bilhej#17 2026-06-19 20:37:20 +00:00
feat(guest): guest checkout without login (Swish + QR)

🟡 amountPaid is never set on confirmation.

hermes commented on pull request jocke/bilhej#17 2026-06-19 20:37:20 +00:00
feat(guest): guest checkout without login (Swish + QR)

Advisory review — guest checkout (Swish Tier 0 + QR)

hermes pushed to feature/guest-checkout at jocke/bilhej 2026-06-19 20:32:57 +00:00
be069aa92c fix(test): remove non-existent setCreatedAt call that broke compileTestJava
hermes commented on pull request jocke/bilhej#16 2026-06-19 19:48:31 +00:00
fix(payment): make Swish QR code scannable by the Swish app

💡 Suggestion (low): /[\s+]/g strips every + from anywhere in the string, but the JSDoc above (L51) and the PR note describe stripping only a leading +. For valid phone numbers this is harmless (a + only ever appears as the international prefix), so no behaviour change — but the comment slightly overstates the intent. Either reword to "strips whitespace and any +", or for leading-only use replace(/\s/g, '').replace(/^\+/, ''). Either is fine.

hermes commented on pull request jocke/bilhej#16 2026-06-19 19:48:31 +00:00
fix(payment): make Swish QR code scannable by the Swish app

💡 Suggestion (low): Swallowing the QR failure silently is the right UX — the Swish link + manual fallback still render. For production diagnosability, consider a console.warn(…) (or your error-telemetry hook) inside this catch so a recurring QR-library failure isn't invisible. No functional change either way.

hermes commented on pull request jocke/bilhej#16 2026-06-19 19:48:31 +00:00
fix(payment): make Swish QR code scannable by the Swish app

LGTM — solid, spec-compliant Swish QR fix with good test coverage. Ready to merge.

hermes commented on pull request jocke/bilhej#16 2026-06-19 19:44:51 +00:00
fix(payment): make Swish QR code scannable by the Swish app

CI Investigation

You're right — I should have verified CI was green before finishing the PR. Here's what I found:

Investigation

All frontend CI steps pass locally (on the PR…

hermes pushed to fix/swish-qr-scannability at jocke/bilhej 2026-06-19 19:44:29 +00:00
f849f8a05a test(payment): add unit tests for buildSwishPaymentUrl and number normalisation
hermes commented on pull request jocke/bilhej#17 2026-06-19 19:40:36 +00:00
feat(guest): guest checkout without login (Swish + QR)

🔴 Critical — public unauthenticated create with no abuse protection. This endpoint is permitAll and writes a DB row per call with no rate limit, captcha, or pre-check. Trivial to abuse (orders-table flooding / cleanup cost). Suggest an IP rate limit + per-email throttle, requiring a successful plate/vehicle lookup first, or a lightweight captcha for the public create path.

hermes commented on pull request jocke/bilhej#17 2026-06-19 19:40:36 +00:00
feat(guest): guest checkout without login (Swish + QR)

🟠 Honor-system pay — no payment verification. confirmGuestPayment marks the order PROCESSING without confirming any Swish payment landed. Anyone with the token (or the customer) can mark an order paid without paying → BilHej mails a free letter. Acknowledged as Phase 0 and consistent with the authenticated confirmPayment, but harden with Swish Commerce callback verification before real money. Also: amountPaid / PAID status are never set on either path.

hermes commented on pull request jocke/bilhej#17 2026-06-19 19:40:36 +00:00
feat(guest): guest checkout without login (Swish + QR)

🟠 Guest token in the URL query string. The token is the customer's sole credential but here it's pushed into ?token=…, so it lands in browser history and the nginx access log (and risks Referer leakage). The magic-link /gast-order/:token is inherently URL-based, but this payment page needn't be — prefer sessionStorage / Pinia store / route state (or a #fragment) to keep the credential out of the query string.

hermes commented on pull request jocke/bilhej#17 2026-06-19 19:40:36 +00:00
feat(guest): guest checkout without login (Swish + QR)

🔵 Client email regex weaker than backend @Email. /\S+@\S+\.\S+/ lets a@b / x@.y through client-side, only to fail server-side with a confusing message. Mirror a stricter pattern or drop the client check and surface the backend @Email message.

hermes commented on pull request jocke/bilhej#17 2026-06-19 19:40:36 +00:00
feat(guest): guest checkout without login (Swish + QR)

🔵 Unused index. idx_orders_guest_email is created but findByGuestEmail was never added to OrderRepository (the PR body lists it, but only findByGuestToken is there), so there's no read path on guest_email yet. Either add the lookup now or defer the index until the email-link phase to avoid an unused schema object.

hermes commented on pull request jocke/bilhej#17 2026-06-19 19:40:36 +00:00
feat(guest): guest checkout without login (Swish + QR)

Verdict — solid, well-structured guest checkout. The security model (opaque 122-bit token, partial unique index, refuse-to-serve user-owned orders via the guest path) is thoughtful and the backend cleanly parallels OrderController without touching the JWT path. The main concerns are an unauthenticated create endpoint with no abuse protection, the guest token riding in the URL query string, and the honor-system /pay that should be hardened before real money. Advisory only — no blocking changes requested.

hermes commented on pull request jocke/bilhej#17 2026-06-19 19:39:49 +00:00
feat(guest): guest checkout without login (Swish + QR)

🔴 Critical — public unauthenticated create with no abuse protection. This endpoint is permitAll and writes a DB row per call with no rate limit, captcha, or pre-check. Trivial to abuse (orders-table flooding / cleanup cost). Suggest an IP rate limit + per-email throttle, requiring a successful plate/vehicle lookup first, or a lightweight captcha for the public create path.