Skip to content

Commit 4773917

Browse files
committed
Formatting
1 parent a23f4ee commit 4773917

File tree

2 files changed

+14
-18
lines changed

2 files changed

+14
-18
lines changed

javascript/ql/lib/semmle/javascript/security/dataflow/DomBasedXssCustomizations.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ module DomBasedXss {
253253

254254
/**
255255
* A write to the `innerHTML` property of a DOM element, viewed as an XSS sink.
256-
*
256+
*
257257
* Uses the Angular Renderer2 API, instead of the default `Element.innerHTML` property.
258258
*/
259259
class AngularRender2SetPropertyInnerHtmlSink extends Sink {

javascript/ql/lib/semmle/javascript/security/dataflow/RemoteFlowSources.qll

Lines changed: 13 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -189,31 +189,27 @@ private class ExternalRemoteFlowSource extends RemoteFlowSource {
189189
class InputMember extends MemberDeclaration {
190190
InputMember() {
191191
exists(Decorator decorator, Expr expr |
192-
decorator.getElement() = this
193-
and decorator.getExpression() = expr
194-
and expr.(CallExpr).getCallee().(VarRef).getName() = "Input"
192+
decorator.getElement() = this and
193+
decorator.getExpression() = expr and
194+
expr.(CallExpr).getCallee().(VarRef).getName() = "Input"
195195
)
196196
}
197197
}
198198

199199
// Use of an Angular @Input() member.
200200
class InputMemberUse extends DataFlow::Node {
201-
InputMemberUse() {
202-
exists(InputMember member, string memberName, ThisExpr ta, FieldAccess fa |
203-
memberName = member.getName()
204-
and fa.getBase() = ta
205-
and fa.getPropertyName() = memberName
206-
and this.asExpr() = fa
207-
)
208-
}
201+
InputMemberUse() {
202+
exists(InputMember member, string memberName, ThisExpr ta, FieldAccess fa |
203+
memberName = member.getName() and
204+
fa.getBase() = ta and
205+
fa.getPropertyName() = memberName and
206+
this.asExpr() = fa
207+
)
208+
}
209209
}
210210

211211
private class AngularInputUse extends RemoteFlowSource {
212-
AngularInputUse() {
213-
exists( InputMemberUse inputUse |
214-
this = inputUse
215-
)
216-
}
212+
AngularInputUse() { exists(InputMemberUse inputUse | this = inputUse) }
217213

218214
override string getSourceType() { result = "Angular @Input()" }
219-
}
215+
}

0 commit comments

Comments
 (0)