From 8cc04cb63d6c0330a1b3058f4bce17028f6034cf Mon Sep 17 00:00:00 2001 From: Mischa Salle Date: Wed, 22 Feb 2023 12:24:20 +0100 Subject: [PATCH] Move to common-fileupload 1.5 - Update common-fileupload dependency to 1.5 - Newer commons-fileupload also pulls in newer commons-io which now has two toString methods which would both match when the second parameter is null. We can choose either since in both cases null is the platform default so cast to String. - bump version to 0.2.4 --- README.md | 2 +- RELEASE-NOTES.md | 2 +- ssh-portal/pom.xml | 4 ++-- .../java/eu/rcauth/sshportal/servlet/SSHKeyMainServlet.java | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 16703e5..3166162 100644 --- a/README.md +++ b/README.md @@ -27,7 +27,7 @@ It runs as a tomcat servlet inside the same tomcat container as the Master Porta git clone https://github.com/rcauth-eu/aarc-ssh-portal cd aarc-ssh-portal - git checkout v0.2.3 + git checkout v0.2.4 cd ssh-portal 3. Build the ssh-portal's war file diff --git a/RELEASE-NOTES.md b/RELEASE-NOTES.md index b903fac..267b1cb 100644 --- a/RELEASE-NOTES.md +++ b/RELEASE-NOTES.md @@ -1,6 +1,6 @@ # RELEASE NOTES -## Version 0.2.0, 0.2.1 & 0.2.2 & 0.2.3 +## Version 0.2.0-0.2.4 If you are upgrading from a previous release, you will need to make several changes: diff --git a/ssh-portal/pom.xml b/ssh-portal/pom.xml index e0d4a0d..220cc08 100644 --- a/ssh-portal/pom.xml +++ b/ssh-portal/pom.xml @@ -27,7 +27,7 @@ - 0.2.3-SNAPSHOT + 0.2.4-SNAPSHOT 4.2-RCauth-SNAPSHOT UTF-8 @@ -38,7 +38,7 @@ commons-fileupload commons-fileupload - 1.3.3 + 1.5 diff --git a/ssh-portal/src/main/java/eu/rcauth/sshportal/servlet/SSHKeyMainServlet.java b/ssh-portal/src/main/java/eu/rcauth/sshportal/servlet/SSHKeyMainServlet.java index 788278b..414cb89 100644 --- a/ssh-portal/src/main/java/eu/rcauth/sshportal/servlet/SSHKeyMainServlet.java +++ b/ssh-portal/src/main/java/eu/rcauth/sshportal/servlet/SSHKeyMainServlet.java @@ -500,7 +500,7 @@ private Map getPostParams(HttpServletRequest request, FileItemStream item = iter.next(); String name = item.getFieldName(); InputStream stream = item.openStream(); - String value = IOUtils.toString(stream, null); + String value = IOUtils.toString(stream, (String)null); // Can use same IOUtils.toString() on both type, either // formfield or not. Just check for non-valid filename fields if (value != null) {