You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
13 is the length of embedded:app: — the code silently assumes that specific prefix.
Impact
embedded:deployment:forms/foo.html (forms stored in the deployment instead of the application) → substring(13) yields loyment:forms/foo.html → broken fetch, no form. The correct source for these is GET /task/{id}/deployed-form, for which an API function (get_task_deployed_form) already exists.
The application contextPath (returned by the form endpoints) is ignored, so embedded:app: forms of process applications with a non-root context also resolve incorrectly.
The same pattern existed in the start-form flow and is addressed by the fix suggested in #90; this issue covers the task-side occurrence.
Suggested fix
Replace the offset arithmetic with explicit prefix handling:
Summary
EmbeddedHtmlTaskFormresolves the embedded form path by blindly stripping the first 13 characters of the form key:13 is the length of
embedded:app:— the code silently assumes that specific prefix.Impact
embedded:deployment:forms/foo.html(forms stored in the deployment instead of the application) →substring(13)yieldsloyment:forms/foo.html→ broken fetch, no form. The correct source for these isGET /task/{id}/deployed-form, for which an API function (get_task_deployed_form) already exists.contextPath(returned by the form endpoints) is ignored, soembedded:app:forms of process applications with a non-root context also resolve incorrectly.The same pattern existed in the start-form flow and is addressed by the fix suggested in #90; this issue covers the task-side occurrence.
Suggested fix
Replace the offset arithmetic with explicit prefix handling:
(The
TaskFormdispatch already guaranteesformKey.startsWith("embedded:")at this point.)