From 69f6fdb75759c3002db5116670e4dc6d677be24f Mon Sep 17 00:00:00 2001 From: Ashutosh Gupta Date: Wed, 3 Aug 2022 02:44:39 +0100 Subject: [PATCH] HADOOP-18301. Upgrade commons-io to 2.11.0 (#4455) Co-authored-by: Ashutosh Gupta Signed-off-by: Akira Ajisaka --- .../HostRestrictingAuthorizationFilter.java | 17 ++++++----------- hadoop-project/pom.xml | 2 +- 2 files changed, 7 insertions(+), 12 deletions(-) diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/common/HostRestrictingAuthorizationFilter.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/common/HostRestrictingAuthorizationFilter.java index e9f1cf09e8..0308e55e4c 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/common/HostRestrictingAuthorizationFilter.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/common/HostRestrictingAuthorizationFilter.java @@ -117,17 +117,12 @@ private boolean matchRule(String user, String remoteIp, String path) { String rulePath = rule.getPath(); LOG.trace("Evaluating rule, subnet: {}, path: {}", subnet != null ? subnet.getCidrSignature() : "*", rulePath); - try { - if ((subnet == null || subnet.isInRange(remoteIp)) - && FilenameUtils.directoryContains(rulePath, path)) { - LOG.debug("Found matching rule, subnet: {}, path: {}; returned true", - rule.getSubnet() != null ? subnet.getCidrSignature() : null, - rulePath); - return true; - } - } catch (IOException e) { - LOG.warn("Got IOException {}; returned false", e); - return false; + if ((subnet == null || subnet.isInRange(remoteIp)) + && FilenameUtils.directoryContains(rulePath, path)) { + LOG.debug("Found matching rule, subnet: {}, path: {}; returned true", + rule.getSubnet() != null ? subnet.getCidrSignature() : null, + rulePath); + return true; } } diff --git a/hadoop-project/pom.xml b/hadoop-project/pom.xml index ef479ccb8c..0f01726f4c 100644 --- a/hadoop-project/pom.xml +++ b/hadoop-project/pom.xml @@ -118,7 +118,7 @@ 3.2.2 1.21 1.0 - 2.8.0 + 2.11.0 3.12.0 1.1.3 1.1