From 248f901ae7beb8c70cb46f4f8c6327e7f697319a Mon Sep 17 00:00:00 2001 From: Aaron Taylor Date: Tue, 1 Nov 2022 15:02:51 -0400 Subject: fix #1194: Regular expression catastrophic backtracking in bottle.Router.rule_syntax This backports the patch from aaee93a5b1dfc78cb9119797df5c766a53872c5b to the 0.12 release branch. This fix can be validated with the following command from the issue: python -c "import bottle; list(bottle.Router.rule_syntax.finditer(']+)+)?)?)?>))') + '(?::((?:\\\\.|[^\\\\>])+)?)?)?>))') def _itertokens(self, rule): offset, prefix = 0, '' -- cgit v1.2.1