Bug 153571 - Failure installing a Python-based OXT with a space in the file name - part 2
Summary: Failure installing a Python-based OXT with a space in the file name - part 2
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium normal
Assignee: Mike Kaganski
URL:
Whiteboard: target:7.6.0
Keywords:
Depends on:
Blocks:
 
Reported: 2023-02-12 20:12 UTC by Mike Kaganski
Modified: 2023-02-12 23:56 UTC (History)
0 users

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 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.