Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/cel/src/std/logic.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ function durationOf(func: () => void, times = 5): number {

void suite("logic", () => {
void suite("matches(string, string) -> bool", () => {
void test.skip("doesn't evaluate simple ReDoS expressions in exponential time", () => {
void test("doesn't evaluate simple ReDoS expressions in exponential time", () => {
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Should we merge this before the re2js merge?

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

apparently not, it depends on @bufbuild/re2

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

The test is a guard against ReDoS. It fails with the current implementation on main, and I expect it to pass in your branch.

It's currently skipped on main because it fails on main. We could merge this change into main, but it means CI would be red, and we'd be stuck if some other work comes along before we can merge your branch.

const maliciousRegex = "^(a*)*$";
const overhead = durationOf(() => matches.call("!", maliciousRegex));

Expand Down
Loading