diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2016-07-08 14:07:16 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2016-07-08 14:07:16 +0200 |
commit | 47bfc0d4e506f364d1cc03671a4f0fdf3cba9245 (patch) | |
tree | 30603fabf9a86b70875aa28e3bd34c207e276068 /flatpak | |
parent | 4e498d1af6d5980e4457e460d6dcb5dc41745146 (diff) |
Argue that passing arg as-is to gdbus is probably fine
Diffstat (limited to 'flatpak')
-rwxr-xr-x | flatpak/build.sh | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/flatpak/build.sh b/flatpak/build.sh index 09f4885..1d4216a 100755 --- a/flatpak/build.sh +++ b/flatpak/build.sh @@ -91,6 +91,22 @@ flatpak build --build-dir="${my_dir?}"/build \ cp -r "${my_dir?}"/inst/lib/libreoffice "${my_dir?}"/app/files/ mkdir "${my_dir?}"/app/files/bin +## Per "man gdbus" and <https://developer.gnome.org/glib/stable/ +## gvariant-text.html#gvariant-text-strings> (cf. +## <https://bugzilla.gnome.org/show_bug.cgi?id=768555#c1>, comment 1 to "'man +## gdbus': unclear what 'serialized GVariant' means for args to 'gdbus call'"), +## the argument to the below xdg-open must be UTF-8 encoded, must not have "..." +## or '...' as its outermost characters (as those should be interpreted by gdbus +## as---unnecessary---quoting), and must not contain backslashes (as those would +## need to be quoted as "\\"); for the first requirement, LO's +## ShellExec::execute (shell/source/unix/exec/shellexec.cxx) encodes the +## argument with osl_getThreadTextEncoding(), which these days hopefully is +## always UTF-8 on Linux (and, hoping that the argument is a valid URI, it +## should not contain any non-ASCII characters); for the latter two +## requirements, hope that the argument is a valid absolute URI, and so should +## not contain any double quotes or backslashes, nor should it contain single +## quotes as its first and last character (where the first character needs to be +## part of the URI scheme): cat <<\EOF > "${my_dir?}"/app/files/bin/xdg-open gdbus call --session --dest org.freedesktop.portal.Desktop \ --object-path /org/freedesktop/portal/desktop \ |