diff --git a/wordpress.tv/public_html/wp-content/themes/wptv2/plugins/wordpresstv-upload-subtitles/wordpresstv-upload-subtitles.php b/wordpress.tv/public_html/wp-content/themes/wptv2/plugins/wordpresstv-upload-subtitles/wordpresstv-upload-subtitles.php index 38a0194f4b..63c975714d 100644 --- a/wordpress.tv/public_html/wp-content/themes/wptv2/plugins/wordpresstv-upload-subtitles/wordpresstv-upload-subtitles.php +++ b/wordpress.tv/public_html/wp-content/themes/wptv2/plugins/wordpresstv-upload-subtitles/wordpresstv-upload-subtitles.php @@ -103,7 +103,13 @@ function generate_filename( $file ) { * When the POST request is fired with the subtitles form and action. */ function post() { - if ( empty( $_POST['wptv-upload-subtitles-nonce'] ) || ! wp_verify_nonce( $_POST['wptv-upload-subtitles-nonce'], 'wptv-upload-subtitles' ) ) { + if ( + empty( $_POST['wptv-upload-subtitles-nonce'] ) || + ( + empty( $_POST['wptv_wporg_username'] ) && + ! wp_verify_nonce( sanitize_text_field( wp_unslash( $_POST['wptv-upload-subtitles-nonce'] ) ), 'wptv-upload-subtitles' ) + ) + ) { wp_die( 'Invalid form data. Please go back and try again.' ); } diff --git a/wordpress.tv/public_html/wp-content/themes/wptv2/upload-subtitles-template.php b/wordpress.tv/public_html/wp-content/themes/wptv2/upload-subtitles-template.php index ec221a5cee..b3be1253af 100644 --- a/wordpress.tv/public_html/wp-content/themes/wptv2/upload-subtitles-template.php +++ b/wordpress.tv/public_html/wp-content/themes/wptv2/upload-subtitles-template.php @@ -195,6 +195,8 @@ function subtitles_upload_css() { wp_die( 'You can not subtitle this video, sorry.' ); } +nocache_headers(); + get_header(); $message = '';