• Joined on 2026-06-16
hermes created pull request jocke/bilhej#25 2026-07-18 11:32:47 +00:00
fix(guest): make Swish QR scannable on guest payment page (#22)
hermes created branch fix/guest-qr-scannability in jocke/bilhej 2026-07-18 11:32:43 +00:00
hermes pushed to fix/guest-qr-scannability at jocke/bilhej 2026-07-18 11:32:43 +00:00
b4fdcbff9e fix(guest): make Swish QR scannable on guest payment page
hermes commented on issue jocke/bilhej#24 2026-07-18 11:31:12 +00:00
[Bug] normalizeSwishNumber does not strip leading '+', breaking Swish payment for +46 numbers

Already fixed on master in commit 573153b (fix(payment): make Swish QR code scannable by the Swish app).

The normalizeSwishNumber function in payment.ts now strips a leading + via…

hermes closed issue jocke/bilhej#24 2026-07-18 11:31:12 +00:00
[Bug] normalizeSwishNumber does not strip leading '+', breaking Swish payment for +46 numbers
hermes commented on pull request jocke/bilhej#17 2026-06-22 12:09:23 +00:00
feat(guest): guest checkout without login (Swish + QR)

Root cause: Guest checkout was unreachable from the UI

The guest checkout pages existed as routes (/gast-bestallning, etc.) but there was no link to them anywhere in the UI. The homepage…

hermes pushed to master at jocke/bilhej 2026-06-22 12:09:02 +00:00
48c2a50c5d fix(guest): route homepage CTA to guest checkout when unauthenticated
hermes commented on pull request jocke/bilhej#17 2026-06-22 11:12:12 +00:00
feat(guest): guest checkout without login (Swish + QR)

Created issues for the vulnerabilities identified across the advisory reviews on this PR, so they are tracked independently of the review comments:

hermes opened issue jocke/bilhej#23 2026-06-22 11:11:52 +00:00
[Data integrity] No DB-level CHECK constraint for userId XOR guestToken invariant
hermes opened issue jocke/bilhej#24 2026-06-22 11:11:52 +00:00
[Bug] normalizeSwishNumber does not strip leading '+', breaking Swish payment for +46 numbers
hermes opened issue jocke/bilhej#18 2026-06-22 11:11:51 +00:00
[Security] Honor-system payment confirmation: no Swish money verification on guest /pay endpoint
hermes opened issue jocke/bilhej#19 2026-06-22 11:11:51 +00:00
[Security] No rate limiting / abuse protection on public POST /api/guest-orders
hermes opened issue jocke/bilhej#20 2026-06-22 11:11:51 +00:00
[Bug] amountPaid never persisted on guest or authenticated payment confirmation
hermes opened issue jocke/bilhej#21 2026-06-22 11:11:51 +00:00
[Security] Guest token rides in URL query string - leaks via access logs / history / Referer
hermes opened issue jocke/bilhej#22 2026-06-22 11:11:51 +00:00
[Bug] Swish QR fails to scan on desktop - margin, color, width non-compliant with ISO 18004 / Swish spec
hermes commented on pull request jocke/bilhej#17 2026-06-22 10:48:45 +00:00
feat(guest): guest checkout without login (Swish + QR)

⚠️ Critical: This endpoint is public (no JWT) and marks the order as paid without any payment verification. Combined with POST /api/guest-orders returning the guestToken in the response body, anyone can create an order and immediately confirm it as paid. Needs server-side Swish payment verification before fulfillment.

hermes commented on pull request jocke/bilhej#17 2026-06-22 10:48:45 +00:00
feat(guest): guest checkout without login (Swish + QR)

⚠️ amountPaid is never set here. The order goes directly to PROCESSING with amountPaid = null. The GuestOrderResponse will report amountPaid: null even after "payment". The frontend test mock expects amountPaid: 49 which the real backend won't return.

hermes commented on pull request jocke/bilhej#17 2026-06-22 10:48:45 +00:00
feat(guest): guest checkout without login (Swish + QR)

⚠️ /api/guest-orders/** is permitAll with no rate limiting. Consider adding a throttle filter (Bucket4j or Spring rate limiter) to prevent abuse of the public create + pay endpoints.

hermes commented on pull request jocke/bilhej#17 2026-06-22 10:48:45 +00:00
feat(guest): guest checkout without login (Swish + QR)

Correct approach - a plain UNIQUE INDEX on guest_token treats NULLs as distinct on both H2 and PostgreSQL, so existing user-owned orders (NULL token) won't collide. A partial WHERE guest_token IS NOT NULL index would be slightly more efficient on Postgres, but the plain form works correctly and preserves H2 compatibility.

hermes commented on pull request jocke/bilhej#17 2026-06-22 10:48:45 +00:00
feat(guest): guest checkout without login (Swish + QR)

⚠️ The guest token is passed as a query parameter, which lands in browser history, server logs, and Referer headers. The code comments acknowledge this trade-off explicitly, so this is a conscious decision backed by the refresh-safety requirement.