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.79k stars 681 forks source link

Cannot paste from other sources #3928

Closed frankknarf closed 1 year ago

frankknarf commented 2 years ago

Describe the bug Cannot paste from other sources. Even when i copy the URL from the browser i can't paste it in a document, spreadsheet or presentation. (I can only paste if it is copied from the file itself so that is useless).

To Reproduce Steps to reproduce the behavior:

  1. open a document, spreadsheet or presentation.
  2. copy the URL from your browser for example.
  3. try to paste it in the document, spreadsheet or presentation using the recommended menthod. Eg. CTRL+V.

Expected behavior I expect that the copied URL is pasted in to the document, spreadsheet or presentation.

Actual behavior Nothing is pasted or when you copied within the file previously that is pasted.

Version Nextcloud 22.2.3 Collabora Online 4.2.3 Collabora Online - Built-in CODE Server 21.11.6

ALL platforms: I tested:

Desktop

Smartphone

Ezinnem commented 2 years ago

I can paste texts copied from the browser to writer files using COOLWSD 21.11.1.0 git hash: 4d625f5a.

@frankknarf, please can you test again using a more recent version?

frankknarf commented 2 years ago

I have now updated everything I could find. Collabora Online 5.0.1 Collabora Online - Built-in CODE Server 21.11.6

NextCloud 23.0.1 RC1

And i have still the same problem. I can copy and paste within the document. But i can't paste the url from the browser in a document e.g.

Llazcanoster commented 2 years ago

Hi all, same problem, cannot paste from outside Collabora

COOLWSD: 21.11.2.4 LOKit: Collabora Office 21.06.20.1 Ubuntu Server 20.04.4 LTS Nextcloud 23.0.3

This is the output head developers of Firefox:

XHR POST https://xxxxxx.com/cool/clipboard?WOPISrc=https://xxxxxx.com/nextcloud/index.php/apps/richdocuments/wopi/files/5687597_ocxjw9hicgve&ServerId=cd77ccf3&ViewId=0&Tag=390de40e44db5d1e

Scheme: https Host: xxxxxx.com Filename: /cool/clipboard

WOPISrc: https://xxxxxx.com/nextcloud/index.php/apps/richdocuments/wopi/files/5687597_ocxjw9hicgve ServerId: cd77ccf3 ViewId: 0 Tag: 390de40e44db5d1e

Dirección: xxx.xxx.xxx.xxx:443

Estado 400 Bad Request Versión HTTP/1.1 Transferido 1,29 KB (tamaño 0 B) Política de referencia no-referrer

HTTP/1.1 400 Bad Request Date: Wed, 30 Mar 2022 11:19:04 Server: COOLWSD HTTP Server 21.11.2.4 Strict-Transport-Security: max-age=15768000; includeSubDomains; preload Content-Length: 0 Connection: close

POST /cool/clipboard?WOPISrc=https%3A%2F%2F HTTP/1.1 Host: xxxxxx.com User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:98.0) Gecko/20100101 Firefox/98.0 Accept: / Accept-Language: es-ES,es;q=0.5 Accept-Encoding: gzip, deflate, br Content-Type: multipart/form-data; boundary=---------------------------2056929430972252333160773682 Content-Length: 247 Origin: https://xxxxxx.com DNT: 1 Sec-Fetch-Dest: empty Sec-Fetch-Mode: cors Sec-Fetch-Site: same-origin Connection: keep-alive Cookie: DOLUSERCOOKIE_boxfilter_task=all; theme_cookie=black-theme; opcachegui=true; DOLSESSID_a8d7bb5ee1939727701f4fd8abf1e808=kf6uue38bfmfm67ftfmuiou4qt; geopos=MzcuMzU4Nzk2OCwtNi4yMDYyNTkyLDI1MjYuNjgzNzE0MDcxODc4

dinosmm commented 2 years ago

I am having the same issue (I think).

I cannot paste text or images copied from another tab or program. However, I can paste screenshots taken with the Windows snipping tool - this is the only thing that seems to be pastable.

This is the case on Chrome, Edge and Firefox for me.

Ezinnem commented 2 years ago

This issue is not reproducible on my end.

Please can you share a screen recording showing the issue? That may be helpful in investigating the problem.

corincorvus commented 2 years ago

@Ezinnem Here is a Video. I everytime try Strg-V. https://www.youtube.com/watch?v=VNHlzPtduNY

Llazcanoster commented 2 years ago

Indirectly my problem has been solved, I can now copy and paste from outside Collabora.

I recently moved the Nextcloud instance from xx.ddns.net/nextcloud/index.php to new-xx.ddns.net/index.php.

And I have included only one change in apache2 -> sites-enabled -> nextcloud.conf, which is "Options -Indexes".

I leave below the file in case by comparison it can be of help to someone:

<IfModule mod_ssl.c>
<VirtualHost new-xxxx.ddns.net:443>
     ServerAdmin info@new -xxxx.com
     DocumentRoot /var/www/nextcloud/
     ServerName new-xxxx.ddns.net
     ServerAlias new-xxxx.ddns.net
     SSLEngine on
     SSLCertificateFile xxxxxx
     SSLCertificateKeyFile xxxxxxx
#########################################################################################
# Apache2 reverse proxy configuration for Collabora Online
# Internet <-- SSL --> Reverse Proxy <-- No SSL --> coolwsd
# Make sure that you enable the following Apache2 modules: proxy, proxy_wstunnel, and proxy_http.
# Create a virtual host for Collabora Online and include this configuration file.
#########################################################################################
  Options -Indexes
  # Encoded slashes need to be allowed
  AllowEncodedSlashes NoDecode
  # keep the host
  ProxyPreserveHost On
  # static html, js, images, etc. served from coolwsd
  # browser is the client part of Collabora Online
  ProxyPass           /browser http://serverIP:port/browser retry=0
  ProxyPassReverse    /browser http://serverIP:port/browser
  # WOPI discovery URL
  ProxyPass           /hosting/discovery http://serverIP:port/hosting/discovery retry=0
  ProxyPassReverse    /hosting/discovery http://serverIP:port/hosting/discovery
  # Capabilities
  ProxyPass           /hosting/capabilities http://serverIP:port/hosting/capabilities retry=0
  ProxyPassReverse    /hosting/capabilities http://serverIP:port/hosting/capabilities
  # Main websocket
  ProxyPassMatch "/cool/(.*)/ws$" ws://serverIP:port/cool/$1/ws nocanon
  # Admin Console websocket
  ProxyPass   /cool/adminws ws://serverIP:port/cool/adminws
  # Download as, Fullscreen presentation and Image upload operations
  ProxyPass           /cool http://serverIP:port/cool
  ProxyPassReverse    /cool http://serverIP:port/cool
  # Compatibility with integrations that use the /lool/convert-to endpoint
#########################################################################################
#End reverse proxy Collabora
#########################################################################################
    <FilesMatch \.php$>
        SetHandler "proxy:unix:/var/run/php/php7.4-fpm.sock|fcgi://localhost"
    </FilesMatch>
</VirtualHost>
<Directory /var/www/nextcloud/>
     Options +FollowSymlinks
     AllowOverride All
     Require all granted
<IfModule mod_dav.c>
     Dav off
</IfModule>
     SetEnv HOME /var/www/nextcloud
     SetEnv HTTP_HOME /var/www/nextcloud
</Directory>
corincorvus commented 2 years ago

Okay i use nginx reverse proxy. Any idea what i need to add for testing?

Llazcanoster commented 2 years ago

Okay i use nginx reverse proxy. Any idea what i need to add for testing?

Nop, sorry, I have'nt experience with engine x But I'm sure someone will eventually figure it out

graphius commented 1 year ago

Confirm adding Options -Indexes solved copy paste issue with Apache on ubuntu server.