Skip to content
This repository has been archived by the owner on Mar 20, 2024. It is now read-only.

Add escaping to strings read from env #323

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

SvenRtbg
Copy link

Symfony treats strings containing two percent signs as a variable to
be replaced.

Jenkins will escape slashes in branch names as "%2f", having a branch
name with two slashes leads to the env variables "JOB_NAME" and
"BUILD_NUMBER" to contain two percent signs, which triggers Symfony DIs
variable replacement, and fails Behat execution with a ParameterNotFound
exception.

Symfony treats strings containing two percent signs as a variable to
be replaced.

Jenkins will escape slashes in branch names as "%2f", having a branch
name with two slashes leads to the env variables "JOB_NAME" and
"BUILD_NUMBER" to contain two percent signs, which triggers Symfony DIs
variable replacement, and fails Behat execution with a ParameterNotFound
exception.
@SvenRtbg
Copy link
Author

A word of warning: I patched the flaw I experienced personally, and added some more escaping for other environments that may also be affected.

The warning extends in both directions: For one, I may treat the environments besides Jenkins wrong, but on the other hand many more cases may exist that would require proper escaping.

As I am not accustomed enough to Symfony DI, I would rely on guesswork most of the time, so I keep this patch to a reasonable minimum.

@SvenRtbg
Copy link
Author

I have no idea why HHVM is failing in the build, but it is also failing on the most current "master" branch commit for me.

@SvenRtbg
Copy link
Author

SvenRtbg commented May 4, 2018

Fixes #322

@SvenRtbg
Copy link
Author

SvenRtbg commented Oct 1, 2018

Ping! Would be nice if I could get some response.

@SvenRtbg
Copy link
Author

Ping @everzet

I'd appreciate any form of response. Is the issue #322 unclear? Is the fix inappropriate or too vague?

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

Successfully merging this pull request may close these issues.

2 participants