Browse Source

[Modify] Polish it

pull/755/head
sta 1 year ago
parent
commit
7e894d816c
  1. 7
      websocket-sharp/Server/HttpRequestEventArgs.cs

7
websocket-sharp/Server/HttpRequestEventArgs.cs

@ -194,8 +194,11 @@ 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) {
var msg = "It contains \"..\".";
throw new ArgumentException (msg, "path");
}
path = createFilePath (path);
byte[] contents;

Loading…
Cancel
Save