github-advanced-security[bot] commented on code in PR #42054:
URL: https://github.com/apache/superset/pull/42054#discussion_r3591549925
##########
superset/utils/date_parser.py:
##########
@@ -120,7 +128,11 @@
source_dttm = dttm_from_timetuple(
source_time.timetuple() if source_time else datetime.now().timetuple()
)
- return dttm_from_timetuple(cal.parse(human_readable or "", source_dttm)[0])
+ human_readable = _QUARTERS_PATTERN.sub(
+ lambda match: f"{int(match[1]) * 3} months",
+ human_readable or "",
Review Comment:
## CodeQL / Polynomial regular expression used on uncontrolled data
This [regular expression](1) that depends on a [user-provided value](2) may
run slow on strings with many repetitions of '0'.
[Show more
details](https://github.com/apache/superset/security/code-scanning/2583)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]