[CSP] "style-src" MUITabs and some other component have inline styles not nonced by the CreateEmotionCache #40435
Labels
component: tabs
This is the name of the generic UI component, not the React module!
package: material-ui
Specific to @mui/material
Steps to reproduce
Link to live example: https://github.com/Mateo-P/nonce-problem.git
Steps:
1 cp
.env.example
to.env
2.
yarn install
3.
yarn run dev
4. open the browser console (firefox is more descriptive in this case)
Current behavior
Expected behavior
not showing the error on console browser.
Context
we are using remixjs+MUI and want to add CSP-Headers following these guides:
CSP-guide
remix-Styling
we added the nonce-value to the cache on
CreateEmotionCache.tsx
:it works with most of the components and all
sx's
but we have found that some components includingMUITabs
have a defaultstyle=""
which is not handled by the CSP nonce config followed in the documentationon MUITabs docs by inspecting the component on the browser the default
style="overflow:hidden;margin-bottom:0"
is shown.Your environment
npx @mui/envinfo
Search keywords: nonce csp inline styles MUITabs style="overflow:hidden;margin-bottom:0"
The text was updated successfully, but these errors were encountered: