Skip to content

Commit afd6ea2

Browse files
committed
small correction in doc + autoformat
1 parent b20e852 commit afd6ea2

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

javascript/ql/src/semmle/javascript/security/UselessUseOfCat.qll

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,7 @@ private class CommandCall extends DataFlow::InvokeNode {
4040
/**
4141
* Gets the data-flow node (if it exists) for an options argument for an `exec`-like call.
4242
*/
43-
DataFlow::Node getOptionsArg() {
44-
result = command.getOptionsArg()
45-
}
43+
DataFlow::Node getOptionsArg() { result = command.getOptionsArg() }
4644

4745
/**
4846
* Gets the constant-string parts that are not part of the command itself.
@@ -78,7 +76,7 @@ private class CommandCall extends DataFlow::InvokeNode {
7876

7977
/**
8078
* Gets the constant string parts from a data-flow node.
81-
* Either the result is a constant string value that the node can hold, or the node is a string-concatenation and the result is the string parts from the concatenation.
79+
* Either the result is a constant string value that the node can hold, or the node is a string-concatenation and the result is the string parts from the concatenation.
8280
*/
8381
private string getConstantStringParts(DataFlow::Node node) {
8482
node.mayHaveStringValue(result)
@@ -108,7 +106,7 @@ class UselessCat extends CommandCall {
108106
prop = "encoding"
109107
)
110108
) and
111-
// If there is a callback, then it must either have one or two arguments, or if there is a third argument it must be unused.
109+
// If there is a callback, then it must either have one or two parameters, or if there is a third parameter it must be unused.
112110
(
113111
not exists(getCallback())
114112
or

0 commit comments

Comments
 (0)