File tree Expand file tree Collapse file tree 1 file changed +2
-5
lines changed
spring-core/src/main/java/org/springframework/core/io/support Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Original file line number Diff line number Diff line change @@ -634,11 +634,8 @@ private Set<ClassPathManifestEntry> getClassPathManifestEntriesFromJar(File jar)
634634
635635 // For relative paths, enforce security check (must be under parent)
636636 // For absolute paths, just verify file exists (matching JVM behavior)
637- boolean isValid = pathFile .isAbsolute () ?
638- candidate .isFile () :
639- (candidate .isFile () && candidate .getCanonicalPath ().contains (parent .getCanonicalPath ()));
640-
641- if (isValid ) {
637+ if (candidate .isFile () &&
638+ (pathFile .isAbsolute () || candidate .getCanonicalPath ().contains (parent .getCanonicalPath ()))) {
642639 manifestEntries .add (ClassPathManifestEntry .of (candidate , this .useCaches ));
643640 }
644641 }
You can’t perform that action at this time.
0 commit comments