-
Notifications
You must be signed in to change notification settings - Fork 14.2k
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
Conversation
#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>
…it recentActivityObjs (#29459)
…inot as a database (#28364)
…eenshots (#29187) Co-authored-by: Diego Pucci <[email protected]>
<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 about 2 months 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 |
fa52c3a
to
5b99354
Compare
(cherry picked from commit c2885a1)
SUMMARY
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
TESTING INSTRUCTIONS
ADDITIONAL INFORMATION