URL-encode WOPISrc in Collabora URL to ensure proper handling in query parameters
This commit is contained in:
BIN
go_cloud/api
BIN
go_cloud/api
Binary file not shown.
@@ -878,8 +878,11 @@ func collaboraProxyHandler(w http.ResponseWriter, r *http.Request, db *database.
|
|||||||
// Get the correct Collabora editor URL from discovery (includes version hash)
|
// Get the correct Collabora editor URL from discovery (includes version hash)
|
||||||
editorURL := getCollaboraEditorURL(collaboraURL)
|
editorURL := getCollaboraEditorURL(collaboraURL)
|
||||||
|
|
||||||
// WOPISrc is passed unencoded in the query parameter
|
// URL-encode the WOPISrc for use in the query parameter (Collabora expects this)
|
||||||
collaboraFullURL := fmt.Sprintf("%s?WOPISrc=%s", editorURL, wopiSrc)
|
encodedWopiSrc := url.QueryEscape(wopiSrc)
|
||||||
|
|
||||||
|
// Build the full Collabora URL with WOPISrc as query parameter
|
||||||
|
collaboraFullURL := fmt.Sprintf("%s?WOPISrc=%s", editorURL, encodedWopiSrc)
|
||||||
|
|
||||||
// Return HTML page with auto-submitting form
|
// Return HTML page with auto-submitting form
|
||||||
// No access_token needed in body since it's in WOPISrc
|
// No access_token needed in body since it's in WOPISrc
|
||||||
|
|||||||
Reference in New Issue
Block a user