sadpandajoe commented on code in PR #39925:
URL: https://github.com/apache/superset/pull/39925#discussion_r3335986700


##########
superset-frontend/src/explore/components/controls/AnnotationLayerControl/AnnotationLayer.tsx:
##########
@@ -145,7 +146,7 @@
         <span>
           {t('Add an annotation layer')}{' '}
           <a
-            href="/annotationlayer/list"
+            href={ensureAppRoot('/annotationlayer/list')}

Review Comment:
   Re-fix in 2444445ed0: wrapped this href with `encodeURI(...)`. The previous 
revert from `<AppLink>` back to `<a href={ensureAppRoot(...)}>` (5fee21b509) 
reintroduced the DOM→HTML flow that CodeQL flagged here — `applicationRoot()` 
reads `data-bootstrap` from the DOM, so `ensureAppRoot(...)` is a DOM-tainted 
source feeding the anchor's `href` sink. `encodeURI` is one of 
`js/html-injection`'s default through-function sanitisers, idempotent for 
URL-normalised path inputs.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to