Parse.File base64 validation causes runaway regular expression #1541
Labels
state:duplicate
Duplicate of already reported issue
type:bug
Impaired feature or lacking behavior that is likely assumed
New Issue Checklist
Issue Description
Using the Parse.file constructor with some base64 strings causes the browser to hang indefinitely. I believe this is a case of a runaway regular expression, probably caused by the use of Regex constructors instead of Regex string literals.
Steps to reproduce
Create a new Parse.File with the base64 string here: https://github.com/chinapalace/base64-string/blob/main/README.md
ex.
new Parse.File({base64: <sample string above>})
Actual Outcome
The browser hangs indefinitely when I try to instantiate a ParseFile with certain base64 strings.
Expected Outcome
A ParseFile is instantiated successfully.
Environment
Chrome Version 105.0.5195.102 (Official Build) (arm64)
Client
The text was updated successfully, but these errors were encountered: