otetard / ownpad

Ownpad is a Nextcloud application that allows to create and open Etherpad and Ethercalc documents.
GNU Affero General Public License v3.0
57 stars 24 forks source link

Ethercalc opens all sheets named as "foobar" #45

Closed poVoq closed 6 years ago

poVoq commented 6 years ago

Edit: see below, seems to be a general issue that it always links to a sheet called "foobar"

I guess this is related to this: https://github.com/otetard/ownpad/issues/28

as the multisheet displays fine (despite having that %3D prefix), but when I try to export it as an Excel file it only links to =foobar.xlsx

It also happens when I open the url (with %3D) that Ownpad displays in a new browser tap outside of nextcloud and try to export the Excel file from there.

Strange is that it works with CSV and HTML files.

poVoq commented 6 years ago

Hmm, ok I seem to have had some sort of misconfiguration in my Ethercalc and now it works... however it still names the exported file foobar.xlsx for some reason.

poVoq commented 6 years ago

Actually... now I realized every new pad links to the foobar pad.

Is it possible that the version published in the Nextcloud app-store has some sort of bug?

kousu commented 6 years ago

I don't understand. Can you post more configuration, screenshots, sample .calc files?

poVoq commented 6 years ago

If I create any new sheet in Ownpad, it creates it and the link to it fine, but in reality Ethercalc is opening a multisheet called "=foobar".

I assume this is somehow related to the fact that while the link in the calc file is the correct one with "=randomletters", the one shown in the browsers addressbar and also the link shown by Ownpad is still "%3Drandomletters".

I am using the latest version of Ownpad from the nextcloud app-store.

otetard commented 6 years ago

Sorry I don’t really understand your issue and I can’t reproduce it in my environment.

Are you using the latest Ethercalc version available? Are you sure that your Ethercalc instance is correctly configured? What is the raw content of your .calc file created by Ownpad?

Olivier;

poVoq commented 6 years ago

The raw content of the .calc file points to a correct new sheet, but internally Ethercalc always opens a different one called "/=foobar". I guess this is some sort of Ethercalc issue, but is there a reason why Ownpad doesn't use the actual URL mentioned in the .calc file but rather this "%3Drandomletters" instead?

otetard commented 6 years ago

is there a reason why Ownpad doesn't use the actual URL mentioned in the .calc file but rather this "%3Drandomletters" instead?

It’s a way to avoid collisions as different users could create to different documents using the same name (or alternatively, a user can create two documents with the same name in two separate directories).

I close this issue as it seems to be related to Ethercalc rather than Ownpad.

Olivier;

poVoq commented 6 years ago

Hmm, ok could it be that ownpad somehow references an iframe from the original server? Because the Ethercalc developers seem at a loss what could be causing it.

I am asking because I noticed this strage behaviour after playing around with my cross site scripting settings a bit more in order to make Ownpad work in Firefox. Now I have the following behaviour:

Ethercalc works perfectly as a standalone both in Chrome and Firefox (there I previously I had issues with the multisheet support, which is basically an iFrame by itself) in single sheet and multi-sheet config.

It also opens up fine in Ownpad, both in Firefox and Chrome, BUT when I click on the link in Ownpad to open the sheet standalone I get the following error: Load denied by X-Frame-Options: https://mydomain.com/ does not permit framing by https://ethercalc.mydomain.com/calc/%3DqZVxBai4vSH4SUCW. (mydomain.com is a shared host on which Nextcloud runs, ethercalc.mydomain.com points to a seperate VPS with Ethercalc behind a Nginx reverseproxy)

Which is quite odd, because one would expect the stand-alone link having nothing to do with the X-Frame-Option settings of the Nextcloud server. Does it try to do some sort of circular triple iframing?

poVoq commented 5 years ago

Apparently this works now, at least with the latest version of Ethercalc.