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

Disable cookie encryption? #26

Closed
ianfp opened this issue Feb 17, 2014 · 3 comments
Closed

Disable cookie encryption? #26

ianfp opened this issue Feb 17, 2014 · 3 comments

Comments

@ianfp
Copy link

ianfp commented Feb 17, 2014

I don't want to encrypt my cookies, so I set my config to look like this:

nelmio_security:
    encrypted_cookie:
        names: []

But I get this error:
RuntimeException in Encrypter.php line 27: You need to install mcrypt if you want to encrypt your cookies.

Can I completely disable cookie encryption so that I don't have to install mcrypt?

@sstok
Copy link

sstok commented Feb 18, 2014

Just leave out the encrypted_cookie section, if you have it enabled you can disable it with encrypted_cookie: ~

@Seldaek
Copy link
Member

Seldaek commented Feb 18, 2014

Yes leaving it out entirely is the best option. I'll look at fixing the code though so that it skips the encryption listeners if no names are defined because that makes no sense.

@ianfp
Copy link
Author

ianfp commented Feb 18, 2014

I didn't realize that leaving sections out disabled them -- I thought it enabled them with default values. I suppose I should have tried that first. Anyhow, removing them works fine. Thanks for the help, and for the terrific bundle!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants