Issues

Select view

Select search mode

 
31 of 31

remote component method hangs trying to parse upload for soap signature

Fixed

Description

When we submit a form on cfc page, it takes a long time compared to cfm page.

To test here is the file:

  1. Create uploadFile.cfm page with following content

<html> <body> <input type="file" name="file1" id="file1" /> <br /> <button onclick="file1Upload()"> Upload to cfm page </button> <button onclick="file2Upload()"> Upload to cfc page </button> <script> function file1Upload() { let field = document.getElementById("file1").files[0]; let formData = new FormData(); formData.append("file", field); fetch('/uploadAction.cfm', {method: "POST", body: formData}); } function file2Upload() { let field = document.getElementById("file1").files[0]; let formData = new FormData(); formData.append("file", field); fetch('/uploadAction.cfc?method=uploadFile', {method: "POST", body: formData}); } </script> </body> </html>
  1. Create uploadAction.cfm page with no content

  2. Create uploadAction.cfc page with following content

<cfcomponent displayname="uploadAction" output="false"> <cffunction name="uploadFile" access="remote"> <cfreturn {"status": "done"} /> </cffunction> </cfcomponent>

Now upload 10 MB pdf file, For me it takes 119ms for cfm page, and cfc calls times out.

Environment

None

Attachments

2
  • 23 Jul 2024, 04:05 pm
  • 23 Jul 2024, 03:58 pm

Details

Assignee

Reporter

Priority

Labels

Fix versions

New Issue warning screen

Before you create a new Issue, please post to the mailing list first https://dev.lucee.org

Once the issue has been verified, one of the Lucee team will ask you to file an issue

Sprint

Affects versions

Created 14 June 2024 at 11:56
Updated 12 March 2025 at 13:07
Resolved 26 August 2024 at 08:05

Activity

Show:

Pothys - MitrahSoft26 August 2024 at 08:04

I have checked this ticket with Lucee version 6.1.1.67. When I submit a form on the CFC page, it no longer takes a long time and does not throw an error

Michael Offner23 August 2024 at 14:36

can you please give this a try

Zac Spitzer25 July 2024 at 09:37
Edited

added POC mime type sniffing for text, but SOAP should be an exact mimetype right? what’s more, this can still be a problem with a wrong mime type? well, xml actually…?

https://github.com/lucee/Lucee/pull/2405

Zac Spitzer23 July 2024 at 16:05

here’s the repo

Zac Spitzer23 July 2024 at 15:58
Edited

seems to be hanging trying to parse the upload, in the isSoap check, searching the uploaded input for

return StringUtil.indexOfIgnoreCase(input, ":Envelope>") != -1;

such parsing should only happen for text mime types? i.e. text/xml and application/soap+xml tho i’m not sure about soap uploads TBH

Flag notifications