Skip to content

Project absolute path interpreted as parameters #58667

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

Open
satdeveloping opened this issue Oct 25, 2024 · 3 comments
Open

Project absolute path interpreted as parameters #58667

satdeveloping opened this issue Oct 25, 2024 · 3 comments

Comments

@satdeveloping
Copy link

Symfony version(s) affected

7.1.x

Description

We are using the GitHub Source Plugin for Jenkins to run CI on Pull Requests and in the Merge Queue.

The Merge Queue creates a branch name which includes the source branch of the PR, which can include slashes. Somewhere between GitHub and the CI job running in Jenkins, the branch name is converted to a directory path with the slashes uri encoded (%2F).

Running any command via ./bin/console in this directory causes the slash escapes in the path to be interpreted as parameters of some kind. for example ./bin/console cache:clear or ./bin/console cache:warmup

The error always points the first part of the directory path immediately after the first % as being incorrect.

For a project located in /var/lib/jenkins/workspace/GitHub-MergeQueue/api/my%2Fother%2Fslashy%2Fbranch, the error reads as

In ParameterBag.php line 88:
                                                                               
  You have requested a non-existent parameter "2Fother" while loading extensi  
  on "framework".                                                              

How to reproduce

Clone a symfony application to a directory containing %2f in the path.
Run a command via ./bin/console

Possible Solution

No response

Additional Context

No response

@satdeveloping
Copy link
Author

satdeveloping commented Oct 29, 2024

If I manually resolve all references to %kernel.*% in my config directory (true/fasle/paths not containing %2F), the error message changes:

php -d xdebug.mode=off -d memory_limit=-1 ./bin/console cache:warmup
       → 
       → In ParameterBag.php line 88:
       →                                                           
       →   You have requested a non-existent parameter "2Fother".  
       →                                                           
       → 

@carsonbot
Copy link

Hey, thanks for your report!
There has not been a lot of activity here for a while. Is this bug still relevant? Have you managed to find a workaround?

@carsonbot
Copy link

Hello? This issue is about to be closed if nobody replies.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants
@carsonbot @satdeveloping and others