@@ -69,9 +69,9 @@ import semmle.go.frameworks.stdlib.TextTemplate
6969/** A `String()` method. */
7070class 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 )
0 commit comments