Repository navigation
Security fix - z8zyy1tv2y - #3275
Open
harunollyo wants to merge 4 commits into
Open
harunollyo wants to merge 4 commits into
harunollyo wants to merge 4 commits into
Conversation
shewa12
reviewed
Dec 2, 2026
| $errors = array(); | ||
|
|
||
| $validation = $this->validate_payload( $payload ); | ||
| if ( $validation->success && tutor()->topics_post_type !== get_post_type( $topic_id ) ) { |
Collaborator
There was a problem hiding this comment.
Checking the validtion->success will not add the post type error with the validation error. Since the post type check is part of validation, the error should be included regardless of the validation->success status. Now, the user will not know the post type error until it passes the existing validations.
shewa12
reviewed
Dec 2, 2026
| } | ||
|
|
||
| $existing_quiz_id = (int) ( $payload['ID'] ?? 0 ); | ||
| if ( $validation->success && $existing_quiz_id && (int) wp_get_post_parent_id( $existing_quiz_id ) !== (int) $topic_id ) { |
shewa12
requested changes
Dec 2, 2026
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 Links:
https://app.clickup.com/t/9018365849/z8zyy1tv2y
https://app.clickup.com/t/9018365849/z8zyy1tv32
https://app.clickup.com/t/9018365849/z8zyy1tv34
Use of AI Tool
Used: Yes
Used for: verify the issue