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

disallow corsOrigins "*" #5496

Merged
merged 1 commit into from
Oct 29, 2024
Merged

disallow corsOrigins "*" #5496

merged 1 commit into from
Oct 29, 2024

Conversation

mifi
Copy link
Contributor

@mifi mifi commented Oct 28, 2024

Copy link
Contributor

Diff output files
diff --git a/packages/@uppy/companion/lib/config/companion.js b/packages/@uppy/companion/lib/config/companion.js
index ee2dae0..542f378 100644
--- a/packages/@uppy/companion/lib/config/companion.js
+++ b/packages/@uppy/companion/lib/config/companion.js
@@ -110,6 +110,9 @@ const validateConfig = (companionOptions) => {
   if (companionOptions.corsOrigins == null) {
     throw new TypeError("Option corsOrigins is required. To disable security, pass true");
   }
+  if (companionOptions.corsOrigins === "*") {
+    throw new TypeError("Option corsOrigins cannot be \"*\". To disable security, pass true");
+  }
   if (
     periodicPingUrls != null && (!Array.isArray(periodicPingUrls)
       || periodicPingUrls.some((url2) =>

@mifi mifi merged commit ace9e00 into main Oct 29, 2024
20 checks passed
@mifi mifi deleted the disallow-corsOrigins-star branch October 29, 2024 10:17
@github-actions github-actions bot mentioned this pull request Oct 31, 2024
github-actions bot added a commit that referenced this pull request Oct 31, 2024
| Package                   | Version | Package                   | Version |
| ------------------------- | ------- | ------------------------- | ------- |
| @uppy/aws-s3              |   4.1.1 | @uppy/provider-views      |   4.0.2 |
| @uppy/box                 |   3.1.1 | @uppy/react               |   4.0.3 |
| @uppy/companion           |   5.1.3 | @uppy/react-native        |   0.6.1 |
| @uppy/companion-client    |   4.1.1 | @uppy/redux-dev-tools     |   4.0.1 |
| @uppy/core                |   4.2.3 | @uppy/screen-capture      |   4.1.1 |
| @uppy/dashboard           |   4.1.2 | @uppy/status-bar          |   4.0.4 |
| @uppy/drag-drop           |   4.0.4 | @uppy/store-default       |   4.1.1 |
| @uppy/dropbox             |   4.1.1 | @uppy/store-redux         |   4.0.1 |
| @uppy/facebook            |   4.1.1 | @uppy/svelte              |   4.1.1 |
| @uppy/file-input          |   4.0.3 | @uppy/thumbnail-generator |   4.0.1 |
| @uppy/form                |   4.0.1 | @uppy/transloadit         |   4.1.3 |
| @uppy/golden-retriever    |   4.0.1 | @uppy/tus                 |   4.1.3 |
| @uppy/google-drive        |   4.1.1 | @uppy/unsplash            |   4.1.1 |
| @uppy/google-photos       |   0.3.1 | @uppy/url                 |   4.1.1 |
| @uppy/image-editor        |   3.2.0 | @uppy/utils               |   6.0.4 |
| @uppy/informer            |   4.1.1 | @uppy/vue                 |   2.0.2 |
| @uppy/instagram           |   4.1.1 | @uppy/webcam              |   4.0.2 |
| @uppy/locales             |   4.2.1 | @uppy/xhr-upload          |   4.2.2 |
| @uppy/onedrive            |   4.1.1 | @uppy/zoom                |   3.1.1 |
| @uppy/progress-bar        |   4.0.1 | uppy                      |   4.6.0 |

- @uppy/xhr-upload: fix stale file references in events (Merlijn Vos / #5499)
- @uppy/image-editor: upgrade cropperjs (Merlijn Vos / #5497)
- @uppy/aws-s3,@uppy/box,@uppy/companion-client,@uppy/core,@uppy/dashboard,@uppy/drag-drop,@uppy/dropbox,@uppy/facebook,@uppy/file-input,@uppy/form,@uppy/golden-retriever,@uppy/google-drive,@uppy/google-photos,@uppy/image-editor,@uppy/informer,@uppy/instagram,@uppy/locales,@uppy/onedrive,@uppy/progress-bar,@uppy/provider-views,@uppy/react-native,@uppy/react,@uppy/redux-dev-tools,@uppy/screen-capture,@uppy/status-bar,@uppy/store-default,@uppy/store-redux,@uppy/svelte,@uppy/thumbnail-generator,@uppy/transloadit,@uppy/tus,@uppy/unsplash,@uppy/url,@uppy/utils,@uppy/vue,@uppy/webcam,@uppy/xhr-upload,@uppy/zoom: Fix links (Anthony Veaudry / #5492)
- docs,@uppy/companion: disallow corsOrigins "*" (Mikael Finstad / #5496)
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.

2 participants