Skip to content

WordPress.tv: Fix subtitle upload error on cached/unauthenticated submissions - #820

Open
wprashed wants to merge 2 commits into
WordPress:trunkfrom
wprashed:meta-8406
Open

WordPress.tv: Fix subtitle upload error on cached/unauthenticated submissions#820
wprashed wants to merge 2 commits into
WordPress:trunkfrom
wprashed:meta-8406

Conversation

@wprashed

Copy link
Copy Markdown

Trac ticket: https://meta.trac.wordpress.org/ticket/8406

Description

When submitting subtitles via /subtitle/?video=..., unauthenticated users or users with stale nonces (due to page caching or browser cache differences such as on Firefox) encountered Invalid form data. Please go back and try again..

This mirrors the handling in anon-upload.php by ensuring unauthenticated submissions providing a WordPress.org username are not blocked by stale nonces, and adds nocache_headers() to upload-subtitles-template.php to prevent caching of the subtitle submission form.

Props

Props @sebastienserre, @wprashed.

Prevent unauthenticated subtitle uploads with a valid username from failing due to stale or cached nonces, and send nocache headers on the subtitle upload page.

Fixes https://meta.trac.wordpress.org/ticket/8406
Props sebastienserre, wprashed.
@github-actions

Copy link
Copy Markdown

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

Core Committers: Use this line as a base for the props when committing in SVN:

Props wprashed.

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant