-
Notifications
You must be signed in to change notification settings - Fork 14k
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
DO NOT MERGE: test 4.1 release #29693
base: 4.0
Are you sure you want to change the base?
Conversation
…/superset-frontend (#28816) Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…t to RTL syntax (#29380) Signed-off-by: hainenber <[email protected]> Co-authored-by: Michael S. Molina <[email protected]>
Signed-off-by: hainenber <[email protected]>
Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
#29433) Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
… 3.6.1 in /superset-frontend (#29435) Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…ocket (#29423) Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…ntend (#29439) Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…cs (#29428) Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…17.6 in /superset-frontend/plugins/plugin-chart-handlebars (#29425) Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Evan Rusackas <[email protected]>
…/plugins/legacy-preset-chart-deckgl (#29426) Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
/testenv up |
@sadpandajoe Ephemeral environment spinning up at http://54.184.232.53:8080. Credentials are |
(cherry picked from commit c22dfa1)
(cherry picked from commit c3702be)
…ift (#29725) Signed-off-by: hainenber <[email protected]> (cherry picked from commit 8891f04)
(cherry picked from commit 2bce20f)
(cherry picked from commit 0d62bb2)
(cherry picked from commit 27c08d0)
(cherry picked from commit 819597f)
(cherry picked from commit 6bc8567)
(cherry picked from commit d877d46)
(cherry picked from commit 052b38b)
(cherry picked from commit 0e165c1)
(cherry picked from commit ac3a10d)
) (cherry picked from commit 5820d31)
(cherry picked from commit 4d5f70c)
(cherry picked from commit 73768f6)
(cherry picked from commit de8282c)
Co-authored-by: Evan Rusackas <[email protected]> (cherry picked from commit df47994)
<img src={brand.icon} alt={brand.alt} /> | ||
</GenericLink> | ||
) : ( | ||
<a className="navbar-brand" href={brand.path}> | ||
<a className="navbar-brand" href={brand.path} tabIndex={-1}> |
Check warning
Code scanning / CodeQL
DOM text reinterpreted as HTML Medium
DOM text
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix AI 6 days ago
To fix the problem, we need to ensure that the brand.path
value is properly sanitized before being used in the href
attribute. This can be achieved by using a library like DOMPurify
to sanitize the URL. This will prevent any malicious content from being executed as part of the URL.
- Install the
DOMPurify
library. - Import
DOMPurify
in theMenu.tsx
file. - Sanitize the
brand.path
value before using it in thehref
attribute.
-
Copy modified line R20 -
Copy modified line R320
@@ -19,2 +19,3 @@ | ||
import { useState, useEffect } from 'react'; | ||
import DOMPurify from 'dompurify'; | ||
import { styled, css, useTheme, SupersetTheme } from '@superset-ui/core'; | ||
@@ -318,3 +319,3 @@ | ||
) : ( | ||
<a className="navbar-brand" href={brand.path} tabIndex={-1}> | ||
<a className="navbar-brand" href={DOMPurify.sanitize(brand.path)} tabIndex={-1}> | ||
<img src={brand.icon} alt={brand.alt} /> |
-
Copy modified lines R208-R209
@@ -207,3 +207,4 @@ | ||
"use-query-params": "^1.1.9", | ||
"yargs": "^17.7.2" | ||
"yargs": "^17.7.2", | ||
"dompurify": "^3.2.1" | ||
}, |
Package | Version | Security advisories |
dompurify (npm) | 3.2.1 | None |
(cherry picked from commit f4c36a6)
SUMMARY
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
TESTING INSTRUCTIONS
ADDITIONAL INFORMATION