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: remove base64 validation due to validation inefficiency #1543

Merged
merged 1 commit into from
Sep 12, 2022

Conversation

dblythy
Copy link
Member

@dblythy dblythy commented Sep 11, 2022

New Pull Request Checklist

Issue Description

RegExp validation of base64 can take a long time to resolve

Related issue: #1532

Approach

Removes client side base64 validation.

TODOs before merging

  • Add tests

Sorry, something went wrong.

@parse-github-assistant
Copy link

parse-github-assistant bot commented Sep 11, 2022

Thanks for opening this pull request!

  • 🎉 We are excited about your hands-on contribution!

@codecov
Copy link

codecov bot commented Sep 11, 2022

Codecov Report

Merging #1543 (2d93190) into alpha (89fd5ec) will decrease coverage by 0.00%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##            alpha    #1543      +/-   ##
==========================================
- Coverage   99.94%   99.94%   -0.01%     
==========================================
  Files          61       61              
  Lines        5961     5954       -7     
  Branches     1362     1359       -3     
==========================================
- Hits         5958     5951       -7     
  Misses          3        3              
Impacted Files Coverage Δ
src/ParseFile.js 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

Copy link
Member

@mtrezza mtrezza left a comment

Choose a reason for hiding this comment

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

Looks good!

@mtrezza
Copy link
Member

mtrezza commented Sep 11, 2022

@mtrezza mtrezza changed the title fix: remove base64 validation fix: remove base64 validation due to validation inefficiency Sep 11, 2022
@FransGH
Copy link

FransGH commented Sep 11, 2022

@mtrezza I've worked around the issue on the client side but yes, removing the regex would restore the original functionality and resolve the issue.

@mtrezza mtrezza merged commit 473949d into parse-community:alpha Sep 12, 2022
parseplatformorg pushed a commit that referenced this pull request Sep 12, 2022
# [3.5.0-alpha.2](3.5.0-alpha.1...3.5.0-alpha.2) (2022-09-12)

### Bug Fixes

* remove base64 validation due to validation inefficiency ([#1543](#1543)) ([473949d](473949d))
@parseplatformorg
Copy link
Contributor

🎉 This change has been released in version 3.5.0-alpha.2

@parseplatformorg parseplatformorg added the state:released-alpha Released as alpha version label Sep 12, 2022
@dblythy dblythy deleted the file-regex branch September 12, 2022 09:47
@mtrezza mtrezza linked an issue Oct 13, 2022 that may be closed by this pull request
4 tasks
parseplatformorg pushed a commit that referenced this pull request Oct 25, 2022
# [3.5.0-beta.1](3.4.4...3.5.0-beta.1) (2022-10-25)

### Bug Fixes

* `Parse.User.signUp()` does not pass context to Cloud Code  ([#1527](#1527)) ([53edcfd](53edcfd))
* `Schema.addField` does not correctly add value of type `Date` ([#1544](#1544)) ([15111f7](15111f7))
* creating a Parse.File with base64 string fails for some encodings ([#1517](#1517)) ([0439862](0439862))
* initialization fails in non-browser environment that doesn't support `indexedDB` ([#1569](#1569)) ([3560a5e](3560a5e))
* remove base64 validation due to validation inefficiency ([#1543](#1543)) ([473949d](473949d))

### Features

* add `json` option to `Parse.Query.each()` ([#1539](#1539)) ([89fd5ec](89fd5ec))
* add json option to query.each ([299fb0d](299fb0d))
* generate `Parse.Object.objectId` automatically when `allowCustomObjectId` is enabled and no `objectId` is passed ([#1540](#1540)) ([68f3ff5](68f3ff5))
* localDatastore support for unsorted distance queries ([#1570](#1570)) ([ea3e75f](ea3e75f))
@parseplatformorg
Copy link
Contributor

🎉 This change has been released in version 3.5.0-beta.1

@parseplatformorg parseplatformorg added the state:released-beta Released as beta version label Oct 25, 2022
parseplatformorg pushed a commit that referenced this pull request Nov 1, 2022
# [3.5.0](3.4.4...3.5.0) (2022-11-01)

### Bug Fixes

* `Parse.User.signUp()` does not pass context to Cloud Code  ([#1527](#1527)) ([53edcfd](53edcfd))
* `Schema.addField` does not correctly add value of type `Date` ([#1544](#1544)) ([15111f7](15111f7))
* creating a Parse.File with base64 string fails for some encodings ([#1517](#1517)) ([0439862](0439862))
* initialization fails in non-browser environment that doesn't support `indexedDB` ([#1569](#1569)) ([3560a5e](3560a5e))
* remove base64 validation due to validation inefficiency ([#1543](#1543)) ([473949d](473949d))

### Features

* add `json` option to `Parse.Query.each()` ([#1539](#1539)) ([89fd5ec](89fd5ec))
* add json option to query.each ([299fb0d](299fb0d))
* generate `Parse.Object.objectId` automatically when `allowCustomObjectId` is enabled and no `objectId` is passed ([#1540](#1540)) ([68f3ff5](68f3ff5))
* localDatastore support for unsorted distance queries ([#1570](#1570)) ([ea3e75f](ea3e75f))
@parseplatformorg
Copy link
Contributor

🎉 This change has been released in version 3.5.0

@parseplatformorg parseplatformorg added the state:released Released as stable version label Nov 1, 2022
mtrezza pushed a commit that referenced this pull request Nov 3, 2022
* `Parse.User.signUp()` does not pass context to Cloud Code  ([#1527](#1527)) ([53edcfd](53edcfd))
* `Schema.addField` does not correctly add value of type `Date` ([#1544](#1544)) ([15111f7](15111f7))
* creating a Parse.File with base64 string fails for some encodings ([#1517](#1517)) ([0439862](0439862))
* initialization fails in non-browser environment that doesn't support `indexedDB` ([#1569](#1569)) ([3560a5e](3560a5e))
* remove base64 validation due to validation inefficiency ([#1543](#1543)) ([473949d](473949d))

* add `json` option to `Parse.Query.each()` ([#1539](#1539)) ([89fd5ec](89fd5ec))
* add json option to query.each ([299fb0d](299fb0d))
* generate `Parse.Object.objectId` automatically when `allowCustomObjectId` is enabled and no `objectId` is passed ([#1540](#1540)) ([68f3ff5](68f3ff5))
* localDatastore support for unsorted distance queries ([#1570](#1570)) ([ea3e75f](ea3e75f))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
state:released Released as stable version state:released-alpha Released as alpha version state:released-beta Released as beta version
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cannot create a Parse.File without valid data URIs or base64 encoded data.
4 participants