File tree Expand file tree Collapse file tree 3 files changed +19
-4
lines changed
src/main/java/io/kubernetes/client Expand file tree Collapse file tree 3 files changed +19
-4
lines changed Original file line number Diff line number Diff line change 48
48
<apache .commons.lang3.version>3.11</apache .commons.lang3.version>
49
49
<apache .commons.collections4.version>4.4</apache .commons.collections4.version>
50
50
<apache .commons.compress>1.20</apache .commons.compress>
51
- <common .codec.version>1.15 </common .codec.version>
52
- <spring .boot.version>2.3.3 .RELEASE</spring .boot.version>
53
- <spring .version>5.2.9 .RELEASE</spring .version>
51
+ <common .codec.version>1.14 </common .codec.version>
52
+ <spring .boot.version>2.3.1 .RELEASE</spring .boot.version>
53
+ <spring .version>5.2.8 .RELEASE</spring .version>
54
54
<prometheus .client.version>0.9.0</prometheus .client.version>
55
+ <apache .commons.io>2.8.0</apache .commons.io>
55
56
56
57
<e2e .skip>true</e2e .skip>
57
58
103
104
<artifactId >commons-compress</artifactId >
104
105
<version >${apache.commons.compress} </version >
105
106
</dependency >
107
+ <dependency >
108
+ <groupId >commons-io</groupId >
109
+ <artifactId >commons-io</artifactId >
110
+ <version >${apache.commons.io} </version >
111
+ </dependency >
106
112
<dependency >
107
113
<groupId >com.google.guava</groupId >
108
114
<artifactId >guava</artifactId >
Original file line number Diff line number Diff line change 46
46
<groupId >org.apache.commons</groupId >
47
47
<artifactId >commons-lang3</artifactId >
48
48
</dependency >
49
+ <dependency >
50
+ <groupId >commons-io</groupId >
51
+ <artifactId >commons-io</artifactId >
52
+ </dependency >
49
53
<dependency >
50
54
<groupId >com.google.guava</groupId >
51
55
<artifactId >guava</artifactId >
Original file line number Diff line number Diff line change 39
39
import org .apache .commons .compress .archivers .tar .TarArchiveInputStream ;
40
40
import org .apache .commons .compress .archivers .tar .TarArchiveOutputStream ;
41
41
import org .apache .commons .compress .compressors .gzip .GzipCompressorInputStream ;
42
+ import org .apache .commons .io .FilenameUtils ;
42
43
import org .slf4j .Logger ;
43
44
import org .slf4j .LoggerFactory ;
44
45
@@ -170,7 +171,11 @@ public void copyDirectoryFromPod(
170
171
log .error ("Can't read: " + entry );
171
172
continue ;
172
173
}
173
- File f = new File (destination .toFile (), entry .getName ());
174
+ String normalName = FilenameUtils .normalize (entry .getName ());
175
+ if (normalName == null ) {
176
+ throw new IOException ("Invalid entry: " + entry .getName ());
177
+ }
178
+ File f = new File (destination .toFile (), normalName );
174
179
if (entry .isDirectory ()) {
175
180
if (!f .isDirectory () && !f .mkdirs ()) {
176
181
throw new IOException ("create directory failed: " + f );
You can’t perform that action at this time.
0 commit comments