From cf98f324e4e3783cb22e2e54c4854d16feeedccd Mon Sep 17 00:00:00 2001 From: sta Date: Wed, 28 Jun 2017 14:32:28 +0900 Subject: [PATCH] [Modify] Polish it --- websocket-sharp/Server/HttpServer.cs | 9 --------- 1 file changed, 9 deletions(-) diff --git a/websocket-sharp/Server/HttpServer.cs b/websocket-sharp/Server/HttpServer.cs index 2a71605a..9bf679e5 100644 --- a/websocket-sharp/Server/HttpServer.cs +++ b/websocket-sharp/Server/HttpServer.cs @@ -1376,18 +1376,9 @@ namespace WebSocketSharp.Server if (path.Length == 0) throw new ArgumentException ("An empty string.", "path"); - if (path.IndexOf (':') > -1) - throw new ArgumentException ("It contains ':'.", "path"); - if (path.IndexOf ("..") > -1) throw new ArgumentException ("It contains '..'.", "path"); - if (path.IndexOf ("//") > -1) - throw new ArgumentException ("It contains '//'.", "path"); - - if (path.IndexOf ("\\\\") > -1) - throw new ArgumentException ("It contains '\\\\'.", "path"); - path = createFilePath (path); return File.Exists (path) ? File.ReadAllBytes (path) : null; }