[injection] 2.3.8 broke certain regex match patterns #2670
Closed
Description
Long story short
#2667 causes the following scenario to break:
router.add_get('/v1/grid/{variable}/{interval_type}/{date}', get_grid)which compiles to:
re.compile('\\/v1\\/grid\\/(?P<variable>[^{}/]+)\\/(?P<interval_type>[^{}/]+)\\/(?P<date>[^{}/]+)')
which causes the following match group:
<class 'tuple'>: ('temp', 'hourly', '2015-01-01T00:00:00%2B00:00')and with this code that was recently modified in aiohttp:
{key: URL(value, encoded=True).path for key, value in
match.groupdict().items()}
yields
{'variable': 'temp', 'interval_type': 'hourly', 'date': '00:00+00:00'}Expected behaviour
should not strip out the date from the datetime string
Actual behaviour
date is getting stripped out
Steps to reproduce
Your environment
aiohttp 2.3.8
yarl 1.0.0