Skip to content

Security fix - z8zyy1tv2y - #3275

Open
harunollyo wants to merge 4 commits into
4.3.0from
security/z8zyy1tv2x
Open

harunollyo wants to merge 4 commits into
4.3.0from
security/z8zyy1tv2x

Conversation

@harunollyo

@harunollyo harunollyo commented Dec 1, 2026 •

Copy link
Copy Markdown
Collaborator

@harunollyo
harunollyo requested a review from shewa12 December 1, 2026 09:41
@harunollyo harunollyo self-assigned this Dec 1, 2026
@harunollyo harunollyo added the 4.3.0 Tutor v4.3.0 label Dec 1, 2026
Comment thread classes/QuizBuilder.php
$errors = array();

$validation = $this->validate_payload( $payload );
if ( $validation->success && tutor()->topics_post_type !== get_post_type( $topic_id ) ) {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread classes/QuizBuilder.php
}

$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 ) {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Same issue is here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

4.3.0 Tutor v4.3.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants