-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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: Parse Server option fileUpload.fileExtensions
does not work with an array of extensions
#8688
fix: Parse Server option fileUpload.fileExtensions
does not work with an array of extensions
#8688
Conversation
Thanks for opening this pull request! |
I will reformat the title to use the proper commit message syntax. |
Could you add a test case in which you add an array of extensions? You can just copy and modify the existing test. The test should fail without the fix you've already added and pass with the fix. |
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## alpha #8688 +/- ##
=======================================
Coverage 94.37% 94.37%
=======================================
Files 185 185
Lines 14761 14761
=======================================
Hits 13931 13931
Misses 830 830
☔ View full report in Codecov by Sentry. |
I added a test, but i think the other tests should be reviewed, for example the test case "works with array" doesn't provide any value in my opinion and its name should be definitely changed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me!
fileUpload.fileExtensions
does not work with an array of extensions
# [6.3.0-alpha.6](6.3.0-alpha.5...6.3.0-alpha.6) (2023-07-17) ### Bug Fixes * Parse Server option `fileUpload.fileExtensions` does not work with an array of extensions ([#8688](#8688)) ([6a4a00c](6a4a00c))
🎉 This change has been released in version 6.3.0-alpha.6 |
# [6.4.0-beta.1](6.3.0...6.4.0-beta.1) (2023-09-16) ### Bug Fixes * Parse Server option `fileUpload.fileExtensions` does not work with an array of extensions ([#8688](#8688)) ([6a4a00c](6a4a00c)) * Redis 4 does not reconnect after unhandled error ([#8706](#8706)) ([2b3d4e5](2b3d4e5)) * Remove config logging when launching Parse Server via CLI ([#8710](#8710)) ([ae68f0c](ae68f0c)) * Server does not start via CLI when `auth` option is set ([#8666](#8666)) ([4e2000b](4e2000b)) ### Features * Add conditional email verification via dynamic Parse Server options `verifyUserEmails`, `sendUserEmailVerification` that now accept functions ([#8425](#8425)) ([44acd6d](44acd6d)) * Add property `Parse.Server.version` to determine current version of Parse Server in Cloud Code ([#8670](#8670)) ([a9d376b](a9d376b)) * Add TOTP authentication adapter ([#8457](#8457)) ([cc079a4](cc079a4)) ### Performance Improvements * Improve performance of recursive pointer iterations ([#8741](#8741)) ([45a3ed0](45a3ed0))
🎉 This change has been released in version 6.4.0-beta.1 |
# [6.4.0-alpha.1](6.3.0...6.4.0-alpha.1) (2023-09-20) ### Bug Fixes * Parse Server option `fileUpload.fileExtensions` does not work with an array of extensions ([#8688](#8688)) ([6a4a00c](6a4a00c)) * Redis 4 does not reconnect after unhandled error ([#8706](#8706)) ([2b3d4e5](2b3d4e5)) * Remove config logging when launching Parse Server via CLI ([#8710](#8710)) ([ae68f0c](ae68f0c)) * Server does not start via CLI when `auth` option is set ([#8666](#8666)) ([4e2000b](4e2000b)) ### Features * Add conditional email verification via dynamic Parse Server options `verifyUserEmails`, `sendUserEmailVerification` that now accept functions ([#8425](#8425)) ([44acd6d](44acd6d)) * Add context to Cloud Code Triggers `beforeLogin` and `afterLogin` ([#8724](#8724)) ([a9c34ef](a9c34ef)) * Add property `Parse.Server.version` to determine current version of Parse Server in Cloud Code ([#8670](#8670)) ([a9d376b](a9d376b)) * Add TOTP authentication adapter ([#8457](#8457)) ([cc079a4](cc079a4)) ### Performance Improvements * Improve performance of recursive pointer iterations ([#8741](#8741)) ([45a3ed0](45a3ed0))
🎉 This change has been released in version 6.4.0-alpha.1 |
# [6.4.0](6.3.1...6.4.0) (2023-11-16) ### Bug Fixes * Parse Server option `fileUpload.fileExtensions` does not work with an array of extensions ([#8688](#8688)) ([6a4a00c](6a4a00c)) * Redis 4 does not reconnect after unhandled error ([#8706](#8706)) ([2b3d4e5](2b3d4e5)) * Remove config logging when launching Parse Server via CLI ([#8710](#8710)) ([ae68f0c](ae68f0c)) * Server does not start via CLI when `auth` option is set ([#8666](#8666)) ([4e2000b](4e2000b)) ### Features * Add conditional email verification via dynamic Parse Server options `verifyUserEmails`, `sendUserEmailVerification` that now accept functions ([#8425](#8425)) ([44acd6d](44acd6d)) * Add property `Parse.Server.version` to determine current version of Parse Server in Cloud Code ([#8670](#8670)) ([a9d376b](a9d376b)) * Add TOTP authentication adapter ([#8457](#8457)) ([cc079a4](cc079a4)) ### Performance Improvements * Improve performance of recursive pointer iterations ([#8741](#8741)) ([45a3ed0](45a3ed0))
🎉 This change has been released in version 6.4.0 |
Testing uploaded file extension against every pattern provided in file upload config extensions.
Pull Request
Issue
Closes: #8687
Approach
Run regexp test for every pattern in the fileExtensions array.