Skip to content
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

PdoSessionHandler session namespacing issue #12954

Closed
jspizziri opened this issue Dec 11, 2014 · 10 comments
Closed

PdoSessionHandler session namespacing issue #12954

jspizziri opened this issue Dec 11, 2014 · 10 comments

Comments

@jspizziri
Copy link

Session namespacing doesn't seem to work with the PdoSessionHandler.

Specifically this can be seen occurring on forms with CSRF tokens, as csrf tokens are stored using namespaces.

@Tobion
Copy link
Member

Tobion commented Dec 12, 2014

Save handlers as the PdoSessionHandler don't know anything about session namespaces. So these are not related. Can you clarify your report please or provide a way to reproduce your issue?

@jspizziri
Copy link
Author

Hmmmm. Well, I guess then the real issue is that, every time I implement the PdoSessionHandler in my code, session namespacing stops working. If I remove the configuration for the PdoSessionHandler it begins working again.

I'm specifically experiencing this issue during form submission. All of my forms fail to validate because the CSRF token is invalid (as it is not being found in the session).

@Tobion
Copy link
Member

Tobion commented Dec 12, 2014

Which database are you using?

@jspizziri
Copy link
Author

MySql

@Tobion
Copy link
Member

Tobion commented Dec 30, 2014

Which symfony version?

@jspizziri
Copy link
Author

2.6.1

$ composer show -i

ws/aws-sdk-php                      dev-master d32bfe3 AWS SDK for PHP - Use Amazon Web Services in your PHP project
doctrine/annotations                 v1.2.1             Docblock Annotations Parser
doctrine/cache                       v1.3.1             Caching library offering an object-oriented API for many cache backends
doctrine/collections                 v1.2               Collections Abstraction library
doctrine/common                      v2.4.2             Common Library for Doctrine projects
doctrine/data-fixtures               v1.0.0             Data Fixtures for all Doctrine Object Managers
doctrine/dbal                        v2.5.0             Database Abstraction Layer
doctrine/doctrine-bundle             v1.3.0             Symfony DoctrineBundle
doctrine/doctrine-cache-bundle       v1.0.1             Symfony2 Bundle for Doctrine Cache
doctrine/doctrine-fixtures-bundle    v2.2.0             Symfony DoctrineFixturesBundle
doctrine/inflector                   v1.0               Common String Manipulations with regard to casing and singular/plural rules.
doctrine/lexer                       v1.0               Base library for a lexer that can be used in Top-Down, Recursive Descent Parsers.
doctrine/orm                         v2.4.6             Object-Relational-Mapper for PHP
friendsofsymfony/comment-bundle      dev-master 2363b47 This Bundle provides threaded comment functionality for Symfony2 applications
friendsofsymfony/elastica-bundle     3.0.x-dev c45dcd9  Elasticsearch PHP integration for your Symfony2 project using Elastica
friendsofsymfony/rest-bundle         1.4.2              This Bundle provides various tools to rapidly develop RESTful API's with Symfony2
friendsofsymfony/user-bundle         dev-master 3565dfb Symfony FOSUserBundle
fyneworks/star-rating                dev-master master  
gedmo/doctrine-extensions            v2.3.9             Doctrine2 behavioral extensions
goodby/csv                           1.1.0              CSV import/export library
guzzle/guzzle                        v3.9.2             Guzzle is a PHP HTTP client library and framework for building RESTful web service clients
imagine/imagine                      0.6.2              Image processing for PHP 5.3
incenteev/composer-parameter-handler v2.1.0             Composer script handling your ignored parameter file
jdorn/sql-formatter                  v1.2.17            a PHP SQL highlighting library
jms/metadata                         1.5.1              Class/method/property metadata management in PHP
jms/parser-lib                       1.0.0              A library for easily creating recursive-descent parsers.
jms/serializer                       0.16.0             Library for (de-)serializing data of any complexity; supports XML, JSON, and YAML.
jms/serializer-bundle                0.13.0             Allows you to easily serialize, and deserialize data of any complexity
knplabs/gaufrette                    dev-master 1237668 PHP5 library that provides a filesystem abstraction layer
knplabs/knp-components               1.3.1              Knplabs component library
knplabs/knp-gaufrette-bundle         dev-master c88039e Allows to easily use the Gaufrette library in a Symfony project
knplabs/knp-menu                     dev-master d6f3cc4 An object oriented menu library
knplabs/knp-menu-bundle              dev-master 4c46964 This bundle provides an integration of the KnpMenu library
knplabs/knp-paginator-bundle         2.4.1              Paginator bundle for Symfony2 to automate pagination and simplify sorting and other features
kriswallsmith/assetic                v1.2.0             Asset Management for PHP
liip/imagine-bundle                  dev-master 5838f67 This Bundle assists in imagine manipulation using the imagine library
monolog/monolog                      1.11.0             Sends your logs to files, sockets, inboxes, databases and various web services
ob/highcharts-bundle                 1.1                Symfony2 Bundle that ease the use of highcharts to display rich graph and charts in your app
phpcollection/phpcollection          0.4.0              General-Purpose Collection Library for PHP
phpoption/phpoption                  1.4.0              Option Type for PHP
psr/log                              1.0.0              Common interface for logging libraries
ruflin/elastica                      v1.3.4.0           Elasticsearch Client
sensio/distribution-bundle           v2.3.6             The base bundle for the Symfony Distributions
sensio/framework-extra-bundle        v3.0.4             This bundle provides a way to configure your controllers with annotations
sensio/generator-bundle              v2.5.0             This bundle generates code for you
stof/doctrine-extensions-bundle      dev-master cfe13e8 Integration of the gedmo/doctrine-extensions with Symfony2
swiftmailer/swiftmailer              v5.3.1             Swiftmailer, free feature-rich PHP mailer
symfony/assetic-bundle               v2.5.0             Integrates Assetic into Symfony2
symfony/monolog-bundle               v2.6.1             Symfony MonologBundle
symfony/swiftmailer-bundle           v2.3.8             Symfony SwiftmailerBundle
symfony/symfony                      v2.6.1             The Symfony PHP framework
twig/extensions                      v1.2.0             Common additional features for Twig that do not directly belong in core
twig/twig                            v1.16.2            Twig, the flexible, fast, and secure template language for PHP
vich/uploader-bundle                 v0.11.0            Ease file uploads attached to entities
willdurand/jsonp-callback-validator  v1.1.0             JSONP callback validator.
willdurand/negotiation               1.3.4              Content Negotiation tools for PHP provided as a standalone library.
zendframework/zend-json              2.3.0              provides convenience methods for serializing native PHP to JSON and decoding JSON to native PHP

@corentinbaur
Copy link

I've the same problem. When I implements PDOSessionHandler on my symfony project (v2.6.3). All forms fail because the CSRF token is invalid. I have the problem with php5-fpm and hhvm.

@null-ref-0000
Copy link

null-ref-0000 commented Jun 29, 2017

I am experiencing the same issue with Symfony 3.3. I have some of the same dependencies as jspizziri. Such as friendsofsymfony/rest-bundle, friendsofsymfony/user-bundle, and vich/uploader-bundle. Perhaps its a bug in one of the dependencies that's causing the issue.

@nicolas-grekas
Copy link
Member

Could anyone provide a reproducer based on the standard edition?

@xabbuh
Copy link
Member

xabbuh commented Dec 22, 2017

I am going to close here for now due to the lack of feedback. Please let us know when you have more information and we can consider to reopen.

@xabbuh xabbuh closed this as completed Dec 22, 2017
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

9 participants