Skip to content

fix: tighten up shell escaping to handle some edge cases - #1632

Merged
braindigitalis merged 1 commit into
devfrom
fix-command-line-escape
Aug 5, 2026
Merged

fix: tighten up shell escaping to handle some edge cases#1632
braindigitalis merged 1 commit into
devfrom
fix-command-line-escape

Conversation

@braindigitalis

@braindigitalis braindigitalis commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

When passing command line parameters to a bourne style shell using dpp::utility::exec(), the user could be misled to believe DPP does escaping of ` symbols, $(), etc (it did not).

This PR adds support for escaping that properly blocks those bourne behaviours in Linux and other similar operating systems, so that it is a bit more friendly.

Note, this does not absolve the library user of NOT passing user crafted data into dpp::utility::exec(). It is not our job to protect the library users from stupidity.

Windows doesn't need this patch, as std::quoted() will suffice there.

Code change checklist

  • I have ensured that all methods and functions are fully documented using doxygen style comments.
  • My code follows the coding style guide.
  • I tested that my change works before raising the PR.
  • I have ensured that I did not break any existing API calls.
  • I have not built my pull request using AI, a static analysis tool or similar without any human oversight.

@netlify

netlify Bot commented Aug 5, 2026

Copy link
Copy Markdown

Deploy Preview for dpp-dev ready!

Name Link
🔨 Latest commit 8f1e9ab
🔍 Latest deploy log https://app.netlify.com/projects/dpp-dev/deploys/6a728151e16e2000078f97b9
😎 Deploy Preview https://deploy-preview-1632--dpp-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@github-actions github-actions Bot added the code Improvements or additions to code. label Aug 5, 2026

@Neko-Life Neko-Life left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgmt

@braindigitalis
braindigitalis merged commit 4643b7f into dev Aug 5, 2026
74 checks passed
@braindigitalis
braindigitalis deleted the fix-command-line-escape branch August 5, 2026 15:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

code Improvements or additions to code.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants