Fix for filenames with underline in StaticFileHandler

main
Inga 🏳‍🌈 14 years ago
parent 5d6a732488
commit b76fc00c5b
  1. 2
      Builder/IISMainHandler/build.txt
  2. 2
      Builder/IISUploadHandler/build.txt
  3. 2
      IISMainHandler/handlers/StaticHandler.cs

@ -21,7 +21,7 @@ namespace FLocal.IISHandler.handlers {
throw new HttpException(403, "listing not allowed");
}
Regex checker = new Regex("^[a-z][0-9a-z\\-]*(\\.[a-zA-Z]+)?$", RegexOptions.Compiled | RegexOptions.CultureInvariant | RegexOptions.IgnoreCase | RegexOptions.Singleline);
Regex checker = new Regex("^[a-z][0-9a-z\\-_]*(\\.[a-zA-Z]+)?$", RegexOptions.Compiled | RegexOptions.CultureInvariant | RegexOptions.IgnoreCase | RegexOptions.Singleline);
string path = "";
for(int i=1; i<this.requestParts.Length; i++) {
if(!checker.IsMatch(this.requestParts[i])) {

Loading…
Cancel
Save