Projects
Mega:23.09
apache-commons-io
_service:tar_scm:CVE-2021-29425-4.patch
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File _service:tar_scm:CVE-2021-29425-4.patch of Package apache-commons-io
From 0842e1f60a1ca36c8db76a00c6001a38174de21b Mon Sep 17 00:00:00 2001 From: Stefan Bodewig <stefan.bodewig@innoq.com> Date: Thu, 17 May 2018 21:04:34 +0200 Subject: [PATCH 4/4] remove IPv4 checks that are unnnecessary due to matching regex --- .../java/org/apache/commons/io/FilenameUtils.java | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/src/main/java/org/apache/commons/io/FilenameUtils.java b/src/main/java/org/apache/commons/io/FilenameUtils.java index b93476bb..5da8f786 100644 --- a/src/main/java/org/apache/commons/io/FilenameUtils.java +++ b/src/main/java/org/apache/commons/io/FilenameUtils.java @@ -1490,20 +1490,9 @@ public class FilenameUtils { } // verify that address subgroups are legal - for (int i = 1; i < 5; i++) { + for (int i = 1; i <= 4; i++) { String ipSegment = m.group(i); - if (ipSegment == null || ipSegment.length() == 0) { - return false; - } - - int iIpSegment = 0; - - try { - iIpSegment = Integer.parseInt(ipSegment); - } catch(NumberFormatException e) { - return false; - } - + int iIpSegment = Integer.parseInt(ipSegment); if (iIpSegment > IPV4_MAX_OCTET_VALUE) { return false; } -- 2.23.0
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.
浙ICP备2022010568号-2