Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Save As on a shared file creates new document under owner folders #177

Closed
saltini opened this issue Feb 22, 2018 · 8 comments
Closed

Save As on a shared file creates new document under owner folders #177

saltini opened this issue Feb 22, 2018 · 8 comments
Labels
bug Something isn't working

Comments

@saltini
Copy link

saltini commented Feb 22, 2018

Steps to reproduce

1.Create a file as user A
2.Share it with user B allowing edits
3.As user B open shared file and "Save As" a new filename (specifying no path)
4.The new file is created relative to Owner path and not editor's one, if the path is not also shared this means User B cannot find the file anywhere in NextCloud

Expected behaviour

For files shared "directly" (not because they're in a shared folder) either I'd expect that :

  1. the "save as" feature is disabled
    or
  2. if the path in which the "saved as" file is supposed to be stored is not also shared with the editor the save as operation fails
    or
  3. if the path in which the "saved as" file is supposed to be stored is not also shared with the editor the saving occours in an editor's folder and not in an owner's one

Actual behaviour

The new file is created relative to Owner path and not editor's one, if the path is not also shared this means User B cannot find the file anywhere in NextCloud.
Also this means the editor can in fact write in a path in which he hasn't any write permission granted

Server configuration detail

Operating system: Linux 3.16.38-xen #1 SMP Sat Oct 22 00:13:20 CEST 2016 x86_64

Webserver: Apache/2.4.20 (Unix) OpenSSL/1.0.2h PHP/5.6.23 (apache2handler)

Database: mysql 10.0.26

PHP version: 5.6.23
Modules loaded: Core, date, ereg, libxml, pcre, fileinfo, filter, hash, SPL, json, mcrypt, session, bz2, posix, Reflection, standard, SimpleXML, sockets, imap, sysvmsg, sysvsem, sysvshm, xml, xmlwriter, mysqlnd, apache2handler, bcmath, openssl, calendar, ctype, curl, dba, dom, enchant, mbstring, ftp, gd, gettext, gmp, iconv, intl, ldap, exif, mysql, mysqli, odbc, zlib, PDO, pdo_mysql, pdo_sqlite, PDO_ODBC, pspell, shmop, snmp, soap, sqlite3, tokenizer, wddx, xmlreader, xsl, zip, Phar, redis, Zend OPcache

Nextcloud version: 12.0.5 - 12.0.5.3

@thebearon thebearon added the bug Something isn't working label Apr 6, 2018
@thebearon
Copy link
Collaborator

Confirmed.

@nickvsh
Copy link

nickvsh commented May 16, 2018

The same in Nextcloud version: 13.0.2.1

@ChristNeeskens
Copy link

Is there any info on if and/or when this bug is being put on the roadmap?

@erniehh
Copy link

erniehh commented Jun 13, 2018

@ChristNeeskens there seems to exist a Patch, look at commit 4b57b6a26775f2be08a6800c450243cc9a94c073

I hand-patched my app and it is working as expected now.

@ChristNeeskens
Copy link

Perfect, thanks! I'll plan on installing the patch .

@nickvsh
Copy link

nickvsh commented Jun 13, 2018

Hi.
Nextcloud version: 13.0.2.1
Collabora version: 2.0.8

After applying the patch :

  • "save as" -> new file was created in the editor's directory.
  • but collabora can't automatically open that file after saving with error "Well, this is embarrassing, we cannot connect to your document. Please try again." and logs below

Jun 13 16:54:53 cloud loolwsd: wsd-05253-05305 13:54:53.200020 [ docbroker_005 ] ERR Cannot get file info from WOPI storage uri [http://cloud.pzu.com.ua/index.php/apps/richdocuments/wopi/files/32852_ocls26clqtqp?access_token=eqh1B64bvlh5mYhHuZ5GkGE4qzmd7wR9&access_token_ttl=&permission=edit]. Error: SSL Exception: error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol| wsd/Storage.cpp:529 Jun 13 16:54:53 cloud loolwsd: wsd-05253-05305 13:54:53.200274 [ docbroker_005 ] ERR Failed to add session to [/index.php/apps/richdocuments/wopi/files/32852_ocls26clqtqp] with URI [http://cloud.pzu.com.ua/index.php/apps/richdocuments/wopi/files/32852_ocls26clqtqp?access_token=eqh1B64bvlh5mYhHuZ5GkGE4qzmd7wR9&access_token_ttl=&permission=edit]: SSL Exception| wsd/DocumentBroker.cpp:1000 Jun 13 16:54:53 cloud loolwsd: wsd-05253-05305 13:54:53.200380 [ docbroker_005 ] ERR Error while loading : SSL Exception| wsd/LOOLWSD.cpp:2370 Jun 13 16:54:53 cloud loolwsd: wsd-05253-05305 13:54:53.262886 [ docbroker_005 ] WRN Child session [0008] not found to forward message: load url=http://cloud.pzu.com.ua/index.php/apps/richdocuments/wopi/files/32852_ocls26clqtqp?access_token=eqh1B64bvlh5mYhHuZ5GkGE4qzmd7wR9&access_token_ttl=&permission=edit readonly=0 lang=en| wsd/DocumentBroker.cpp:1482 Jun 13 16:54:54 cloud loolwsd: wsd-05253-05305 13:54:54.181132 [ docbroker_005 ] WRN Child session [0008] not found to forward message: mouse type=move x=6813 y=4821 count=1 buttons=0 modifier=0| wsd/DocumentBroker.cpp:1482 Jun 13 16:54:54 cloud loolwsd: wsd-05253-05305 13:54:54.201665 [ docbroker_005 ] ERR Invalid or unknown session [0008] to remove.| wsd/DocumentBroker.cpp:1067 Jun 13 16:54:54 cloud loolwsd: wsd-05253-05305 13:54:54.201759 [ docbroker_005 ] ERR No socket associated with WebSocketHandler 0x0x7f7b6c0157f8| ./net/WebSocketHandler.hpp:100 Jun 13 16:54:54 cloud loolwsd: wsd-05253-05254 13:54:54.202268 [ prisoner_poll ] WRN Waking up dead poll thread [docbroker_005], started: true, finished: true| ./net/Socket.hpp:512 Jun 13 16:54:54 cloud loolwsd: wsd-05253-05254 13:54:54.202296 [ prisoner_poll ] WRN Waking up dead poll thread [docbroker_005], started: true, finished: true| ./net/Socket.hpp:512 Jun 13 16:54:54 cloud loolwsd: wsd-05253-05254 13:54:54.202312 [ prisoner_poll ] WRN Prisoner connection disconnected but without valid socket.| wsd/LOOLWSD.cpp:1576 Jun 13 16:54:54 cloud loolwsd: wsd-05253-05254 13:54:54.202349 [ prisoner_poll ] WRN Waking up dead poll thread [docbroker_005], started: false, finished: true| ./net/Socket.hpp:512 Jun 13 16:54:54 cloud loolwsd: wsd-05253-05254 13:54:54.202363 [ prisoner_poll ] WRN Waking up dead poll thread [docbroker_005], started: false, finished: true| ./net/Socket.hpp:512

  • manual open of that new file from editor's document root was successful.

Thanks

@thebearon
Copy link
Collaborator

@nickvsh: what do you mean by

but collabora can't automatically open that file after saving

Is there an error right after saving the document under a different name?

@juliusknorr
Copy link
Member

Fixed with #199

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants