From deaf67b36abc89fa63726855984b6e7c41c5254b Mon Sep 17 00:00:00 2001 From: Binal Patel Date: Fri, 21 Nov 2025 22:34:11 -0800 Subject: [PATCH 1/6] Update error message --- core/src/org/labkey/core/webdav/DavController.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/org/labkey/core/webdav/DavController.java b/core/src/org/labkey/core/webdav/DavController.java index 58c7bbb0112..dd0a279b094 100644 --- a/core/src/org/labkey/core/webdav/DavController.java +++ b/core/src/org/labkey/core/webdav/DavController.java @@ -3002,7 +3002,7 @@ public void closeInputStream() throws IOException if (result.result == AntiVirusService.Result.CONFIGURATION_ERROR) throw new ConfigurationException(result.message); else - throw new DavException(WebdavStatus.SC_BAD_REQUEST, result.message); + throw new DavException(WebdavStatus.SC_BAD_REQUEST, "For security reasons, we did not upload this file. Please contact your IT Team in dealing with this potentially harmful file."); } } From bd522ce75585b94baa716ee650f20104f64feb4a Mon Sep 17 00:00:00 2001 From: Binal Patel Date: Fri, 21 Nov 2025 22:41:53 -0800 Subject: [PATCH 2/6] Update error message --- core/src/org/labkey/core/webdav/DavController.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/org/labkey/core/webdav/DavController.java b/core/src/org/labkey/core/webdav/DavController.java index dd0a279b094..02ef7c88790 100644 --- a/core/src/org/labkey/core/webdav/DavController.java +++ b/core/src/org/labkey/core/webdav/DavController.java @@ -3002,7 +3002,7 @@ public void closeInputStream() throws IOException if (result.result == AntiVirusService.Result.CONFIGURATION_ERROR) throw new ConfigurationException(result.message); else - throw new DavException(WebdavStatus.SC_BAD_REQUEST, "For security reasons, we did not upload this file. Please contact your IT Team in dealing with this potentially harmful file."); + throw new DavException(WebdavStatus.SC_BAD_REQUEST, result.message + ". For security reasons, we did not upload this file. Please contact your IT Team in dealing with this potentially harmful file."); } } From 03c431fc13650aa69392a4c1dcb91eb88a4d64b5 Mon Sep 17 00:00:00 2001 From: Binal Patel Date: Sun, 7 Dec 2025 20:20:20 -0800 Subject: [PATCH 3/6] Add 'for assistance' back in the error message, got removed by mistake. --- core/src/org/labkey/core/webdav/DavController.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/org/labkey/core/webdav/DavController.java b/core/src/org/labkey/core/webdav/DavController.java index 02ef7c88790..f5609946d3d 100644 --- a/core/src/org/labkey/core/webdav/DavController.java +++ b/core/src/org/labkey/core/webdav/DavController.java @@ -3002,7 +3002,7 @@ public void closeInputStream() throws IOException if (result.result == AntiVirusService.Result.CONFIGURATION_ERROR) throw new ConfigurationException(result.message); else - throw new DavException(WebdavStatus.SC_BAD_REQUEST, result.message + ". For security reasons, we did not upload this file. Please contact your IT Team in dealing with this potentially harmful file."); + throw new DavException(WebdavStatus.SC_BAD_REQUEST, result.message + ". For security reasons, we did not upload this file. Please contact your IT Team for assistance in dealing with this potentially harmful file."); } } From 94384b083d3ff0bc367fa6c8129c19411990ce8a Mon Sep 17 00:00:00 2001 From: Binal Patel Date: Sun, 7 Dec 2025 20:21:58 -0800 Subject: [PATCH 4/6] Remove additional spacing. --- core/src/org/labkey/core/webdav/DavController.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/org/labkey/core/webdav/DavController.java b/core/src/org/labkey/core/webdav/DavController.java index f5609946d3d..7755c455d9a 100644 --- a/core/src/org/labkey/core/webdav/DavController.java +++ b/core/src/org/labkey/core/webdav/DavController.java @@ -3002,7 +3002,7 @@ public void closeInputStream() throws IOException if (result.result == AntiVirusService.Result.CONFIGURATION_ERROR) throw new ConfigurationException(result.message); else - throw new DavException(WebdavStatus.SC_BAD_REQUEST, result.message + ". For security reasons, we did not upload this file. Please contact your IT Team for assistance in dealing with this potentially harmful file."); + throw new DavException(WebdavStatus.SC_BAD_REQUEST, result.message + ". For security reasons, we did not upload this file. Please contact your IT Team for assistance in dealing with this potentially harmful file."); } } From 93b5a0d2b703c9b15ce5b69e3bbdfa2d6e0add6b Mon Sep 17 00:00:00 2001 From: Binal Patel Date: Mon, 8 Dec 2025 09:50:41 -0800 Subject: [PATCH 5/6] Update error message --- core/src/org/labkey/core/webdav/DavController.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/org/labkey/core/webdav/DavController.java b/core/src/org/labkey/core/webdav/DavController.java index 7755c455d9a..2f516ab8346 100644 --- a/core/src/org/labkey/core/webdav/DavController.java +++ b/core/src/org/labkey/core/webdav/DavController.java @@ -3002,7 +3002,7 @@ public void closeInputStream() throws IOException if (result.result == AntiVirusService.Result.CONFIGURATION_ERROR) throw new ConfigurationException(result.message); else - throw new DavException(WebdavStatus.SC_BAD_REQUEST, result.message + ". For security reasons, we did not upload this file. Please contact your IT Team for assistance in dealing with this potentially harmful file."); + throw new DavException(WebdavStatus.SC_BAD_REQUEST, result.message + ". For security reasons, we did not upload this file. Please contact your internal IT or Information Security department for assistance in dealing with this potentially harmful file."); } } From 7634eb384c139fa9b4131fb48979ffde61594e18 Mon Sep 17 00:00:00 2001 From: Binal Patel Date: Mon, 8 Dec 2025 23:12:04 -0800 Subject: [PATCH 6/6] Move error msg to a constant in AntiVirusService --- api/src/org/labkey/api/premium/AntiVirusService.java | 1 + core/src/org/labkey/core/webdav/DavController.java | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/api/src/org/labkey/api/premium/AntiVirusService.java b/api/src/org/labkey/api/premium/AntiVirusService.java index 20a31e5d897..5e15f09145e 100644 --- a/api/src/org/labkey/api/premium/AntiVirusService.java +++ b/api/src/org/labkey/api/premium/AntiVirusService.java @@ -35,6 +35,7 @@ public interface AntiVirusService { // NOTE purposefully this is not the same as the standard test file: ...EICAR-STANDARD-ANTIVIRUS-TEST-FILE... String TEST_VIRUS_CONTENT="X5O!P%@AP[4\\PZX54(P^)7CC)7}$LABKEY-ANTIVIRUS-TEST-FILE!$H+H*"; + String MALICIOUS_FILE_ERROR_MESSAGE = "For security reasons, we did not upload this file. Please contact your internal IT or Information Security department for assistance in dealing with this potentially harmful file."; static @Nullable AntiVirusService get() { diff --git a/core/src/org/labkey/core/webdav/DavController.java b/core/src/org/labkey/core/webdav/DavController.java index 2f516ab8346..6c680148437 100644 --- a/core/src/org/labkey/core/webdav/DavController.java +++ b/core/src/org/labkey/core/webdav/DavController.java @@ -3002,7 +3002,7 @@ public void closeInputStream() throws IOException if (result.result == AntiVirusService.Result.CONFIGURATION_ERROR) throw new ConfigurationException(result.message); else - throw new DavException(WebdavStatus.SC_BAD_REQUEST, result.message + ". For security reasons, we did not upload this file. Please contact your internal IT or Information Security department for assistance in dealing with this potentially harmful file."); + throw new DavException(WebdavStatus.SC_BAD_REQUEST, result.message + ". " + AntiVirusService.MALICIOUS_FILE_ERROR_MESSAGE); } }