Skip to content

placeholder %i is not replaced because of wrong replacement of %s #156

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
pesfronau opened this issue Apr 5, 2023 · 1 comment · Fixed by #160
Closed

placeholder %i is not replaced because of wrong replacement of %s #156

pesfronau opened this issue Apr 5, 2023 · 1 comment · Fixed by #160

Comments

@pesfronau
Copy link

Steps to reproduce

  1. put i% in script definition

Expected behaviour

i% should be replaced with file id

Actual behaviour

i% is not replaced

Workflow Script app

1.11.0 until 1.12.0

there is a wrong replacement in Sourcecode of
/lib/Operation.php line 219
searching for placehoder %i and replace placeholder %s
so %i is never replaced
That is wrong since 1.11.0. Please fix

if (strpos($command, '%i')) {
$nodeID = -1;
try {
$nodeID = $node->getId();
} catch (InvalidPathException | NotFoundException $e) {
}
$command = str_replace('%s', escapeshellarg((string)$nodeID), $command);
}

cchartmann added a commit to cchartmann/workflow_script that referenced this issue May 6, 2023
fixes nextcloud#156

Signed-off-by: Michael Hartmann <94720889+cchartmann@users.noreply.github.com>
@cchartmann cchartmann mentioned this issue May 6, 2023
@cchartmann
Copy link
Contributor

Hab mal grad nen PR dazu gemacht

blizzz added a commit that referenced this issue Jun 2, 2023
backportbot-nextcloud bot pushed a commit that referenced this issue Jun 2, 2023
fixes #156

Signed-off-by: Michael Hartmann <94720889+cchartmann@users.noreply.github.com>
backportbot-nextcloud bot pushed a commit that referenced this issue Jun 2, 2023
fixes #156

Signed-off-by: Michael Hartmann <94720889+cchartmann@users.noreply.github.com>
blizzz added a commit that referenced this issue Jun 2, 2023
blizzz added a commit that referenced this issue Jun 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants