Skip to content

FileUpload options for Server Config #6997

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
wants to merge 17 commits into from

Conversation

dblythy
Copy link
Member

@dblythy dblythy commented Nov 8, 2020

As discussed in #6995, this PR allows the following options for parse server:

fileUpload: {
  enabled: true, // Is true if files can be uploaded with Parse Server. Default is true.
  enabledForAnonymousUser: false, // Is true if file upload is enabled for Anonymous Users. Default is false.
  enabledForPublic: false // If true if file upload is enabled for anyone with access to the Parse Server file upload endpoint, regardless of user authentication. Default is false.
}

(thank you @mtrezza for the copy + paste)

This is a breaking change as by default, public file uploads will be rejected.

Properly closes #2137, and in relation to our discussion on the community forum.

@codecov
Copy link

codecov bot commented Nov 8, 2020

Codecov Report

Merging #6997 (937062c) into master (0031c5d) will decrease coverage by 0.01%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #6997      +/-   ##
==========================================
- Coverage   93.83%   93.82%   -0.02%     
==========================================
  Files         169      169              
  Lines       12402    12415      +13     
==========================================
+ Hits        11638    11648      +10     
- Misses        764      767       +3     
Impacted Files Coverage Δ
src/Options/index.js 100.00% <ø> (ø)
...dapters/Storage/Postgres/PostgresStorageAdapter.js 95.95% <100.00%> (+0.08%) ⬆️
src/Options/Definitions.js 100.00% <100.00%> (ø)
src/Routers/FilesRouter.js 88.00% <100.00%> (+0.93%) ⬆️
src/Adapters/Files/GridFSBucketAdapter.js 79.50% <0.00%> (-0.82%) ⬇️
src/Adapters/Storage/Mongo/MongoStorageAdapter.js 92.92% <0.00%> (-0.67%) ⬇️
src/RestWrite.js 93.82% <0.00%> (-0.17%) ⬇️
src/Controllers/SchemaController.js 97.11% <0.00%> (+0.19%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0031c5d...b27395f. Read the comment docs.

@mtrezza
Copy link
Member

mtrezza commented Dec 14, 2020

What are the open points in this PR?

@dblythy
Copy link
Member Author

dblythy commented Dec 14, 2020

I’ve got to resolve conflicts and fix failing tests, sorry.

snyk-bot and others added 15 commits December 14, 2020 21:42
* Update PostgresStorageAdapter.js

Start moving toward better, ES7 syntax.

* Update PostgresStorageAdapter.js

Fixing spaces 🤦‍♂️
* Update PostgresStorageAdapter.js

Improve `createClass` transaction:

* `await` makes it a more consistent sequence of queries
* `batch` is not needed there
* No need for an extra `.then` section

* Update PostgresStorageAdapter.js

Remove batch-dependent error code check, as it should happen automatically without batch result.

* Update PostgresStorageAdapter.js

Removing unused variable.
…-community#6990)

* Add `cloud` parameter to Docker command (parse-community#6988)

* Add note to run Image with Cloud Code feature.
@dblythy
Copy link
Member Author

dblythy commented Dec 14, 2020

I accidentally rebased from my branch which I use on my AWS servers and i'm not overly experienced with git, so I just created a new branch with the changes. Sorry!!

@dblythy dblythy deleted the FileSecurity branch October 2, 2021 03:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Security for file uploads
7 participants