Describe the proposed solution
A shop page where anyone holding a gift card can enter its code and see the remaining balance, without an account.
This existed in 0.12.x and was removed in the 1.x rewrite (see UPGRADE-1.0.md), so this is a deliberate re-introduction rather than a new idea — but it should come back with the security thinking done properly.
Additional context
Deferred during the 1.x rewrite (#269) — see the roadmap in REWRITE.md.
The reason it was dropped is worth carrying into the design: an unauthenticated endpoint that confirms whether a code is valid, and how much is on it, is a brute-force oracle over the gift card code space. Anything reintroduced here needs rate limiting and should avoid distinguishing "unknown code" from "no balance" in a way that helps an attacker enumerate.
Relevant existing pieces: Repository/GiftCardRepository::findOneByCode(), and Generator/GiftCardCodeNormalizer which already normalises the grouped display format (ABCD-EFGH-…) back to a raw code. See also #45 for earlier security discussion.
Describe the proposed solution
A shop page where anyone holding a gift card can enter its code and see the remaining balance, without an account.
This existed in 0.12.x and was removed in the 1.x rewrite (see
UPGRADE-1.0.md), so this is a deliberate re-introduction rather than a new idea — but it should come back with the security thinking done properly.Additional context
Deferred during the 1.x rewrite (#269) — see the roadmap in
REWRITE.md.The reason it was dropped is worth carrying into the design: an unauthenticated endpoint that confirms whether a code is valid, and how much is on it, is a brute-force oracle over the gift card code space. Anything reintroduced here needs rate limiting and should avoid distinguishing "unknown code" from "no balance" in a way that helps an attacker enumerate.
Relevant existing pieces:
Repository/GiftCardRepository::findOneByCode(), andGenerator/GiftCardCodeNormalizerwhich already normalises the grouped display format (ABCD-EFGH-…) back to a raw code. See also #45 for earlier security discussion.