8000 Support for new 7.1 session options · Issue #21606 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

Support for new 7.1 session options #21606

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
Erseni opened this issue Feb 14, 2017 · 2 comments
Closed

Support for new 7.1 session options #21606

Erseni opened this issue Feb 14, 2017 · 2 comments

Comments

@Erseni
Copy link
Erseni commented Feb 14, 2017
Q A
Bug report? no
Feature request? yes
BC Break report? no
RFC? no
Symfony version 3.2.3

The NativeSessionStorage is not supporting the new php 7.1 session:
php.net
sid_bits_per_character
sid_length
trans_sid_hosts
trans_sid_tags

$validOptions = array_flip(array(
            'cache_limiter', 'cookie_domain', 'cookie_httponly',
            'cookie_lifetime', 'cookie_path', 'cookie_secure',
            'entropy_file', 'entropy_length', 'gc_divisor',
            'gc_maxlifetime', 'gc_probability', 'hash_bits_per_character',
            'hash_function', 'name', 'referer_check',
            'serialize_handler', 'use_cookies',
            'use_only_cookies', 'use_trans_sid', 'upload_progress.enabled',
            'upload_progress.cleanup', 'upload_progress.prefix', 'upload_progress.name',
            'upload_progress.freq', 'upload_progress.min-freq', 'url_rewriter.tags',
        ));

        foreach ($options as $key => $value) {
            if (isset($validOptions[$key])) {
                ini_set('session.'.$key, $value);
            }
        }
@chapterjason
Copy link
Contributor

Session ID generation without hashing
Session IDs will no longer be hashed upon generation. With this change brings about the removal of the
following four ini settings:

session.entropy_file
session.entropy_length
session.hash_function
session.hash_bits_per_character

And the addition of the following two ini settings:

session.sid_length - defines the length of the session ID, defaulting to 32 characters for backwards compatibility)
session.sid_bits_per_character - defines the number of bits to be stored per character (i.e. increases the range of characters that can be used in the session ID), defaulting to 4 for backwards compatibility

Source: Migrating from PHP 7.0.x to PHP 7.1.x - Other changes - Session ID generation without hashing

@nicolas-grekas
Copy link
Member

please submit a PR against branch 2.7

vincentaubert added a commit to vincentaubert/symfony that referenced this issue Jun 10, 2017
vincentaubert added a commit to vincentaubert/symfony that referenced this issue Jun 10, 2017
vincentaubert added a commit to vincentaubert/symfony that referenced this issue Jun 10, 2017
vincentaubert added a commit to vincentaubert/symfony that referenced this issue Jun 14, 2017
fabpot added a commit that referenced this issue Jun 14, 2017
…ns (vincentaubert)

This PR was merged into the 2.7 branch.

Discussion
----------

[HttpFoundation] fix for Support for new 7.1 session options

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

Commits
-------

71c1b6f fixes #21606
@fabpot fabpot closed this as completed Jun 14, 2017
fabpot added a commit that referenced this issue Jun 14, 2017
…ions (fabpot)

This PR was merged into the 4.0-dev branch.

Discussion
----------

[HttpFoundation] Remove obsolete ini settings for sessions

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

As of PHP 7.1, those settings do not exist anymore. See http://php.net/manual/de/migration71.other-changes.php#migration71.other-changes.session-id-generation-without-hashing

Commits
-------

86911b5 [HttpFoundation] removed obsolete ini settings for sessions
fabpot added a commit that referenced this issue Jun 20, 2017
* 2.7:
  [Routing] Fix XmlFileLoader exception message
  Sessions: configurable "use_strict_mode" option for NativeSessionStorage
  [FrameworkBundle] [Command] Clean bundle directory, fixes #23177
  Reset redirectCount when throwing exception
  [TwigBundle] Remove template.xml services when templating is disabled
  add content-type header on exception response
  Embedding a response that combines expiration and validation, that should not defeat expiration on the combined response
  Fix two edge cases in ResponseCacheStrategy
  [Routing] Expose request in route conditions, if needed and possible
  [Routing] Expose request in route conditions, if needed and possible
  [Translation][FrameworkBundle] Fix resource loading order inconsistency reported in #23034
  [Filesystem] added workaround in Filesystem::rename for PHP bug
  Add tests for ResponseCacheStrategy to document some more edge cases
  [HttpFoundation] added missing docs
  fixes #21606
  [VarDumper] fixes
  [Security] fix switch user _exit without having current token
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

6 participants
0