Skip to content

Commit 6651736

Browse files
committed
C#: Fix whitespaces
1 parent e76e448 commit 6651736

8 files changed

Lines changed: 17 additions & 17 deletions

File tree

csharp/ql/src/Security Features/CWE-022/ZipSlip.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@ import semmle.code.csharp.security.dataflow.ZipSlip::ZipSlip
1616

1717
from TaintTrackingConfiguration zipTaintTracking, DataFlow::Node source, DataFlow::Node sink
1818
where zipTaintTracking.hasFlow(source, sink)
19-
select sink, "Unsanitized zip archive $@, which may contain '..', is used in a file system operation.", source, "item path"
19+
select sink, "Unsanitized zip archive $@, which may contain '..', is used in a file system operation.", source, "item path"

csharp/ql/src/Security Features/CWE-022/ZipSlipBad.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ public static void WriteToDirectory(ZipArchiveEntry entry,
99
string destFileName = Path.Combine(destDirectory, entry.FullName);
1010
entry.ExtractToFile(destFileName);
1111
}
12-
}
12+
}

csharp/ql/src/Stubs/Stubs.qll

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
/**
1+
/**
22
* Generates C# stubs for use in test code.
33
*
44
* Extend the abstract class `GeneratedDeclaration` with the declarations that should be generated.
55
* This will generate stubs for all the required dependencies as well.
6-
*
6+
*
77
* Use
88
* ```
99
* select generatedCode()
@@ -104,7 +104,7 @@ private abstract class GeneratedType extends ValueOrRefType, GeneratedElement {
104104
result = this.stubComment() +
105105
this.stubAttributes() +
106106
this.stubAbstractModifier() +
107-
this.stubStaticModifier() +
107+
this.stubStaticModifier() +
108108
this.stubAccessibilityModifier() +
109109
this.stubKeyword() + " " +
110110
this.getUndecoratedName() +

csharp/ql/src/semmle/code/csharp/commons/Assertions.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ class ForwarderAssertMethod extends AssertMethod {
147147
override ExceptionClass getExceptionClass() {
148148
result = forwardee.getExceptionClass()
149149
}
150-
150+
151151
/** Gets the underlying assertion method that is being forwarded to. */
152152
AssertMethod getUnderlyingAssertMethod() { result = forwardee }
153153
}

csharp/ql/src/semmle/code/csharp/security/dataflow/ZipSlip.qll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ module ZipSlip {
4646
exists(PropertyAccess pa |
4747
this.asExpr() = pa |
4848
pa.getTarget().getDeclaringType().hasQualifiedName("System.IO.Compression.ZipArchiveEntry") and
49-
pa.getTarget().getName() = "FullName"
49+
pa.getTarget().getName() = "FullName"
5050
)
5151
}
5252
}
@@ -150,4 +150,4 @@ module ZipSlip {
150150
)
151151
}
152152
}
153-
}
153+
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
import csharp
22
import semmle.code.csharp.commons.Assertions
33

4-
select any(FailingAssertion fa)
4+
select any(FailingAssertion fa)

csharp/ql/test/query-tests/Concurrency/LockOrder/LockOrder.cs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ void F()
99
{
1010
lock (a) lock (b) lock(c) { }
1111
}
12-
12+
1313
void G()
1414
{
1515
lock (a) lock (c) lock(b) { }
16-
}
16+
}
1717

1818
void H()
1919
{
@@ -30,18 +30,18 @@ void F()
3030
{
3131
lock (a) G();
3232
}
33-
33+
3434
void G()
3535
{
3636
lock (b) H();
3737
lock (c) I();
3838
}
39-
39+
4040
void H()
4141
{
4242
lock (c) { }
4343
}
44-
44+
4545
void I()
4646
{
4747
lock (b) { }
@@ -52,12 +52,12 @@ class LambdaTest
5252
{
5353
// BAD: a is flagged.
5454
static Object a, b;
55-
55+
5656
void F()
5757
{
5858
Action lock_a = () => { lock(a) { } };
5959
Action lock_b = () => { lock(b) { } };
60-
60+
6161
lock(a) lock_b();
6262
lock(b) lock_a();
6363
}

csharp/ql/test/query-tests/Security Features/CWE-022/ZipSlip/ZipSlipBad.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ public static void WriteToDirectory(ZipArchiveEntry entry,
99
string destFileName = Path.Combine(destDirectory, entry.FullName);
1010
entry.ExtractToFile(destFileName);
1111
}
12-
}
12+
}

0 commit comments

Comments
 (0)