-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Closed
Labels
[Feature] ThemesQuestions or issues with incorporating or styling blocks in a theme.Questions or issues with incorporating or styling blocks in a theme.[Type] BugAn existing feature does not function as intendedAn existing feature does not function as intended
Description
Description
In Add Theme Previews for block themes
a special GET parameter makes it possible to preview block themes in the site editor.
Because to make this work the PR filtered stylesheet
and template
options, this special parameter is also taking effect on the front end effectively allowing one to switch the current theme to whatever is installed.
This is problematic security wise because:
- it exposes what themes the user has installed via trial and error
- it exposes potentially in progress work
- it allows for sharing of links with the preview on
The theme_preview
GET param should only work if the user is logged in and has the correct permissions for editing themes.
Step-by-step reproduction instructions
- Using Gutenberg trunk and the theme preview experiment active
- On the front end
- Append ?theme_preview=[path to theme]
- You'll see the website with the specified theme
Screenshots, screen recording, code snippet
N/A
Environment info
No response
Please confirm that you have searched existing issues in the repo.
Yes
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Yes
Metadata
Metadata
Assignees
Labels
[Feature] ThemesQuestions or issues with incorporating or styling blocks in a theme.Questions or issues with incorporating or styling blocks in a theme.[Type] BugAn existing feature does not function as intendedAn existing feature does not function as intended