From 90ccfbd7875b7f1438f8b4268010e40b2c91b645 Mon Sep 17 00:00:00 2001
From: ulrich
Date: Thu, 07 Nov 2024 14:45:47 +0000
Subject: [PATCH] Statuscode ergaenzt

---
 src/de/uhilger/neon/HttpHelper.java |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/de/uhilger/neon/HttpHelper.java b/src/de/uhilger/neon/HttpHelper.java
index f76cfa2..c2485d8 100644
--- a/src/de/uhilger/neon/HttpHelper.java
+++ b/src/de/uhilger/neon/HttpHelper.java
@@ -61,14 +61,14 @@
   public String getFileName(HttpExchange e) throws IllegalArgumentException {
     String ctxPath = e.getHttpContext().getPath();
     String uriPath = e.getRequestURI().getPath();
-    return fixFileName(uriPath.substring(ctxPath.length()));
+    return inspectFileName(uriPath.substring(ctxPath.length()));
   }
   
-  public String fixFileName(String fileName) throws IllegalArgumentException {
+  public String inspectFileName(String fileName) throws IllegalArgumentException {
     if (fileName == null
-            || fileName.contains("..")
-            || fileName.contains("/")
-            || fileName.contains("\\")) {
+            || fileName.contains("..")) {
+            //|| fileName.contains("/")
+            //|| fileName.contains("\\")) {
       throw new IllegalArgumentException("Invalid file name");
     }
     return fileName;

--
Gitblit v1.9.3