Skip to content

ENT-14983: Fixed argument injection into date from strtotime() and file_older_than() - #6515

Open
victormlg wants to merge 2 commits into
cfengine:masterfrom
victormlg:strtotime-arg-injection
Open

victormlg wants to merge 2 commits into
cfengine:masterfrom
victormlg:strtotime-arg-injection

Conversation

@victormlg

@victormlg victormlg commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

To also cover Windows, I made arglist elements get quoted before they are passed to CreateProcess(), in https://github.com/cfengine/enterprise/pull/1039

@victormlg
victormlg requested a review from larsewi November 20, 2026 07:51
Comment thread libpromises/evalfunction.c Resolved
@victormlg
victormlg force-pushed the strtotime-arg-injection branch from f67c8fa to da3c763 Compare November 20, 2026 11:31
@victormlg
victormlg requested a review from larsewi November 20, 2026 11:31
The pipe to date was closed with `fclose()`, which does not wait for the
child.

Changelog: Title
Signed-off-by: Victor Moene <victor.moene@northern.tech>
…_than()`

The date was embedded in a command string, so quotes in it could add
arguments to date. It is now passed to date as a separate argument.

Changelog: Title
Ticket: ENT-14983
Signed-off-by: Victor Moene <victor.moene@northern.tech>
@victormlg
victormlg force-pushed the strtotime-arg-injection branch from da3c763 to 191fa38 Compare November 20, 2026 12:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants