Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

chore: improve regexes in examples#6689

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
ericcornelissen wants to merge1 commit intoexpressjs:master
base:master
Choose a base branch
Loading
fromericcornelissen:patch-1

Conversation

@ericcornelissen
Copy link

Improve a regular expression that appears twice in the examples which could lead to quadratic runtime if the input is crafted to match/\{+/ plus some rejecting suffix. In these examples this is unlikely since the markdown files are probably trusted. This change is mostly focused towards anyone that starts from the examples and expands to cases where the markdown files may not be trusted (i.e., user-provided templates).

Technically this changes the behavior of these examples, because names can no longer contain a{, but given they're just examples this "breaking change" seems acceptable to me.

Improve a regular expression that appears twice in the exampleswhich could lead to quadratic runtime if the input is crafted tomatch /\{+/ plus some rejecting suffix.In these examples this is unlikely since the markdown files areprobably trusted. This change is mostly focussed towards anyonethat starts from the examples and expands to cases where themarkdown files may not be trusted (i.e., user-provided templates).Technically this changes the behavior of these examples, becausenames may no longer contain a '{', but given they're just examplesthis "breaking change" seems acceptable to me.Signed-off-by: Eric Cornelissen <ericornelissen@gmail.com>
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

1 participant

@ericcornelissen

[8]ページ先頭

©2009-2025 Movatter.jp