Skip to content

Use the whole string instead of a single line for template match#431

Merged
sporkmonger merged 2 commits intosporkmonger:mainfrom
ojab:ct-_do_not_parse_multiline_strings
Jul 30, 2022
Merged

Use the whole string instead of a single line for template match#431
sporkmonger merged 2 commits intosporkmonger:mainfrom
ojab:ct-_do_not_parse_multiline_strings

Conversation

@ojab
Copy link
Copy Markdown
Contributor

@ojab ojab commented Sep 2, 2021

Multiline strings shouldn't pass the validation if a single line matches.

@ojab ojab force-pushed the ct-_do_not_parse_multiline_strings branch from a2f32c7 to 22af13f Compare September 2, 2021 11:29
@ojab ojab marked this pull request as ready for review September 2, 2021 11:59
@ojab
Copy link
Copy Markdown
Contributor Author

ojab commented Sep 2, 2021

Marking as ready for review because First-time contributors need a maintainer to approve running workflows.

@ojab ojab requested a review from houndci-bot September 2, 2021 11:59
Copy link
Copy Markdown
Collaborator

@therabidbanana therabidbanana left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like a good change - supporting multi line strings was definitely not intentional 👍


describe "#to_regexp" do
it "does not match the first line of multiline strings" do
uri = "https://www.example.com/bar"

Check failure

Code scanning / CodeQL

Incomplete regular expression for hostnames

This string, which is used as a regular expression [here](1), has an unescaped '.' before 'example.com/bar', so it might match more hosts than expected. This string, which is used as a regular expression [here](2), has an unescaped '.' before 'example.com/bar', so it might match more hosts than expected.
@sporkmonger sporkmonger merged commit 99810af into sporkmonger:main Jul 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants