Skip to content

Fix App::encodeJson regex backtrack limit issue#1573

Merged
georgehristov merged 4 commits intodevelopfrom
fix_json_encode
Dec 17, 2020
Merged

Fix App::encodeJson regex backtrack limit issue#1573
georgehristov merged 4 commits intodevelopfrom
fix_json_encode

Conversation

@mvorisek
Copy link
Copy Markdown
Member

fixes #1540

tests/jsTest.php Outdated
$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
Copy Markdown
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
Copy Markdown
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

Development

Successfully merging this pull request may close these issues.

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

2 participants