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

[FrameworkBundle] Add sid_length and sid_bits_per_character session ini options in session configuration #30027

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

Merged
merged 1 commit into from
Feb 8, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
[FrameworkBundle] Add sid_length and sid_bits_per_character session i…
…ni options in configuration

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #29830
| License       | MIT
| Doc PR        | n/a

this a fix for the issue #29830

After deliberation, we estimate that only `sid_length` and` sid_bits_per_character` session options should be exposed. These options à optional.

For others, we recommend changing your php.ini file

We can now configure the session like this :

```yaml
framwork:
  session:
    sid_length: 64 //optional, recommended value is 32
    sid_bits_per_character: 6 //optional, recommended value is 5
```
  • Loading branch information
Anthony MARTIN committed Feb 8, 2019
commit 0403e4ad6703bc190babfc50dd062ea93ad8d67f
2 changes: 2 additions & 0 deletions 2 src/Symfony/Bundle/FrameworkBundle/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ CHANGELOG
original serialization method, set the `framework.messenger.serializer.id`
config option to `messenger.transport.symfony_serializer`.
* Added information about deprecated aliases in `debug:autowiring`
* Added php ini session options `sid_length` and `sid_bits_per_character`
to the `session` section of the configuration

4.2.0
-----
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -509,6 +509,14 @@ private function addSessionSection(ArrayNodeDefinition $rootNode)
->defaultValue(0)
->info('seconds to wait between 2 session metadata updates')
->end()
->integerNode('sid_length')
->min(22)
->max(256)
XuruDragon marked this conversation as resolved.
Show resolved Hide resolved
->end()
->integerNode('sid_bits_per_character')
->min(4)
->max(6)
XuruDragon marked this conversation as resolved.
Show resolved Hide resolved
->end()
->end()
->end()
->end()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,8 @@
<xsd:attribute name="gc-probability" type="xsd:string" />
<xsd:attribute name="save-path" type="xsd:string" />
<xsd:attribute name="metadata-update-threshold" type="xsd:nonNegativeInteger" />
<xsd:attribute name="sid-length" type="sid_length" />
<xsd:attribute name="sid-bits-per-character" type="sid_bits_per_character" />
</xsd:complexType>

<xsd:complexType name="request">
Expand Down Expand Up @@ -343,14 +345,29 @@
</xsd:restriction>
</xsd:simpleType>

<xsd:simpleType name="cookie_samesite">
<xsd:simpleType name="cookie_samesite">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="" />
<xsd:enumeration value="lax" />
<xsd:enumeration value="strict" />
</xsd:restriction>
</xsd:simpleType>

<xsd:simpleType name="sid_bits_per_character">
<xsd:restriction base="xsd:positiveInteger">
<xsd:enumeration value="4" />
<xsd:enumeration value="5" />
<xsd:enumeration value="6" />
</xsd:restriction>
</xsd:simpleType>

<xsd:simpleType name="sid_length">
<xsd:restriction base="xsd:positiveInteger">
<xsd:minInclusive value="22" />
<xsd:maxInclusive value="256" />
</xsd:restriction>
</xsd:simpleType>

<xsd:simpleType name="workflow_type">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="state_machine" />
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.