Skip to content
This repository has been archived by the owner on Apr 2, 2024. It is now read-only.

Fix code scanning alert - Polynomial regular expression used on uncontrolled data #768

Closed
1 task done
bennycode opened this issue Sep 30, 2022 · 1 comment · Fixed by #769
Closed
1 task done

Comments

@bennycode
Copy link
Owner

bennycode commented Sep 30, 2022

Tracking issue for:

@bennycode bennycode linked a pull request Sep 30, 2022 that will close this issue
@bennycode
Copy link
Owner Author

PR #367 introduced a polynomial regular expression used on uncontrolled data.

Details:

Some regular expressions take a long time to match certain input strings to the point where the time it takes to match a string of length n is proportional to nk or even 2n. Such regular expressions can negatively affect performance, or even allow a malicious user to perform a Denial of Service ("DoS") attack by crafting an expensive input string for the regular expression to match.

We have to remove time.match(/epoch":(.*)\./i) which ultimately means removing to accept time skews as strings (as requested in #354).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant