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

Proper decode of cookie values #6

Closed
boof opened this issue Nov 10, 2009 · 3 comments
Closed

Proper decode of cookie values #6

boof opened this issue Nov 10, 2009 · 3 comments

Comments

@boof
Copy link

boof commented Nov 10, 2009

Ok, I'm new to the adva CMS so it took me some time to figure this out. But since my last name is Aßmann it really bothered me. :)

in adva_cms/engines/adva_cms/public/javascripts/adva_cms/application.js at line 4 you try to unescape the values from a cookie. It seems Rails uses URI encode for values stored in cookies so you need to call decodeURIComponent instead of unescape.

Regards
Florian Aßmann !(Florian AÃ�mann :)

@svenfuchs
Copy link
Owner

Hi Florian,

thanks for pointing this out. The proposed fix doesn't seem to work for me though:

http://skitch.com/svenfuchs/n8fxw/adva-cms-cookie-encoding

Any further ideas?

@boof
Copy link
Author

boof commented Nov 13, 2009

Ah, my fail. Forgot that I changed authentication_user.rb, too. I've wrapped user.name in a CGI.escape before assignment to cookies[:uname]. This works for me in FF 3.5.5 and Safari 4.0.3.

@svenfuchs
Copy link
Owner

Ah, alright, pushed: http://github.com/svenfuchs/adva_cms/commit/c139e0ef0bfa380061ad2c045798df4d5658da91

Does that work for you?

This issue was closed.
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

2 participants