Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • xfce4-settings xfce4-settings
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Graph
    • Compare
  • Issues 248
    • Issues 248
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 5
    • Merge requests 5
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Releases
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • XfceXfce
  • xfce4-settingsxfce4-settings
  • Merge requests
  • !85

mime-settings: Properly quote command parameters

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Gaël Bonithon requested to merge Tamaranch/xfce4-settings:fix-quoting into master Nov 11, 2022
  • Overview 7
  • Commits 2
  • Pipelines 3
  • Changes 1

Here is a proposal based on the conventions currently used in .desktop files: the fact that an argument must be quoted is signified by the use of double quotes (and only double quotes), with no possibility of escaping these quotes.

I don't know if there are any use cases that currently go beyond this, but there will have to be limits at some point if we want to get away with it. Besides there is already code that adds or removes double quotes in xfce-mime-helper.c, so I guess that's a reasonable assumption.

Here are the steps:

  • split by isolating the parts to be quoted;
  • remove the double quotes;
  • replace %s with the parameter;
  • quote properly;
  • join.

Fixes: #390 (closed), #403 (closed)

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: fix-quoting