Bug 146460 - webdav: website fails to load from open file dialog
Summary: webdav: website fails to load from open file dialog
Status: RESOLVED NOTOURBUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
7.3.0.0 alpha1+
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:7.4.0 target:7.3.4 target:7.3.3
Keywords: bisected, regression
Depends on:
Blocks: WebDAV
  Show dependency treegraph
 
Reported: 2021-12-28 20:17 UTC by Xisco Faulí
Modified: 2024-10-15 03:52 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Xisco Faulí 2021-12-28 20:17:44 UTC
Steps to reproduce:
1. Open LibreOffice
2. Open File
3. Try to open http://www.tsetmc.com/Loader.aspx?ParTree=15

-> Error reading data from the Internet.
Server error message: . is displayed and the page is not loaded.
it works if LibreOffice is executed from command line with instdir/program/soffice http://www.tsetmc.com/Loader.aspx?ParTree=15

Reproduced in

Version: 7.3.0.0.beta1+ / LibreOffice Community
Build ID: 86f539a23b08d0cc9e5e9566ac31380e373be13f
CPU threads: 4; OS: Linux 5.10; UI render: default; VCL: x11
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded
Comment 1 Xisco Faulí 2021-12-28 20:21:03 UTC
In the bibisect-linux64-7.3 repository this started to happen after 

author	Michael Stahl <michael.stahl@allotropia.de>	2021-10-11 12:21:14 +0200
committer	Michael Stahl <michael.stahl@allotropia.de>	2021-11-23 20:08:55 +0100
commit bdef11f5337ecc87556a92693f6b7b5e200eb29e (patch)
tree 3c8c1f20cda45c11368ab6ea5c13c3cb488969ef
parent c2a581ffc1f4e3888c5c243932b71c3d96e8ba8f (diff)
configure: default to --with-webdav=curl
Comment 2 Stéphane Guillou (stragu) 2021-12-29 15:08:31 UTC
Xisco, where do you put the URL to open it? Do you use "open remote file" at all?
I can't see where to use that link in:

Version: 7.3.0.0.beta1 / LibreOffice Community
Build ID: 436f14c25ec1847646b953cf13d0db4f7ca3be57
CPU threads: 8; OS: Linux 5.4; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded

However, I _do_ get the error when I run: 

libreofficedev7.3 http://www.tsetmc.com/Loader.aspx?ParTree=15
Comment 3 Michael Stahl (allotropia) 2022-01-13 18:05:57 UTC
uh how did you find this webserver?

with neon, it:
* replies to OPTIONS with 404
* replies to HEAD with 404
* replies to GET with "Range: bytes=0-0" with 200 and a 1.3 MiB body

with curl:
* replies to OPTIONS with 403
* replies to HEAD with 403
* then we don't continue to GET 0 bytes because that only happens for 404, 405 and 501
* but if i change it to GET 0 bytes after 403 the result is still 403

... it turns out the problem is this header:

User-Agent: LibreOffice 7.4.0.0 curl/7.79.1 NSS/3.73\r\n

if i remove the string "curl" from the header it works.

this is ridiculous.
Comment 4 Commit Notification 2022-04-20 13:48:44 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/8d9c56e8f42428fd6695942c673bffb985d22ad5

tdf#146460 tdf#148429 ucb: webdav-curl: censor "curl" in UserAgent

It will be available in 7.4.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 5 Commit Notification 2022-04-21 12:16:43 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-7-3":

https://git.libreoffice.org/core/commit/3fe6a03426a86ec6b18a9b712588619f19a72897

tdf#146460 tdf#148429 ucb: webdav-curl: censor "curl" in UserAgent

It will be available in 7.3.4.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 6 Commit Notification 2022-04-26 08:41:41 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-7-3-3":

https://git.libreoffice.org/core/commit/6147f454d5827dd60a926c9ee504a61d4f0cd3e4

tdf#146460 tdf#148429 ucb: webdav-curl: censor "curl" in UserAgent

It will be available in 7.3.3.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 7 Rizwan Khan 2024-10-10 07:38:46 UTC
We also facing the same issue with our website (https://newssnapz.com). please let us know how to fix it. Thanks
Comment 8 Humuslk 2024-10-15 03:52:57 UTC
The same issue is with https://www.thenewsinsides.com. Please help me to figure it out. Thanks