Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit a347a84

Browse filesBrowse files
bug #36483 [SecurityBundle] fix accepting env vars in remember-me configurations (zek)
This PR was merged into the 3.4 branch. Discussion ---------- [SecurityBundle] fix accepting env vars in remember-me configurations | Q | A | ------------- | --- | Branch? | 3.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | Fix #36271 | License | MIT | Doc PR | - As @wouterj explained we cannot use env variables after #35910 merged. > Hmm, so I'm guessing this is what happens: > > * `lifetime` is now an `integerNode()` > * For the Config component (which IIRC doesn't know anything about env variables), you're passing a string: `"%env(int:REMEMBER_ME_COOKIE_LIFETIME)%"` > * This throws an error, although if it wouldn't, the DI component would sucessfully process the string into a integer before it's used by any PHP class. > > So we either make Config aware of environment variables (that's probably a huge feature) or we revert the `integerNode()` changes (as you suggested). > > @HeahDude am I mislooking something, or would reverting these 2 lines not result in much harm? (only a little less strict config processor) Commits ------- 46c2783 [SecurityBundle] fix accepting env vars in remember-me configurations
2 parents 0f1a5c4 + 46c2783 commit a347a84
Copy full SHA for a347a84

File tree

1 file changed

+0
-2
lines changed
Filter options

1 file changed

+0
-2
lines changed

‎src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/RememberMeFactory.php

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/RememberMeFactory.php
-2Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,8 +146,6 @@ public function addConfiguration(NodeDefinition $node)
146146
foreach ($this->options as $name => $value) {
147147
if (\is_bool($value)) {
148148
$builder->booleanNode($name)->defaultValue($value);
149-
} elseif (\is_int($value)) {
150-
$builder->integerNode($name)->defaultValue($value);
151149
} else {
152150
$builder->scalarNode($name)->defaultValue($value);
153151
}

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.