Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix App::encodeJson regex backtrack limit issue #1573

Merged
merged 4 commits into from
Dec 17, 2020
Merged

Conversation

mvorisek
Copy link
Member

fixes #1540

tests/jsTest.php Outdated
@@ -27,7 +27,9 @@ public function testNumbers()
$this->markTestIncomplete('Test is not supported on 32bit php');
}

$longStr = str_repeat('"a":10,"b":9007199254740992,x="\"c\":10,\"d\":9007199254740992,"', 50 * 1000);
Copy link
Member Author

Choose a reason for hiding this comment

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

FYI the issue is reproducible even with 1000 repetitions

@mvorisek mvorisek marked this pull request as ready for review December 17, 2020 12:32
Copy link
Collaborator

@georgehristov georgehristov left a comment

Choose a reason for hiding this comment

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

LGTM

@georgehristov georgehristov merged commit b57cbfb into develop Dec 17, 2020
@georgehristov georgehristov deleted the fix_json_encode branch December 17, 2020 14:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

App::encodeJson(): catch case that preg_replace_callback fails
2 participants