[Pkg-xfce-commits] [Git][xfce-team/desktop/xfce4-settings][upstream/latest] New upstream version 4.16.5.
Unit 193 (@unit193)
gitlab at salsa.debian.org
Tue Nov 15 04:19:22 GMT 2022
Unit 193 pushed to branch upstream/latest at xfce / desktop / xfce4-settings
Commits:
c8f765a0 by Unit 193 at 2022-11-14T19:49:31-05:00
New upstream version 4.16.5.
- - - - -
5 changed files:
- ChangeLog
- NEWS
- configure
- configure.ac
- dialogs/mime-settings/xfce-mime-helper.c
Changes:
=====================================
ChangeLog
=====================================
@@ -1,3 +1,32 @@
+commit f1cb5bdafc6b9c71c541de267cc84a8c2ac32049
+Author: Gaël Bonithon <gael at xfce.org>
+Date: Sat Nov 12 22:27:36 2022 +0100
+
+ mime-settings: Properly quote command parameters
+
+ Fixes: #390
+ MR: !85
+
+commit f7707d8b835c3611c647c0da61cd9488e7af2bb7
+Author: Alexander Schwinn <alexxcons at xfce.org>
+Date: Sat Nov 12 22:15:02 2022 +0100
+
+ Revert "Escape characters which do not belong into an URI/URL (Issue #390)"
+
+ This reverts commit 55e3c5fb667e96ad1412cf249879262b369d28d7.
+
+commit b532324ffa51ae9b8582df0a577b642163689943
+Author: Alexander Schwinn <alexxcons at xfce.org>
+Date: Mon Nov 7 21:30:07 2022 +0100
+
+ Back to development
+
+commit b9729c85de00a340d6b6e432fbcd293cf7dedfe1
+Author: Alexander Schwinn <alexxcons at xfce.org>
+Date: Mon Nov 7 21:27:41 2022 +0100
+
+ Updates for release
+
commit 55e3c5fb667e96ad1412cf249879262b369d28d7
Author: Alexander Schwinn <alexxcons at xfce.org>
Date: Mon Nov 7 09:56:31 2022 +0100
=====================================
NEWS
=====================================
@@ -1,3 +1,10 @@
+4.16.5 (2022-11-12)
+======
+- mime-settings: Properly quote command parameters
+- Revert "Escape characters which do not belong into an URI/URL (Issue
+#390)"
+
+
4.16.4 (2022-11-07)
======
- Escape characters which do not belong into an URI/URL (Issue #390)
=====================================
configure
=====================================
@@ -1,7 +1,7 @@
#! /bin/sh
-# From configure.ac 55e3c5fb.
+# From configure.ac f1cb5bda.
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.71 for xfce4-settings 4.16.4.
+# Generated by GNU Autoconf 2.71 for xfce4-settings 4.16.5.
#
# Report bugs to <https://bugzilla.xfce.org/>.
#
@@ -625,8 +625,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='xfce4-settings'
PACKAGE_TARNAME='xfce4-settings'
-PACKAGE_VERSION='4.16.4'
-PACKAGE_STRING='xfce4-settings 4.16.4'
+PACKAGE_VERSION='4.16.5'
+PACKAGE_STRING='xfce4-settings 4.16.5'
PACKAGE_BUGREPORT='https://bugzilla.xfce.org/'
PACKAGE_URL=''
@@ -1545,7 +1545,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures xfce4-settings 4.16.4 to adapt to many kinds of systems.
+\`configure' configures xfce4-settings 4.16.5 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1620,7 +1620,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of xfce4-settings 4.16.4:";;
+ short | recursive ) echo "Configuration of xfce4-settings 4.16.5:";;
esac
cat <<\_ACEOF
@@ -1784,7 +1784,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-xfce4-settings configure 4.16.4
+xfce4-settings configure 4.16.5
generated by GNU Autoconf 2.71
Copyright (C) 2021 Free Software Foundation, Inc.
@@ -2043,7 +2043,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by xfce4-settings $as_me 4.16.4, which was
+It was created by xfce4-settings $as_me 4.16.5, which was
generated by GNU Autoconf 2.71. Invocation command line was
$ $0$ac_configure_args_raw
@@ -3318,7 +3318,7 @@ fi
# Define the identity of the package.
PACKAGE='xfce4-settings'
- VERSION='4.16.4'
+ VERSION='4.16.5'
printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h
@@ -21955,7 +21955,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by xfce4-settings $as_me 4.16.4, which was
+This file was extended by xfce4-settings $as_me 4.16.5, which was
generated by GNU Autoconf 2.71. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -22023,7 +22023,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config='$ac_cs_config_escaped'
ac_cs_version="\\
-xfce4-settings config.status 4.16.4
+xfce4-settings config.status 4.16.5
configured by $0, generated by GNU Autoconf 2.71,
with options \\"\$ac_cs_config\\"
=====================================
configure.ac
=====================================
@@ -16,9 +16,9 @@ dnl *** Version information ***
dnl ***************************
m4_define([xfce4_settings_version_major], [4])
m4_define([xfce4_settings_version_minor], [16])
-m4_define([xfce4_settings_version_micro], [4])
+m4_define([xfce4_settings_version_micro], [5])
m4_define([xfce4_settings_version_nano], [])
-m4_define([xfce4_settings_version_build], [55e3c5fb])
+m4_define([xfce4_settings_version_build], [f1cb5bda])
m4_define([xfce4_settings_version_tag], []) # Leave empty for releases
m4_define([xfce4_settings_version], [xfce4_settings_version_major().xfce4_settings_version_minor().xfce4_settings_version_micro()ifelse(xfce4_settings_version_nano(), [], [], [.xfce4_settings_version_nano()])ifelse(xfce4_settings_version_tag(), [git], [xfce4_settings_version_tag()-xfce4_settings_version_build()], [xfce4_settings_version_tag()])])
@@ -42,7 +42,7 @@ AC_COPYRIGHT([Copyright (c) 2008-2019
AC_INIT([xfce4-settings], [xfce4_settings_version], [https://bugzilla.xfce.org/])
AC_PREREQ([2.60])
AC_CONFIG_MACRO_DIRS([m4])
-AC_REVISION([55e3c5fb])
+AC_REVISION([f1cb5bda])
dnl ***************************
dnl *** Initialize automake ***
=====================================
dialogs/mime-settings/xfce-mime-helper.c
=====================================
@@ -415,7 +415,7 @@ xfce_mime_helper_execute (XfceMimeHelper *helper,
gint status;
gint result;
gint pid;
- gchar *real_parameter = NULL;
+ const gchar *real_parameter = parameter;
// FIXME: startup-notification
@@ -427,43 +427,23 @@ xfce_mime_helper_execute (XfceMimeHelper *helper,
if (G_UNLIKELY (screen == NULL))
screen = gdk_screen_get_default ();
- if (parameter != NULL)
- {
- if (helper->category == XFCE_MIME_HELPER_WEBBROWSER || helper->category == XFCE_MIME_HELPER_FILEMANAGER)
- {
- /* escape characters which do not belong into an URI/URL */
- real_parameter = g_uri_escape_string (parameter, ":/?#[]@!$&'()*+,;=%", TRUE);
- }
- else if (g_str_has_prefix (real_parameter, "mailto:"))
- {
- /* strip the mailto part if needed */
- real_parameter = g_strdup (parameter + 7);
- }
- else
- {
- real_parameter = g_strdup (parameter);
- }
- }
+ /* strip the mailto part if needed */
+ if (real_parameter != NULL && g_str_has_prefix (real_parameter, "mailto:"))
+ real_parameter = parameter + 7;
/* determine the command set to use */
- if (exo_str_is_flag (real_parameter))
- {
- commands = helper->commands_with_flag;
- }
- else if (exo_str_is_empty (real_parameter))
- {
- commands = helper->commands;
- }
- else
- {
- commands = helper->commands_with_parameter;
- }
+ if (exo_str_is_flag (real_parameter)) {
+ commands = helper->commands_with_flag;
+ } else if (exo_str_is_empty (real_parameter)) {
+ commands = helper->commands;
+ } else {
+ commands = helper->commands_with_parameter;
+ }
/* verify that we have atleast one command */
if (G_UNLIKELY (*commands == NULL))
{
g_set_error (error, G_SPAWN_ERROR, G_SPAWN_ERROR_INVAL, _("No command specified"));
- g_free (real_parameter);
return FALSE;
}
@@ -473,8 +453,43 @@ xfce_mime_helper_execute (XfceMimeHelper *helper,
/* reset the error */
g_clear_error (&err);
+ /* prepare the command */
+ if (exo_str_is_empty (real_parameter))
+ command = g_strdup (commands[n]);
+ else
+ {
+ /* split command into "quoted"/unquoted parts */
+ gchar **cmd_parts = g_regex_split_simple ("(\"[^\"]*\")", commands[n], 0, 0);
+
+ /* walk the part array */
+ for (gchar **cmd_part = cmd_parts; *cmd_part != NULL; cmd_part++)
+ {
+ /* quoted part: unquote it, replace %s and re-quote it properly */
+ if (g_str_has_prefix (*cmd_part, "\"") && g_str_has_suffix (*cmd_part, "\""))
+ {
+ gchar *unquoted = g_strndup (*cmd_part + 1, strlen (*cmd_part) - 2);
+ gchar *filled = exo_str_replace (unquoted, "%s", real_parameter);
+ gchar *quoted = g_shell_quote (filled);
+ g_free (filled);
+ g_free (unquoted);
+ g_free (*cmd_part);
+ *cmd_part = quoted;
+ }
+ /* unquoted part: just replace %s */
+ else
+ {
+ gchar *filled = exo_str_replace (*cmd_part, "%s", real_parameter);
+ g_free (*cmd_part);
+ *cmd_part = filled;
+ }
+ }
+
+ /* join parts to reconstitute the command, filled and quoted */
+ command = g_strjoinv (NULL, cmd_parts);
+ g_strfreev (cmd_parts);
+ }
+
/* parse the command */
- command = !exo_str_is_empty (real_parameter) ? exo_str_replace (commands[n], "%s", real_parameter) : g_strdup (commands[n]);
succeed = g_shell_parse_argv (command, NULL, &argv, &err);
g_free (command);
@@ -553,7 +568,6 @@ xfce_mime_helper_execute (XfceMimeHelper *helper,
if (G_UNLIKELY (!succeed))
g_propagate_error (error, err);
- g_free (real_parameter);
return succeed;
}
View it on GitLab: https://salsa.debian.org/xfce-team/desktop/xfce4-settings/-/commit/c8f765a0257781c693e963d2f1c8a685e5c2dd76
--
View it on GitLab: https://salsa.debian.org/xfce-team/desktop/xfce4-settings/-/commit/c8f765a0257781c693e963d2f1c8a685e5c2dd76
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-xfce-commits/attachments/20221115/3080d05b/attachment-0001.htm>
More information about the Pkg-xfce-commits
mailing list