File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
go/ql/src/experimental/CWE-918 Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ class FieldWithTags extends FieldDecl {
2424 * For example: the tag `json:"word" binding:"required,alpha"` yields `key: "json", value: "word"`
2525 * and `key: "binding" values: "required","alpha"`.
2626 */
27- predicate getTagByKeyValue ( string key , string value ) {
27+ predicate hasTagKeyValue ( string key , string value ) {
2828 exists ( string tag , string key_value , string values |
2929 this .getTag ( ) .toString ( ) = tag and
3030 // Each key_value is like key:"value1,value2"
@@ -50,7 +50,7 @@ class AlphanumericStructFieldRead extends DataFlow::Node {
5050 exists ( FieldWithTags decl , Field field , string tag |
5151 this = field .getARead ( ) and
5252 field .getDeclaration ( ) = decl .getNameExpr ( 0 ) and
53- decl .getTagByKeyValue ( key , tag ) and
53+ decl .hasTagKeyValue ( key , tag ) and
5454 isAlphanumericValidationKind ( tag )
5555 )
5656 }
You can’t perform that action at this time.
0 commit comments