Skip to content

Commit 1b9567a

Browse files
committed
Avoid using Str_ internal class
1 parent 018aa11 commit 1b9567a

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

  • python/ql/src/experimental/semmle/python/frameworks

python/ql/src/experimental/semmle/python/frameworks/Sendgrid.qll

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -114,25 +114,25 @@ private module Sendgrid {
114114
result = sendgridWrite("html_content")
115115
or
116116
exists(KeyValuePair content, Dict generalDict, KeyValuePair typePair, KeyValuePair valuePair |
117-
content.getKey().(Str_).getS() = "content" and
117+
content.getKey().(StrConst).getS() = "content" and
118118
content.getValue().(List).getAnElt() = generalDict and
119119
// declare KeyValuePairs keys and values
120-
typePair.getKey().(Str_).getS() = "type" and
121-
typePair.getValue().(Str_).getS() = ["text/html", "text/x-amp-html"] and
122-
valuePair.getKey().(Str_).getS() = "value" and
120+
typePair.getKey().(StrConst).getS() = "type" and
121+
typePair.getValue().(StrConst).getS() = ["text/html", "text/x-amp-html"] and
122+
valuePair.getKey().(StrConst).getS() = "value" and
123123
result.asExpr() = valuePair.getValue() and
124124
// correlate generalDict with previously set KeyValuePairs
125125
generalDict.getAnItem() in [typePair, valuePair]
126126
)
127127
or
128128
exists(KeyValuePair footer, Dict generalDict, KeyValuePair enablePair, KeyValuePair htmlPair |
129-
footer.getKey().(Str_).getS() = ["footer", "subscription_tracking"] and
129+
footer.getKey().(StrConst).getS() = ["footer", "subscription_tracking"] and
130130
footer.getValue().(Dict) = generalDict and
131131
// check footer is enabled
132-
enablePair.getKey().(Str_).getS() = "enable" and
132+
enablePair.getKey().(StrConst).getS() = "enable" and
133133
exists(enablePair.getValue().(True)) and
134134
// get html content
135-
htmlPair.getKey().(Str_).getS() = "html" and
135+
htmlPair.getKey().(StrConst).getS() = "html" and
136136
result.asExpr() = htmlPair.getValue() and
137137
// correlate generalDict with previously set KeyValuePairs
138138
generalDict.getAnItem() in [enablePair, htmlPair]

0 commit comments

Comments
 (0)