Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Protect against bad data in processing theme.json #26804

Closed
oandregal opened this issue Nov 7, 2020 · 0 comments · Fixed by #26803
Closed

Protect against bad data in processing theme.json #26804

oandregal opened this issue Nov 7, 2020 · 0 comments · Fixed by #26803
Assignees
Labels
Global Styles Anything related to the broader Global Styles efforts, including Styles Engine and theme.json [Type] Bug An existing feature does not function as intended

Comments

@oandregal
Copy link
Member

Steps to reproduce the bug:

  • edit lib/global-styles.php and add a new context that doesn't represent any block's selector. For example, by including a typo such as:
"core/paragrah": { // Note the missing 'p'.
    "settings": {
        "color": {
            "custom": false
        }
    }
}
  • load the front-end of the site and see the error message (you may have to activate WP_DEBUG).
@oandregal oandregal self-assigned this Nov 7, 2020
@oandregal oandregal added [Type] Bug An existing feature does not function as intended Global Styles Anything related to the broader Global Styles efforts, including Styles Engine and theme.json labels Nov 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Global Styles Anything related to the broader Global Styles efforts, including Styles Engine and theme.json [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant