Repository navigation
Conversation
saadman30
marked this pull request as ready for review
December 2, 2026 05:01
saadman30
requested review from
harunollyo and
shewa12
and removed request for
harunollyo
December 2, 2026 05:02
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ClickUp ticket link:
https://app.clickup.com/t/9018365849/z8zyy1tvwa
Tutor Pro PR
https://github.com/themeum/tutor-pro/pull/2042
Summary
CourseControllernow usesvalidate_price_for_update()on update, and guards direct_tutor_course_product_idwrites.validate_price()rejects products the current user is not authorized to use (create path), aligning withis_valid_wc_product_author().Problem
Instructors could submit another instructor’s or an admin’s standalone WC
product_idthrough:PUT /tutor/v1/courses/{id}POST /tutor/v1/coursesThe API accepted the request and saved the unauthorized ID in
_tutor_course_product_idbecause REST relied onvalidate_price()(no ownership check) and update wrote the meta directly.Solution
Course.php): authorize submitted WC products during create validation; clarify create-time author checks (course_id = 0).CourseController.php): validate product ownership on update; skip unauthorized product meta writes.