Skip to content

Commit adc55bb

Browse files
authored
Merge pull request #292 from advanced-security/knewbury01/fix-naming-for-duplicate-types
Fix duplicate names in types react lib type
2 parents a3ecebc + 3a25d92 commit adc55bb

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

javascript/frameworks/ui5/lib/advanced_security/javascript/frameworks/ui5/Sanitizers.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import advanced_security.javascript.frameworks.ui5.UI5WebcomponentsReact
1111
*/
1212
class ExcludedSource extends DomBasedXss::Sanitizer {
1313
ExcludedSource() {
14-
exists(UseRefDomValueSource source |
14+
exists(CustomUseRefDomValueSource source |
1515
// exclude components with this name from @ui5/webcomponents-react only
1616
isRefAssignedToUI5Component(source) and
1717
source.getElement().getName() in [

javascript/frameworks/ui5/lib/advanced_security/javascript/frameworks/ui5/UI5WebcomponentsReact.qll

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class RefAttribute extends JsxAttribute {
3131
/**
3232
* Holds if the ref variable is assigned to a UI5 component via JSX
3333
*/
34-
predicate isRefAssignedToUI5Component(UseRefDomValueSource source) {
34+
predicate isRefAssignedToUI5Component(CustomUseRefDomValueSource source) {
3535
exists(
3636
Variable refVar, JsxElement jsx, RefAttribute attr, VarRef componentVar, WebComponentImport decl
3737
|
@@ -49,10 +49,10 @@ predicate isRefAssignedToUI5Component(UseRefDomValueSource source) {
4949
* A custom version of the `React::UseRefDomValueSource` in the out of the box libraries
5050
* this version exposes its JSX element and also is not private
5151
*/
52-
class UseRefDomValueSource extends DOM::DomValueSource::Range {
52+
class CustomUseRefDomValueSource extends DOM::DomValueSource::Range {
5353
JsxElement jsx;
5454

55-
UseRefDomValueSource() {
55+
CustomUseRefDomValueSource() {
5656
exists(RefAttribute attrib |
5757
attrib.getValue().flow().getALocalSource().getAPropertyRead("current") = this and
5858
jsx.getAnAttribute() = attrib

0 commit comments

Comments
 (0)