CollaboraOnline / online

Collabora Online is a collaborative online office suite based on LibreOffice technology. This is also the source for the Collabora Office apps for iOS and Android.
https://collaboraonline.com
Other
1.88k stars 710 forks source link

Cannot paste between two servers #9219

Closed vmiklos closed 5 months ago

vmiklos commented 5 months ago

Describe the Bug

Trying to copy content from one COOL server to an other COOL server seems to to work anymore.

Steps to Reproduce

  1. Go to one COOL server, open e.g. a new Writer document, select a word, copy.
  2. Paste (ctrl-v) in an empty Writer document on an other COOL server.

Expected Behavior

The word is pasted.

Actual Behavior

JS console logs this error:

Refused to connect to 'https://remotehost/cool/clipboard?WOPISrc=...' because it violates the following Content Security Policy directive: "connect-src 'self' https://www.zotero.org https://api.zotero.org wss://localhost https://localhost"

Additional Context

Likely there are two problems here:

  1. The JS can't get the remote clipboard anymore, this used to work, needs bisecting probably, etc.
  2. The JS code has some fallback to at least upload the HTML content to the server, and this fallback code is more or less missing on the server side.

As a start, I'm looking at 2) to have something working, but 1) would be also ideal to fix after that.

vmiklos commented 5 months ago

https://github.com/CollaboraOnline/online/pull/9221 is meant to fix this.

vmiklos commented 5 months ago

The HTML-based copy is now restored.