dotnet/aspnetcore

Regex Timeout are too short, not consistent, and not configurable in RewriteMiddleware

Open

#6.003 geöffnet am 19. Dez. 2017

Auf GitHub ansehen
 (11 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)C# (10.653 Forks)batch import
affected-very-fewarea-middlewareenhancementfeature-rewrite-middlewarehelp wantedseverity-minor

Repository-Metriken

Stars
 (37.933 Stars)
PR-Merge-Metriken
 (Durchschn. Merge 16T 9h) (258 gemergte PRs in 30 T)

Beschreibung

Regex timeouts that are used across UrlRewrite, ApacheModRewrite, and code rules are not consistent. The are set at 1 second or 1 millisecond in different places. Secondly, 1 millisecond is too short for a regex expression; it should be 1 second as the timeout is mostly for making sure your server isn't locked. Also if the expression timeouts, it returns a 500 server error as the exception is unhandled. Thirdly, the timeout should be configurable in RewriteOptions.

Plan of action:

  • Timeouts should be increased to 1 second across the board.
  • For 2.1, we should make Regex timeouts configurable a
  • The timeouts should be backported to 2.0 and 1.1

@Eilon @muratg this is a patch candidate. Workarounds are very difficult.

Contributor Guide