Skip to content

Comments

fix: add transaction protection to card dealing to prevent game state corruption#2348

Open
Arunodoy18 wants to merge 2 commits intoOWASP:masterfrom
Arunodoy18:fix/2343-transactional-card-dealing
Open

fix: add transaction protection to card dealing to prevent game state corruption#2348
Arunodoy18 wants to merge 2 commits intoOWASP:masterfrom
Arunodoy18:fix/2343-transactional-card-dealing

Conversation

@Arunodoy18
Copy link

Fixes issue #2343.

  • Wraps card dealing logic in Ecto.Multi transaction
  • Replaces insert! with safe insert operations
  • Ensures atomic game initialization
  • Prevents partial state corruption
  • Adds graceful error handling to LiveView

Complies with ASVS V2.3.3 for business-logic-level transaction integrity.

Fixes OWASP#2133

Problem:
The first suit table (VE - Data Validation & Encoding) in both guide
template variants had inconsistent row heights compared to all other
suit tables, causing text overflow in translations with longer content.

Standard template (owasp_cornucopia_webapp_ver_guide_bridge_lang.odt):
- Table10.2: 3.501cm (should be 4.001cm)
- Table10.3: 4.501cm (should be 4.001cm)

QR template (owasp_cornucopia_webapp_ver_guide_bridge_qr_lang.odt):
- Table11.4: 3.501cm (should be 4.001cm)

All other suit tables (17/18 through 87/95) use 4.001cm uniformly.

Solution:
Normalized the inconsistent row heights to 4.001cm to match the
standard used by all other suit tables. This provides consistent
vertical spacing across all card descriptions and prevents text
overflow issues in non-English translations.

Changes:
- Fixed row heights in both guide template variants
- Added fix_templates_issue_2133.py script for reproducibility
- Updated .gitignore to exclude .backup files
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant