Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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.' );
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,8 @@ function subtitles_upload_css() {
wp_die( 'You can not subtitle this video, sorry.' );
}

nocache_headers();

get_header();

$message = '';
Expand Down