Skip to content

Parse.File base64 validation causes runaway regular expression #1541

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

Closed
4 tasks done
justin-mclaren opened this issue Sep 8, 2022 · 2 comments
Closed
4 tasks done
Labels
state:duplicate Duplicate of already reported issue type:bug Impaired feature or lacking behavior that is likely assumed

Comments

@justin-mclaren
Copy link

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

  • Parse JS SDK version: 3.4.4
@parse-github-assistant
Copy link

Thanks for opening this issue!

  • 🚀 You can help us to fix this issue faster by opening a pull request with a failing test. See our Contribution Guide for how to make a pull request, or read our New Contributor's Guide if this is your first time contributing.

@mtrezza
Copy link
Member

mtrezza commented Sep 8, 2022

Closing as duplicate of #1532

@mtrezza mtrezza closed this as completed Sep 8, 2022
@mtrezza mtrezza added type:bug Impaired feature or lacking behavior that is likely assumed state:duplicate Duplicate of already reported issue labels Sep 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
state:duplicate Duplicate of already reported issue type:bug Impaired feature or lacking behavior that is likely assumed
Projects
None yet
Development

No branches or pull requests

2 participants