Skip to content

fix: validate product name is not empty in create_product - #709

Merged
nonsobethel0-dev merged 2 commits into
Parashield-Protocol:mainfrom
chinoyenmose:fix/product-name-validation-636-637-638-639
Oct 19, 2026
Merged

nonsobethel0-dev merged 2 commits into
Parashield-Protocol:mainfrom
chinoyenmose:fix/product-name-validation-636-637-638-639

Conversation

@chinoyenmose

Copy link
Copy Markdown
Contributor

Closes #636
Closes #637
Closes #638
Closes #639

What changed

  • Add EmptyProductName error variant and validate product name is not empty in PolicyEngine.create_product

Why

  • create_product accepted empty product names, making products indistinguishable

How to test

  • Call create_product with an empty name symbol — should panic with EmptyProductName
  • Call create_product with a valid non-empty name — should succeed
  • Existing tests: cargo test -p parashield-policy-engine (100 passed)

@nonsobethel0-dev
nonsobethel0-dev merged commit b97feb7 into Parashield-Protocol:main Oct 19, 2026
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants