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)
|
||||
editorURL := getCollaboraEditorURL(collaboraURL)
|
||||
|
||||
// WOPISrc is passed unencoded in the query parameter
|
||||
collaboraFullURL := fmt.Sprintf("%s?WOPISrc=%s", editorURL, wopiSrc)
|
||||
// URL-encode the WOPISrc for use in the query parameter (Collabora expects this)
|
||||
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
|
||||
// No access_token needed in body since it's in WOPISrc
|
||||
|
||||
Reference in New Issue
Block a user