Bug 117607 - bugfix for commit:910ae80-'wsd: to filter clientAddress before POST action.'
Summary: bugfix for commit:910ae80-'wsd: to filter clientAddress before POST action.'
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice Online
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium normal
Assignee: safirdepo.iletisim
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-05-14 10:26 UTC by safirdepo.iletisim
Modified: 2018-05-29 09:11 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
Suggested Bugfix Patch (846 bytes, text/plain)
2018-05-14 10:26 UTC, safirdepo.iletisim
Details
new suggested patch file (781 bytes, patch)
2018-05-14 12:29 UTC, safirdepo.iletisim
Details

Note You need to log in before you can comment on or make changes to this bug.
Description safirdepo.iletisim 2018-05-14 10:26:06 UTC
Created attachment 142089 [details]
Suggested Bugfix Patch

The bug causes problem my libreoffice online as I told with below link. 

https://ask.libreoffice.org/en/question/154511/libreoffice-online-get-request-client-address-deny/

loolwsd.xml file contains net tag before post_allow tag. But in the code it does not exist as xml file content. It causes filter in the code unable to read xml file hosts. 

Suggested patch at attactment.
Comment 1 safirdepo.iletisim 2018-05-14 12:27:52 UTC
Comment on attachment 142089 [details]
Suggested Bugfix Patch

commit 9e7c555f5cbdd019b76850404b82d654a84add0f
Author: Safir Depo <safirdepo.iletisim@tubitak.gov.tr>
Date:   Mon May 14 15:26:38 2018 +0300

    bugfix for commit:910ae80-'wsd: to filter clientAddress before POST action.'

diff --git a/wsd/LOOLWSD.cpp b/wsd/LOOLWSD.cpp
index 7004cf7..4ffd8c9 100644
--- a/wsd/LOOLWSD.cpp
+++ b/wsd/LOOLWSD.cpp
@@ -1739,7 +1739,7 @@ public:
             // Parse the host allow settings.
             for (size_t i = 0; ; ++i)
             {
-                const std::string path = "post_allow.host[" + std::to_string(i) + "]";
+                const std::string path = "net.post_allow.host[" + std::to_string(i) + "]";
                 const auto host = app.config().getString(path, "");
                 if (!host.empty())
                 {
Comment 2 safirdepo.iletisim 2018-05-14 12:29:09 UTC
Created attachment 142090 [details]
new suggested patch file