Skip to content

Commit bac212c

Browse files
committed
JS: Fix typo: instantiaton -> instantiation
1 parent a1819a5 commit bac212c

File tree

6 files changed

+15
-15
lines changed

6 files changed

+15
-15
lines changed

javascript/ql/src/semmle/javascript/frameworks/Express.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -976,7 +976,7 @@ module Express {
976976
/**
977977
* A call to the Express `res.render()` method, seen as a template instantiation.
978978
*/
979-
private class RenderCallAsTemplateInstantiation extends Templating::TemplateInstantiaton::Range,
979+
private class RenderCallAsTemplateInstantiation extends Templating::TemplateInstantiation::Range,
980980
DataFlow::CallNode {
981981
RenderCallAsTemplateInstantiation() {
982982
this = any(ResponseSource res).ref().getAMethodCall("render")

javascript/ql/src/semmle/javascript/frameworks/Fastify.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ module Fastify {
294294
*
295295
* Assumes the presense of a plugin that provides the `view` method, such as the `point-of-view` plugin.
296296
*/
297-
private class ViewCall extends Templating::TemplateInstantiaton::Range, DataFlow::CallNode {
297+
private class ViewCall extends Templating::TemplateInstantiation::Range, DataFlow::CallNode {
298298
ViewCall() { this = any(ReplySource rep).ref().getAMethodCall("view") }
299299

300300
override DataFlow::SourceNode getOutput() { result = getCallback(2).getParameter(1) }

javascript/ql/src/semmle/javascript/frameworks/Hapi.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ module Hapi {
252252
/**
253253
* A call to `h.view('file', { ... })` seen as a template instantiation.
254254
*/
255-
private class ViewCall extends Templating::TemplateInstantiaton::Range, DataFlow::CallNode {
255+
private class ViewCall extends Templating::TemplateInstantiation::Range, DataFlow::CallNode {
256256
ViewCall() { this = any(RouteHandler rh).getRequestToolkit().getAMethodCall("view") }
257257

258258
override DataFlow::SourceNode getOutput() { none() }

javascript/ql/src/semmle/javascript/frameworks/Koa.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -431,7 +431,7 @@ module Koa {
431431
/**
432432
* A call to `ctx.render('file', { ... })`, seen as a template instantiation.
433433
*/
434-
private class RenderCall extends Templating::TemplateInstantiaton::Range, DataFlow::CallNode {
434+
private class RenderCall extends Templating::TemplateInstantiation::Range, DataFlow::CallNode {
435435
ContextSource ctx;
436436

437437
RenderCall() { this = ctx.ref().getAMethodCall("render") }

javascript/ql/src/semmle/javascript/frameworks/Templating.qll

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -176,10 +176,10 @@ module Templating {
176176
/**
177177
* A place where a template is instantiated or rendered.
178178
*/
179-
class TemplateInstantiaton extends DataFlow::Node {
180-
TemplateInstantiaton::Range range;
179+
class TemplateInstantiation extends DataFlow::Node {
180+
TemplateInstantiation::Range range;
181181

182-
TemplateInstantiaton() { this = range }
182+
TemplateInstantiation() { this = range }
183183

184184
/** Gets a data flow node that refers to the instantiated template string, if any. */
185185
DataFlow::SourceNode getOutput() { result = range.getOutput() }
@@ -204,7 +204,7 @@ module Templating {
204204
}
205205

206206
/** Companion module to the `TemplateInstantiation` class. */
207-
module TemplateInstantiaton {
207+
module TemplateInstantiation {
208208
abstract class Range extends DataFlow::Node {
209209
/** Gets a data flow node that refers to the instantiated template, if any. */
210210
abstract DataFlow::SourceNode getOutput();
@@ -226,7 +226,7 @@ module Templating {
226226

227227
/** Gets an API node that may flow to `succ` through a template instantiation. */
228228
private API::Node getTemplateInput(DataFlow::SourceNode succ) {
229-
exists(TemplateInstantiaton inst, API::Node base, string name |
229+
exists(TemplateInstantiation inst, API::Node base, string name |
230230
base.getARhs() = inst.getTemplateParamsNode() and
231231
result = base.getMember(name) and
232232
succ =
@@ -321,7 +321,7 @@ module Templating {
321321

322322
/** Get file argument of a template instantiation, seen as a template file reference. */
323323
private class DefaultTemplateFileReference extends TemplateFileReference {
324-
DefaultTemplateFileReference() { this = any(TemplateInstantiaton inst).getTemplateFileNode() }
324+
DefaultTemplateFileReference() { this = any(TemplateInstantiation inst).getTemplateFileNode() }
325325
}
326326

327327
/**
@@ -581,7 +581,7 @@ module Templating {
581581
}
582582

583583
private TemplateSyntax getTemplateSyntaxFromInstantiation(TemplateFile file) {
584-
result = any(TemplateInstantiaton inst | inst.getTemplateFile() = file).getTemplateSyntax()
584+
result = any(TemplateInstantiation inst | inst.getTemplateFile() = file).getTemplateSyntax()
585585
}
586586

587587
/**
@@ -612,7 +612,7 @@ module Templating {
612612
/**
613613
* An EJS-style `include` call within a template tag, such as `<%- include(file, { params }) %>`.
614614
*/
615-
private class EjsIncludeCallInTemplate extends TemplateInstantiaton::Range, DataFlow::CallNode {
615+
private class EjsIncludeCallInTemplate extends TemplateInstantiation::Range, DataFlow::CallNode {
616616
EjsIncludeCallInTemplate() {
617617
exists(TemplatePlaceholderTag tag |
618618
tag.getRawText().regexpMatch("(?s)<%-.*") and
@@ -685,7 +685,7 @@ module Templating {
685685
/**
686686
* A call to a member of the `consolidate` library, seen as a template instantiation.
687687
*/
688-
private class ConsolidateCall extends TemplateInstantiaton::Range, API::CallNode {
688+
private class ConsolidateCall extends TemplateInstantiation::Range, API::CallNode {
689689
string engine;
690690

691691
ConsolidateCall() { this = API::moduleImport("consolidate").getMember(engine).getACall() }

javascript/ql/test/library-tests/frameworks/Templating/test.ql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import semmle.javascript.security.dataflow.Xss
33
import semmle.javascript.security.dataflow.CodeInjectionCustomizations
44

55
query Templating::TemplateSyntax getTemplateInstantiationSyntax(
6-
Templating::TemplateInstantiaton inst
6+
Templating::TemplateInstantiation inst
77
) {
88
result = inst.getTemplateSyntax()
99
}
@@ -12,7 +12,7 @@ query Templating::TemplateSyntax getLikelyTemplateSyntax(Templating::TemplateFil
1212
result = Templating::getLikelyTemplateSyntax(file)
1313
}
1414

15-
query Templating::TemplateFile getTargetFile(Templating::TemplateInstantiaton inst) {
15+
query Templating::TemplateFile getTargetFile(Templating::TemplateInstantiation inst) {
1616
result = inst.getTemplateFile()
1717
}
1818

0 commit comments

Comments
 (0)