cui/source/dialogs/AdditionsDialog.cxx |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit 348e0651cc5add15ac03b11dde08057cf33f9b16
Author:     Gabor Kelemen <kelem...@ubuntu.com>
AuthorDate: Tue Jan 11 23:37:43 2022 +0100
Commit:     Thorsten Behrens <thorsten.behr...@allotropia.de>
CommitDate: Wed Jan 12 02:39:50 2022 +0100

    tdf#146703 Fix URL encoding when querying extensions
    
    so that extension information files are properly downloaded such as:
    https://extensions.libreoffice.org/api/v0/Color Palette.json
    
    Change-Id: Ifb2688b1f09d91277b7d5fe065b0d0f8533310b0
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128306
    Tested-by: Jenkins
    Reviewed-by: Thorsten Behrens <thorsten.behr...@allotropia.de>

diff --git a/cui/source/dialogs/AdditionsDialog.cxx 
b/cui/source/dialogs/AdditionsDialog.cxx
index bef562ce5bd9..d5b58b5c8aba 100644
--- a/cui/source/dialogs/AdditionsDialog.cxx
+++ b/cui/source/dialogs/AdditionsDialog.cxx
@@ -80,7 +80,9 @@ std::string ucbGet(const OUString& rURL)
 {
     try
     {
-        auto const s = utl::UcbStreamHelper::CreateStream(rURL, 
StreamMode::STD_READ);
+        OUString sEncodedUrl = INetURLObject::encode(rURL, 
INetURLObject::PART_FPATH,
+                                                     
INetURLObject::EncodeMechanism::All);
+        auto const s = utl::UcbStreamHelper::CreateStream(sEncodedUrl, 
StreamMode::STD_READ);
         if (!s)
         {
             SAL_WARN("cui.dialogs", "CreateStream <" << rURL << "> failed");

Reply via email to