I’m having a hard time understanding the chosen implementation for a ‘fix’ for the file upload api endpoint. As can be understood from the Bubble Manual that it is WAY TOO RESTRICTIVE
Don’t allow file uploads to the file upload API endpoint
This setting disables the fileupload API endpoint, which can improve security by preventing direct access to that upload route. However, it does not disable all file uploads—it only blocks access via the fileupload endpoint, which certain plugins and workflows rely on.
How this affects file uploads:
If the checkbox is checked (i.e., the fileupload endpoint is disabled) file and image uploads will work as usual:
File and image uploads through the Bubble editor still work—this includes actions like setting images in the property editor or uploading directly to the File manager (if the collaborator has permission to edit the app’s data)
File and image uploads in runmode using Bubble elements like the File uploader and Picture uploader also continue to work (unless they are prohibited by conditions or privacy rules), with the following exceptions:
Picture uploader: if
limit image size before upload
is enabled, it will not work.Non-standard upload location: if you are using a non-s3 storage (e.g. Box), it will not work.
The fileupload endpoint remains disabled for all other access, including for plugins or custom calls—this may cause certain Bubble-built or third-party plugins to stop functioning if they depend on it.
If the checkbox is unchecked (i.e., the fileupload endpoint is enabled):
- There are no restrictions on file uploads—any part of the app or plugin can use the endpoint as usual.
Is there any technical reason at all it could not have been implemented in a more thoughtful approach? I see this as either you restrict via the checkbox and are then forced into
- Only using Bubble File and Picture Uploader Elements
- Not being able to restrict the limit of the image size before upload
- Using only Standard S3 upload location
- deal with the minefield of which Bubble-built or third-party plugins will stop functioning
It seems like it is NOT a REAL FIX, and more or less only fixes a security flaw for those apps that choose to deal with the 4 issues stated above.
WHY would it not have been possible to just simply adjust the way the fileupload endpoint works so as to require an AUTHORIZATION HEADER in the form of an ADMIN TOKEN if the checkbox for restricting file upload API endpoint is checked? Wouldn’t it make a lot more sense to say that the dozens of plugins available that use this endpoint will continue to function so long as the plugin developer updates the plugin so as to use an Admin Token in an Authorization header, which will actually deliver a REAL FIX so that users can restrict the unauthorized usage of the API endpoint?
I just do not understand how this is considered a fix to a security flaw in its current state.
Are all 99 of the plugins found using search term ‘upload’ now obsolete if the app owner chooses to restrict the access? My thought is yes, they are. So wouldn’t it have been wiser to say all 99 of those plugins can still be used, and the security flaw can be fixed, if the plugins are updated to included an Authorization Header?
I’m not really good at prompting ChatGPT to explain to me security issues, so maybe somebody with more experience in that could help. @georgecollier any insights on why the Authorization Header wouldn’t not work?