Skip to content

lint:container fail if use cookie_domain with env variable #34774

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
b-vadym opened this issue Dec 3, 2019 · 0 comments
Closed

lint:container fail if use cookie_domain with env variable #34774

b-vadym opened this issue Dec 3, 2019 · 0 comments

Comments

@b-vadym
Copy link

b-vadym commented Dec 3, 2019

Symfony version(s) affected: 4.4.1

Description
If run lint:container command show error

$ bin/console lint:cont 

In ParameterBag.php line 100:
                                                                                                 
  The service "security.http_utils" has a dependency on a non-existent parameter "s|(?:.+\.)?".  

How to reproduce
start new project using symfony/website-skeleton. After change config
services.yaml

parameters:
    app.main_host: '%env(MAIN_HOST)%'

framework.yaml

framework:
    session:
        handler_id: null
        cookie_secure: auto
        cookie_samesite: lax
        cookie_domain: '%app.main_host%'

.env

MAIN_HOST='localhost'
chalasr added a commit that referenced this issue Dec 6, 2019
…ConstraintPass (fancyweb)

This PR was merged into the 3.4 branch.

Discussion
----------

[SecurityBundle] Properly escape regex in AddSessionDomainConstraintPass

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | #34774
| License       | MIT
| Doc PR        | -

`%s` should be escaped, so it is dumped as `%%s` (it ends up being properly unescaped at load time, so the passed value to the service is the same).

Commits
-------

de03cee [SecurityBundle] Properly escape regex in AddSessionDomainConstraintPass
symfony-splitter pushed a commit to symfony/security-bundle that referenced this issue Dec 6, 2019
…ConstraintPass (fancyweb)

This PR was merged into the 3.4 branch.

Discussion
----------

[SecurityBundle] Properly escape regex in AddSessionDomainConstraintPass

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | symfony/symfony#34774
| License       | MIT
| Doc PR        | -

`%s` should be escaped, so it is dumped as `%%s` (it ends up being properly unescaped at load time, so the passed value to the service is the same).

Commits
-------

de03cee846 [SecurityBundle] Properly escape regex in AddSessionDomainConstraintPass
@chalasr chalasr closed this as completed Dec 7, 2019
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

4 participants