Bug 153571

Summary: Failure installing a Python-based OXT with a space in the file name - part 2
Product: LibreOffice Reporter: Mike Kaganski <mikekaganski>
Component: LibreOfficeAssignee: Mike Kaganski <mikekaganski>
Status: RESOLVED FIXED    
Severity: normal    
Priority: medium    
Version: unspecified   
Hardware: All   
OS: All   
See Also: https://bugs.documentfoundation.org/show_bug.cgi?id=150982
Whiteboard: target:7.6.0
Crash report or crash signature: Regression By:

Description Mike Kaganski 2023-02-12 20:12:05 UTC
1. Download APSO v.1.3.2 from https://extensions.libreoffice.org/en/extensions/show/apso-alternative-script-organizer-for-python;
2. Rename the filename from 'apso.oxt' to, e.g., 'apso (2).oxt';
3. Try to install it (e.g., double-click the .oxt in the file manager to execute "soffice '/path/to/apso (2).oxt'").

=> installation would fail, with something like

> Failed to register package for
> vnd.sun.star.expand:$UNO_USER_PACKAGES_CACHE/uno_packages/lu265164xhtp8.tmp_/apso%2520(2).oxt/python/scripts

The code that fails to URL-decode the vnd.sun.star.expand:... payload prior to passing it to expandMacros is expandUri in scripting/source/pyprov/pythonscript.py (see bug 150982 comment 4).
Comment 1 Mike Kaganski 2023-02-12 20:19:56 UTC
https://gerrit.libreoffice.org/c/core/+/146840
Comment 2 Commit Notification 2023-02-12 23:56:02 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/12896c9ed652a239cb1fd05bbd9a32f040e3381f

tdf#153571: properly unquote (URL-decode) vnd.sun.star.expand payload

It will be available in 7.6.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.