Skip to content

Conversation

@PrasadhNanjundan05
Copy link
Contributor

No description provided.

"""
self.action = 'Add file content'
url_encoded = urlencode({'uri': file_uri})
self.path = "{}/file?{}".format(self.api_path, url_encoded)
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this API should be deprecated, and we should use a real upload API with multipart content. This method may pose serious problem with bianry content.

Copy link
Contributor Author

@PrasadhNanjundan05 PrasadhNanjundan05 May 16, 2025

Choose a reason for hiding this comment

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

This API is used in WF file editor, BPM editor .. since those are from editor, I guess we cannot use mulipart content. probably we can limit the content size, sanitize the input path and other security checks

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Probably I guess we should restrict this kind of API to be only allowed to call only from our UI. not directly, just thinking out loud

Copy link
Contributor

Choose a reason for hiding this comment

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

What I mean, is we are going to propose a add_file api, the idea is to do it correctly. The fact that UI is using this buggy API is another problem.

Copy link
Contributor

Choose a reason for hiding this comment

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

Note:
I am note sure for UI.
Every people on UI should know that you upload things with multi part, so having a 100% in house way to upload things seems to be more a problem than a solution.

I think UI libraries should as default be compatible with multi part upload.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@Vignaudo I created a ticket to address this in the next release - https://jiras.ubiqube.com/browse/MSA-14797

@PrasadhNanjundan05 PrasadhNanjundan05 merged commit e0d5c18 into master May 26, 2025
@PrasadhNanjundan05 PrasadhNanjundan05 deleted the 3.2.1/CCLA-848 branch May 26, 2025 09:41
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.

4 participants