Skip to content

Commit fa2faeb

Browse files
authored
Merge pull request github#10802 from jsoref/spelling-python
Spelling python
2 parents 720efd6 + 08f688d commit fa2faeb

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+86
-86
lines changed

python/PoCs/XmlParsing/PoC.py

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@
8282
# other setup
8383

8484
# we set up local Flask application so we can tests whether loading external resources
85-
# works (such as SSRF from DTD-retrival works)
85+
# works (such as SSRF from DTD-retrieval works)
8686
app = Flask(__name__)
8787

8888
@app.route("/alive")
@@ -187,7 +187,7 @@ def test_billion_laughs_allowed_by_default():
187187

188188
@staticmethod
189189
@expects_timeout
190-
def test_quardratic_blowup_allowed_by_default():
190+
def test_quadratic_blowup_allowed_by_default():
191191
parser = xml.sax.make_parser()
192192
parser.parse(StringIO(quadratic_blowup))
193193

@@ -263,7 +263,7 @@ def test_billion_laughs_allowed_by_default():
263263

264264
@staticmethod
265265
@expects_timeout
266-
def test_quardratic_blowup_allowed_by_default():
266+
def test_quadratic_blowup_allowed_by_default():
267267
parser = xml.etree.ElementTree.XMLParser()
268268
_root = xml.etree.ElementTree.fromstring(quadratic_blowup, parser=parser)
269269

@@ -324,7 +324,7 @@ def test_billion_laughs_disabled_by_default():
324324
assert "Detected an entity reference loop" in str(e)
325325

326326
@staticmethod
327-
def test_quardratic_blowup_disabled_by_default():
327+
def test_quadratic_blowup_disabled_by_default():
328328
parser = lxml.etree.XMLParser()
329329
try:
330330
_root = lxml.etree.fromstring(quadratic_blowup, parser=parser)
@@ -465,7 +465,7 @@ def test_billion_laughs_disabled_by_default():
465465
assert d == {"lolz": None}, d
466466

467467
@staticmethod
468-
def test_quardratic_blowup_disabled_by_default():
468+
def test_quadratic_blowup_disabled_by_default():
469469
d = xmltodict.parse(quadratic_blowup)
470470
assert d == {"foo": None}, d
471471

@@ -476,7 +476,7 @@ def test_billion_laughs_manually_enabled():
476476

477477
@staticmethod
478478
@expects_timeout
479-
def test_quardratic_blowup_manually_enabled():
479+
def test_quadratic_blowup_manually_enabled():
480480
xmltodict.parse(quadratic_blowup, disable_entities=False)
481481

482482
@staticmethod
@@ -524,7 +524,7 @@ def test_billion_laughs():
524524

525525
@staticmethod
526526
@expects_timeout
527-
def test_quardratic_blowup():
527+
def test_quadratic_blowup():
528528
xml.dom.minidom.parseString(quadratic_blowup)
529529

530530
@staticmethod
@@ -585,7 +585,7 @@ def test_billion_laughs():
585585

586586
@staticmethod
587587
@expects_timeout
588-
def test_quardratic_blowup():
588+
def test_quadratic_blowup():
589589
doc = xml.dom.pulldom.parseString(quadratic_blowup)
590590
for event, node in doc:
591591
pass
@@ -670,7 +670,7 @@ def test_billion_laughs():
670670

671671
@staticmethod
672672
@expects_timeout
673-
def test_quardratic_blowup():
673+
def test_quadratic_blowup():
674674
parser = xml.parsers.expat.ParserCreate()
675675
parser.Parse(quadratic_blowup, True)
676676

@@ -699,7 +699,7 @@ def char_data_handler(data):
699699

700700
assert char_data_recv == []
701701

702-
# there might be ways to make it vuln, but I did not investigate futher.
702+
# there might be ways to make it vuln, but I did not investigate further.
703703

704704
@staticmethod
705705
def test_dtd():
@@ -711,4 +711,4 @@ def test_dtd():
711711
parser.Parse(dtd_retrieval, True)
712712
assert hit_dtd == False
713713

714-
# there might be ways to make it vuln, but I did not investigate futher.
714+
# there might be ways to make it vuln, but I did not investigate further.

python/ql/examples/snippets/override_method.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/**
22
* @id py/examples/override-method
33
* @name Override of method
4-
* @description Finds methods that overide MyClass.methodName
4+
* @description Finds methods that override MyClass.methodName
55
* @tags method
66
* override
77
*/

python/ql/lib/CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
### Minor Analysis Improvements
44

5-
* Added the ability to refer to subscript operations in the API graph. It is now possible to write `response().getMember("cookies").getASubscript()` to find code like `resp.cookies["key"]` (assuming `response` returns an API node for reponse objects).
5+
* Added the ability to refer to subscript operations in the API graph. It is now possible to write `response().getMember("cookies").getASubscript()` to find code like `resp.cookies["key"]` (assuming `response` returns an API node for response objects).
66
* Added modeling of creating Flask responses with `flask.jsonify`.
77

88
## 0.6.0

python/ql/lib/change-notes/released/0.6.1.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22

33
### Minor Analysis Improvements
44

5-
* Added the ability to refer to subscript operations in the API graph. It is now possible to write `response().getMember("cookies").getASubscript()` to find code like `resp.cookies["key"]` (assuming `response` returns an API node for reponse objects).
5+
* Added the ability to refer to subscript operations in the API graph. It is now possible to write `response().getMember("cookies").getASubscript()` to find code like `resp.cookies["key"]` (assuming `response` returns an API node for response objects).
66
* Added modeling of creating Flask responses with `flask.jsonify`.

python/ql/lib/design.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# The Python libraries
22

33
The Python libraries are a collection of libraries for analysing Python code.
4-
Everythng can be imported by importing `python.qll`.
4+
Everything can be imported by importing `python.qll`.
55

66
## The analysis layers
77

@@ -15,10 +15,10 @@ The analysis is built up in layers. the stack looks like this:
1515

1616
## Avoiding non-monotonic recursion
1717

18-
Given the many interactivg layers, it is imprtant to decie which predicates are allowed to be mutually recursive in order to avoid non-monotonic recursion when negation is used to express the predicates.
19-
As an example, we have defined local source as those whcih do not receive local flow. This means that the local flow relation is not allowed to be recursive with anything depending on local sources.
18+
Given the many interacting layers, it is important to decide which predicates are allowed to be mutually recursive in order to avoid non-monotonic recursion when negation is used to express the predicates.
19+
As an example, we have defined local source as those which do not receive local flow. This means that the local flow relation is not allowed to be recursive with anything depending on local sources.
2020

21-
Some particular reatrictions to keep in mind:
21+
Some particular restrictions to keep in mind:
2222

2323
- Typetracking needs to use a local flow step not including summaries
2424
- Typetracking needs to use a call graph not including summaries

python/ql/lib/semmle/python/ApiGraphs.qll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -211,15 +211,15 @@ module API {
211211
* Gets a node representing the `i`th parameter of the function represented by this node.
212212
*
213213
* This predicate may have multiple results when there are multiple invocations of this API component.
214-
* Consider using `getAnInvocation()` if there is a need to distingiush between individual calls.
214+
* Consider using `getAnInvocation()` if there is a need to distinguish between individual calls.
215215
*/
216216
Node getParameter(int i) { result = this.getASuccessor(Label::parameter(i)) }
217217

218218
/**
219219
* Gets the node representing the keyword parameter `name` of the function represented by this node.
220220
*
221221
* This predicate may have multiple results when there are multiple invocations of this API component.
222-
* Consider using `getAnInvocation()` if there is a need to distingiush between individual calls.
222+
* Consider using `getAnInvocation()` if there is a need to distinguish between individual calls.
223223
*/
224224
Node getKeywordParameter(string name) {
225225
result = this.getASuccessor(Label::keywordParameter(name))

python/ql/lib/semmle/python/Constants.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ int major_version() {
77
explicit_major_version(result)
88
or
99
not explicit_major_version(_) and
10-
/* If there is more than one version, prefer 2 for backwards compatibilty */
10+
/* If there is more than one version, prefer 2 for backwards compatibility */
1111
(if py_flags_versioned("version.major", "2", "2") then result = 2 else result = 3)
1212
}
1313

python/ql/lib/semmle/python/Flow.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -931,7 +931,7 @@ class NameConstantNode extends NameNode {
931931

932932
}
933933

934-
/** A control flow node correspoinding to a starred expression, `*a`. */
934+
/** A control flow node corresponding to a starred expression, `*a`. */
935935
class StarredNode extends ControlFlowNode {
936936
StarredNode() { toAst(this) instanceof Starred }
937937

python/ql/lib/semmle/python/dataflow/new/RemoteFlowSources.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Provides an extension point for for modeling user-controlled data.
2+
* Provides an extension point for modeling user-controlled data.
33
* Such data is often used as data-flow sources in security queries.
44
*/
55

python/ql/lib/semmle/python/dataflow/new/SensitiveDataSources.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Provides an extension point for for modeling sensitive data, such as secrets, certificates, or passwords.
2+
* Provides an extension point for modeling sensitive data, such as secrets, certificates, or passwords.
33
* Sensitive data can be interesting to use as data-flow sources in security queries.
44
*/
55

0 commit comments

Comments
 (0)