You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 28, 2023. It is now read-only.
Currently we sanitize listing variant names but don't validate their uniqueness (at least from the cursory look I applied). This bug could manifest in an listing purchase which accidentally applies the wrong Option if the listing option names were to have multiple casings of the same text.
Testing this case would work as follows:
Make a listing with a lot of various options called "Name" in different cases.
Then purchase it and see if the right option is chosen. The option application behavior is random so you'll have a 1/n chance of not triggering the error. (Where n is the number of Variant options with the name you used.)
This issue represents agreement on the team that our Listing Variant names should be:
unique in a case-insensitive way
persisted as they are provided (without removing case-sensitivity)
and applied in a case-insensitive way
Acceptance Criteria:
A listing with variant options "Name" and "NAME" would throw a validation error.
A listing with variant options "Name" and "OtherName" would be persisted as provided.
A purchase request to apply options "Name" or "NAME" would match the same option.
Unit tests around the listing option validation proving the above.