Instructor can attach a slot to an offering they don't own #34
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Severity: Low — authorization gap; widens the surface of #31.
Problem
AvailabilityEndpoint::create()(src/Availability/AvailabilityEndpoint.php:105-115) accepts anyoffering_idwith no check that the offering belongs to the calling instructor.Impact
An instructor can tag their availability slot with another instructor's offering. Combined with the booking offering-substitution flaw (#31), this widens price/payment-routing manipulation.
Fix
Validate that the supplied
offering_idresolves to an offering owned byget_current_user_id()(or a studio admin), else reject.Verified resolved on main (
061d09e, PR #38): AvailabilityEndpoint::create() now rejects any offering_id that does not resolve to an offering owned by the calling instructor (400 invalid_offering). BookingEndpoint::book() independently enforces that the offering used at booking belongs to the slot's instructor, closing the #31 combination. Re-confirmed during the 2026-06-10 security review pass.