[Modify] Polish it
This commit is contained in:
parent
48f0087fb3
commit
daa6b95227
@ -193,18 +193,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");
|
||||
|
||||
byte[] contents;
|
||||
tryReadFile (createFilePath (path), out contents);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user