Skip to content

Merge security fixes from main into develop - #1312

Merged
daveearley merged 13 commits into
developfrom
chore/security-fixes-develop
Aug 11, 2026
Merged

Merge security fixes from main into develop#1312
daveearley merged 13 commits into
developfrom
chore/security-fixes-develop

Conversation

@daveearley

Copy link
Copy Markdown
Contributor

Brings the security fixes from #1311 into develop. This is a merge rather than a cherry-pick so git records the ancestry β€” #1259 and #1260 were cherry-picked onto main previously and showed as absent from develop, which meant verifying them by hand rather than by SHA. Merging avoids repeating that at the v2 release.

Ten of the twenty-nine files conflicted. How each was resolved:

  • OrderCreateRequestValidationService β€” develop's sumRequestedQuantities already aggregates per product and price across order lines, so it had independently fixed the max_per_order bypass. Develop's plumbing is kept and the aggregation half of the main-side change is dropped. The sale window checks are re-applied on top, at both product and price-tier level, since develop had neither.
  • NoInternalUrlRule β€” taken wholesale from main; the rule body is now delegation to WebhookUrlValidator.
  • CreateQuestionService, EditQuestionService, UpdateCapacityAssignmentService, ExportOrganizerReportAction β€” ownership checks and the formula escaper taken from main, reformatted to develop's Pint style.
  • config/excel.php, config/webhook-server.php β€” one-line binder and job swaps, using develop's imported-class style.
  • CompleteOrderHandlerTest, OrderCreateRequestValidationServiceTest β€” see below.

Test changes needed for develop:

  • Data providers converted from the @dataProvider annotation to the #[DataProvider] attribute, since develop is on PHPUnit 12 where the annotation no longer binds arguments.
  • Every product and price mock factory now stubs isBeforeSaleStartDate and isAfterSaleEndDate. Without this the strict Mockery mocks throw BadMethodCallException on every existing test in the file.
  • Five sale window tests added against develop's occurrence-aware fixtures. Main's versions of the aggregation tests were dropped β€” develop already covers that behaviour in eight tests of its own.
  • test_rejects_duplicate_lines_exceeding_max_per_order expected Test Products. Develop's message passes a product key into a :products placeholder, so the title never substitutes and the trailing s leaks into the output. Main has the correct products key, which the merge keeps, so the assertion is updated to the string users actually see.

1019 unit tests pass. The sale window fix was checked by removing it and confirming all five new tests fail, then restoring it.

daveearley and others added 13 commits April 7, 2026 18:04
…) (#1176)

Co-authored-by: Manas Kumar <141910018+manaskumar3003@users.noreply.github.com>
Closes SSRF in the webhook system (dispatch-time revalidation, DNS
pinning, per-hop redirect checks, IPv6 transition decoding), spreadsheet
formula injection in exports, product ownership validation on questions,
capacity assignments and check-in lists, the order completion race,
sale window and max_per_order enforcement at checkout, and adds a
throttle to the public promo code lookup.

Also queues the order, attendee, product and check-in webhook dispatch
jobs, which were running inline despite the listener setting a queue.
…develop

# Conflicts:
#	backend/app/Http/Actions/Reports/ExportOrganizerReportAction.php
#	backend/app/Services/Domain/CapacityAssignment/UpdateCapacityAssignmentService.php
#	backend/app/Services/Domain/Order/OrderCreateRequestValidationService.php
#	backend/app/Services/Domain/Question/CreateQuestionService.php
#	backend/app/Services/Domain/Question/EditQuestionService.php
#	backend/app/Validators/Rules/NoInternalUrlRule.php
#	backend/config/excel.php
#	backend/config/webhook-server.php
#	backend/tests/Unit/Services/Application/Handlers/Order/CompleteOrderHandlerTest.php
#	backend/tests/Unit/Services/Domain/Order/OrderCreateRequestValidationServiceTest.php
@railway-app

railway-app Bot commented Aug 11, 2026

Copy link
Copy Markdown

πŸš… Deployed to the Hi.Events-pr-1312 environment in Hi.Events

Service Status Web Updated (UTC)
Hi.Events Frontend πŸ•’ Building (View Logs) Web Aug 11, 2026 at 8:39 pm
Hi.Events Queue Worker πŸ•’ Building (View Logs) Aug 11, 2026 at 8:39 pm
Hi.Events API πŸ•’ Building (View Logs) Web Aug 11, 2026 at 8:39 pm
Hi.Events Scheduler πŸ•’ Building (View Logs) Aug 11, 2026 at 8:39 pm
1 service not affected by this PR
  • Maildev

@railway-app
railway-app Bot temporarily deployed to Hi.Events / Hi.Events-pr-1312 August 11, 2026 20:39 Destroyed
@daveearley
daveearley merged commit b045fe7 into develop Aug 11, 2026
6 of 10 checks passed
@github-actions github-actions Bot locked and limited conversation to collaborators Aug 11, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant