Skip to content

Commit 28083eb

Browse files
committed
run the implicit-this patch
1 parent a593a52 commit 28083eb

File tree

12 files changed

+46
-44
lines changed

12 files changed

+46
-44
lines changed

cpp/ql/lib/semmle/code/cpp/XML.qll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ class XmlFile extends XmlParent, File {
135135
XmlDtd getADtd() { xmlDTDs(result, _, _, _, this) }
136136

137137
/** DEPRECATED: Alias for getADtd */
138-
deprecated XmlDTD getADTD() { result = getADtd() }
138+
deprecated XmlDTD getADTD() { result = this.getADtd() }
139139
}
140140

141141
/** DEPRECATED: Alias for XmlFile */
@@ -291,7 +291,7 @@ class XmlNamespace extends XmlLocatable, @xmlnamespace {
291291
string getUri() { xmlNs(this, _, result, _) }
292292

293293
/** DEPRECATED: Alias for getUri */
294-
deprecated string getURI() { result = getUri() }
294+
deprecated string getURI() { result = this.getUri() }
295295

296296
/** Holds if this namespace has no prefix. */
297297
predicate isDefault() { this.getPrefix() = "" }

csharp/ql/lib/semmle/code/asp/WebConfig.qll

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -99,15 +99,15 @@ class FormsElement extends XmlElement {
9999
}
100100

101101
/** DEPRECATED: Alias for getRequireSsl */
102-
deprecated string getRequireSSL() { result = getRequireSsl() }
102+
deprecated string getRequireSSL() { result = this.getRequireSsl() }
103103

104104
/**
105105
* Holds if `requireSSL` value is true.
106106
*/
107107
predicate isRequireSsl() { this.getRequireSsl() = "true" }
108108

109109
/** DEPRECATED: Alias for isRequireSsl */
110-
deprecated predicate isRequireSSL() { isRequireSsl() }
110+
deprecated predicate isRequireSSL() { this.isRequireSsl() }
111111
}
112112

113113
/** A `<httpCookies>` tag in an ASP.NET configuration file. */
@@ -134,7 +134,7 @@ class HttpCookiesElement extends XmlElement {
134134
}
135135

136136
/** DEPRECATED: Alias for getRequireSsl */
137-
deprecated string getRequireSSL() { result = getRequireSsl() }
137+
deprecated string getRequireSSL() { result = this.getRequireSsl() }
138138

139139
/**
140140
* Holds if there is any chance that `requireSSL` is set to `true` either globally or for Forms.
@@ -147,5 +147,5 @@ class HttpCookiesElement extends XmlElement {
147147
}
148148

149149
/** DEPRECATED: Alias for isRequireSsl */
150-
deprecated predicate isRequireSSL() { isRequireSsl() }
150+
deprecated predicate isRequireSSL() { this.isRequireSsl() }
151151
}

csharp/ql/lib/semmle/code/csharp/XML.qll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ class XmlFile extends XmlParent, File {
135135
XmlDtd getADtd() { xmlDTDs(result, _, _, _, this) }
136136

137137
/** DEPRECATED: Alias for getADtd */
138-
deprecated XmlDTD getADTD() { result = getADtd() }
138+
deprecated XmlDTD getADTD() { result = this.getADtd() }
139139
}
140140

141141
/** DEPRECATED: Alias for XmlFile */
@@ -291,7 +291,7 @@ class XmlNamespace extends XmlLocatable, @xmlnamespace {
291291
string getUri() { xmlNs(this, _, result, _) }
292292

293293
/** DEPRECATED: Alias for getUri */
294-
deprecated string getURI() { result = getUri() }
294+
deprecated string getURI() { result = this.getUri() }
295295

296296
/** Holds if this namespace has no prefix. */
297297
predicate isDefault() { this.getPrefix() = "" }

csharp/ql/lib/semmle/code/csharp/frameworks/microsoft/Owin.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ class MicrosoftOwinIOwinRequestClass extends Class {
125125
}
126126

127127
/** DEPRECATED: Alias for getUriProperty */
128-
deprecated Property getURIProperty() { result = getUriProperty() }
128+
deprecated Property getURIProperty() { result = this.getUriProperty() }
129129
}
130130

131131
/** A `Microsoft.Owin.*String` class. */

go/ql/lib/semmle/go/frameworks/Stdlib.qll

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,9 @@ import semmle.go.frameworks.stdlib.TextTemplate
6969
/** A `String()` method. */
7070
class StringMethod extends TaintTracking::FunctionModel, Method {
7171
StringMethod() {
72-
getName() = "String" and
73-
getNumParameter() = 0 and
74-
getResultType(0) = Builtin::string_().getType()
72+
this.getName() = "String" and
73+
this.getNumParameter() = 0 and
74+
this.getResultType(0) = Builtin::string_().getType()
7575
}
7676

7777
override predicate hasTaintFlow(FunctionInput inp, FunctionOutput outp) {
@@ -132,7 +132,8 @@ module URL {
132132
/** The `PathEscape` or `QueryEscape` function. */
133133
class Escaper extends TaintTracking::FunctionModel {
134134
Escaper() {
135-
hasQualifiedName("net/url", "PathEscape") or hasQualifiedName("net/url", "QueryEscape")
135+
this.hasQualifiedName("net/url", "PathEscape") or
136+
this.hasQualifiedName("net/url", "QueryEscape")
136137
}
137138

138139
override predicate hasTaintFlow(FunctionInput inp, FunctionOutput outp) {
@@ -143,7 +144,8 @@ module URL {
143144
/** The `PathUnescape` or `QueryUnescape` function. */
144145
class Unescaper extends TaintTracking::FunctionModel {
145146
Unescaper() {
146-
hasQualifiedName("net/url", "PathUnescape") or hasQualifiedName("net/url", "QueryUnescape")
147+
this.hasQualifiedName("net/url", "PathUnescape") or
148+
this.hasQualifiedName("net/url", "QueryUnescape")
147149
}
148150

149151
override predicate hasTaintFlow(FunctionInput inp, FunctionOutput outp) {
@@ -154,10 +156,10 @@ module URL {
154156
/** The `Parse`, `ParseQuery` or `ParseRequestURI` function, or the `URL.Parse` method. */
155157
class Parser extends TaintTracking::FunctionModel {
156158
Parser() {
157-
hasQualifiedName("net/url", "Parse") or
159+
this.hasQualifiedName("net/url", "Parse") or
158160
this.(Method).hasQualifiedName("net/url", "URL", "Parse") or
159-
hasQualifiedName("net/url", "ParseQuery") or
160-
hasQualifiedName("net/url", "ParseRequestURI")
161+
this.hasQualifiedName("net/url", "ParseQuery") or
162+
this.hasQualifiedName("net/url", "ParseRequestURI")
161163
}
162164

163165
override predicate hasTaintFlow(FunctionInput inp, FunctionOutput outp) {
@@ -192,7 +194,7 @@ module URL {
192194
/** A method that returns a part of a URL. */
193195
class UrlGetter extends TaintTracking::FunctionModel, Method {
194196
UrlGetter() {
195-
exists(string m | hasQualifiedName("net/url", "URL", m) |
197+
exists(string m | this.hasQualifiedName("net/url", "URL", m) |
196198
m = ["EscapedPath", "Hostname", "Port", "Query", "RequestURI"]
197199
)
198200
}
@@ -204,7 +206,7 @@ module URL {
204206

205207
/** The method `URL.MarshalBinary`. */
206208
class UrlMarshalBinary extends TaintTracking::FunctionModel, Method {
207-
UrlMarshalBinary() { hasQualifiedName("net/url", "URL", "MarshalBinary") }
209+
UrlMarshalBinary() { this.hasQualifiedName("net/url", "URL", "MarshalBinary") }
208210

209211
override predicate hasTaintFlow(FunctionInput inp, FunctionOutput outp) {
210212
inp.isReceiver() and outp.isResult(0)
@@ -213,7 +215,7 @@ module URL {
213215

214216
/** The method `URL.ResolveReference`. */
215217
class UrlResolveReference extends TaintTracking::FunctionModel, Method {
216-
UrlResolveReference() { hasQualifiedName("net/url", "URL", "ResolveReference") }
218+
UrlResolveReference() { this.hasQualifiedName("net/url", "URL", "ResolveReference") }
217219

218220
override predicate hasTaintFlow(FunctionInput inp, FunctionOutput outp) {
219221
(inp.isReceiver() or inp.isParameter(0)) and
@@ -224,8 +226,8 @@ module URL {
224226
/** The function `User` or `UserPassword`. */
225227
class UserinfoConstructor extends TaintTracking::FunctionModel {
226228
UserinfoConstructor() {
227-
hasQualifiedName("net/url", "User") or
228-
hasQualifiedName("net/url", "UserPassword")
229+
this.hasQualifiedName("net/url", "User") or
230+
this.hasQualifiedName("net/url", "UserPassword")
229231
}
230232

231233
override predicate hasTaintFlow(FunctionInput inp, FunctionOutput outp) {
@@ -236,7 +238,7 @@ module URL {
236238
/** A method that returns a part of a Userinfo struct. */
237239
class UserinfoGetter extends TaintTracking::FunctionModel, Method {
238240
UserinfoGetter() {
239-
exists(string m | hasQualifiedName("net/url", "Userinfo", m) |
241+
exists(string m | this.hasQualifiedName("net/url", "Userinfo", m) |
240242
m = "Password" or
241243
m = "Username"
242244
)
@@ -250,7 +252,7 @@ module URL {
250252
/** A method that returns all or part of a Values map. */
251253
class ValuesGetter extends TaintTracking::FunctionModel, Method {
252254
ValuesGetter() {
253-
exists(string m | hasQualifiedName("net/url", "Values", m) |
255+
exists(string m | this.hasQualifiedName("net/url", "Values", m) |
254256
m = "Encode" or
255257
m = "Get"
256258
)

java/ql/lib/semmle/code/java/frameworks/javaee/ejb/EJB.qll

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ abstract class BusinessInterface extends Interface {
246246
abstract SessionEjb getAnEjb();
247247

248248
/** DEPRECATED: Alias for getAnEjb */
249-
deprecated SessionEJB getAnEJB() { result = getAnEjb() }
249+
deprecated SessionEJB getAnEJB() { result = this.getAnEjb() }
250250

251251
/** Holds if this business interface is declared local. */
252252
abstract predicate isDeclaredLocal();
@@ -275,7 +275,7 @@ class XmlSpecifiedBusinessInterface extends BusinessInterface {
275275
}
276276

277277
/** DEPRECATED: Alias for getAnEjb */
278-
deprecated override SessionEJB getAnEJB() { result = getAnEjb() }
278+
deprecated override SessionEJB getAnEJB() { result = this.getAnEjb() }
279279

280280
override predicate isDeclaredLocal() {
281281
exists(EjbJarXmlFile f |
@@ -314,7 +314,7 @@ class AnnotatedBusinessInterface extends BusinessInterface {
314314
}
315315

316316
/** DEPRECATED: Alias for getAnEjb */
317-
deprecated override SessionEJB getAnEJB() { result = getAnEjb() }
317+
deprecated override SessionEJB getAnEJB() { result = this.getAnEjb() }
318318

319319
override predicate isDeclaredLocal() { this instanceof LocalAnnotatedBusinessInterface }
320320

@@ -451,7 +451,7 @@ class XmlSpecifiedRemoteInterface extends LegacyEjbRemoteInterface {
451451
}
452452

453453
/** DEPRECATED: Alias for getAnEjb */
454-
deprecated SessionEJB getAnEJB() { result = getAnEjb() }
454+
deprecated SessionEJB getAnEJB() { result = this.getAnEjb() }
455455
}
456456

457457
/** A legacy remote home interface. */
@@ -471,7 +471,7 @@ class AnnotatedRemoteHomeInterface extends LegacyEjbRemoteHomeInterface {
471471
SessionEjb getAnEjb() { result.getAnAnnotation().(RemoteHomeAnnotation).getANamedType() = this }
472472

473473
/** DEPRECATED: Alias for getAnEjb */
474-
deprecated SessionEJB getAnEJB() { result = getAnEjb() }
474+
deprecated SessionEJB getAnEJB() { result = this.getAnEjb() }
475475

476476
/** Gets a remote interface associated with this legacy remote home interface. */
477477
Interface getAnAssociatedRemoteInterface() { result = this.getACreateMethod().getReturnType() }
@@ -496,7 +496,7 @@ class XmlSpecifiedRemoteHomeInterface extends LegacyEjbRemoteHomeInterface {
496496
}
497497

498498
/** DEPRECATED: Alias for getAnEjb */
499-
deprecated SessionEJB getAnEJB() { result = getAnEjb() }
499+
deprecated SessionEJB getAnEJB() { result = this.getAnEjb() }
500500
}
501501

502502
/** A legacy local interface. */
@@ -524,7 +524,7 @@ class XmlSpecifiedLocalInterface extends LegacyEjbLocalInterface {
524524
}
525525

526526
/** DEPRECATED: Alias for getAnEjb */
527-
deprecated SessionEJB getAnEJB() { result = getAnEjb() }
527+
deprecated SessionEJB getAnEJB() { result = this.getAnEjb() }
528528
}
529529

530530
/** A legacy local home interface. */
@@ -544,7 +544,7 @@ class AnnotatedLocalHomeInterface extends LegacyEjbLocalHomeInterface {
544544
SessionEjb getAnEjb() { result.getAnAnnotation().(LocalHomeAnnotation).getANamedType() = this }
545545

546546
/** DEPRECATED: Alias for getAnEjb */
547-
deprecated SessionEJB getAnEJB() { result = getAnEjb() }
547+
deprecated SessionEJB getAnEJB() { result = this.getAnEjb() }
548548

549549
/** Gets a local interface associated with this legacy local home interface. */
550550
Interface getAnAssociatedLocalInterface() { result = this.getACreateMethod().getReturnType() }
@@ -569,7 +569,7 @@ class XmlSpecifiedLocalHomeInterface extends LegacyEjbLocalHomeInterface {
569569
}
570570

571571
/** DEPRECATED: Alias for getAnEjb */
572-
deprecated SessionEJB getAnEJB() { result = getAnEjb() }
572+
deprecated SessionEJB getAnEJB() { result = this.getAnEjb() }
573573
}
574574

575575
/**
@@ -594,7 +594,7 @@ class RemoteInterface extends Interface {
594594
}
595595

596596
/** DEPRECATED: Alias for getAnEjb */
597-
deprecated SessionEJB getAnEJB() { result = getAnEjb() }
597+
deprecated SessionEJB getAnEJB() { result = this.getAnEjb() }
598598

599599
/**
600600
* A "remote method" is a method that is available on the remote

java/ql/lib/semmle/code/java/security/SensitiveLoggingQuery.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,5 +41,5 @@ class SensitiveLoggerConfiguration extends TaintTracking::Configuration {
4141
sanitizer.getType() instanceof TypeType
4242
}
4343

44-
override predicate isSanitizerIn(Node node) { isSource(node) }
44+
override predicate isSanitizerIn(Node node) { this.isSource(node) }
4545
}

java/ql/lib/semmle/code/xml/XML.qll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ class XmlFile extends XmlParent, File {
135135
XmlDtd getADtd() { xmlDTDs(result, _, _, _, this) }
136136

137137
/** DEPRECATED: Alias for getADtd */
138-
deprecated XmlDTD getADTD() { result = getADtd() }
138+
deprecated XmlDTD getADTD() { result = this.getADtd() }
139139
}
140140

141141
/** DEPRECATED: Alias for XmlFile */
@@ -291,7 +291,7 @@ class XmlNamespace extends XmlLocatable, @xmlnamespace {
291291
string getUri() { xmlNs(this, _, result, _) }
292292

293293
/** DEPRECATED: Alias for getUri */
294-
deprecated string getURI() { result = getUri() }
294+
deprecated string getURI() { result = this.getUri() }
295295

296296
/** Holds if this namespace has no prefix. */
297297
predicate isDefault() { this.getPrefix() = "" }

javascript/ql/lib/semmle/javascript/XML.qll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ class XmlFile extends XmlParent, File {
135135
XmlDtd getADtd() { xmlDTDs(result, _, _, _, this) }
136136

137137
/** DEPRECATED: Alias for getADtd */
138-
deprecated XmlDTD getADTD() { result = getADtd() }
138+
deprecated XmlDTD getADTD() { result = this.getADtd() }
139139
}
140140

141141
/** DEPRECATED: Alias for XmlFile */
@@ -291,7 +291,7 @@ class XmlNamespace extends XmlLocatable, @xmlnamespace {
291291
string getUri() { xmlNs(this, _, result, _) }
292292

293293
/** DEPRECATED: Alias for getUri */
294-
deprecated string getURI() { result = getUri() }
294+
deprecated string getURI() { result = this.getUri() }
295295

296296
/** Holds if this namespace has no prefix. */
297297
predicate isDefault() { this.getPrefix() = "" }

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ class DomMethodCallExpr extends MethodCallExpr {
104104
}
105105

106106
/** DEPRECATED: Alias for interpretsArgumentsAsUrl */
107-
deprecated predicate interpretsArgumentsAsURL(Expr arg) { interpretsArgumentsAsUrl(arg) }
107+
deprecated predicate interpretsArgumentsAsURL(Expr arg) { this.interpretsArgumentsAsUrl(arg) }
108108

109109
/** DEPRECATED: Alias for interpretsArgumentsAsHtml */
110110
deprecated predicate interpretsArgumentsAsHTML(Expr arg) { this.interpretsArgumentsAsHtml(arg) }

0 commit comments

Comments
 (0)