Gmail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
rescue_from TamperedWithCookie error?
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  8 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Trevor Turk  
View profile  
 More options Dec 8 2007, 6:48 pm
From: Trevor Turk <rails-mailing-l...@andreas-s.net>
Date: Sun, 9 Dec 2007 00:48:04 +0100
Local: Sat, Dec 8 2007 6:48 pm
Subject: rescue_from TamperedWithCookie error?
I submitted a ticket about this, but I thought perhaps I should ping
this mailing list as well.

When deploying an an app that was upgraded to run on Rails 2.0 and use
cookie sessions, users that are logged into the site receive an error:
CGI::Session::CookieStore::TamperedWithCookie when they first visit the
site. When they refresh once, this error will no longer appear. However,
I can't figure out how to work around them seeing an Application Error
screen the first time. Is there any way to rescue_from this error, or
otherwise avoid encountering it all together?

http://dev.rubyonrails.org/ticket/10427
--
Posted via http://www.ruby-forum.com/.


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Frederick Cheung  
View profile  
 More options Dec 9 2007, 6:25 am
From: Frederick Cheung <frederick.che...@gmail.com>
Date: Sun, 9 Dec 2007 11:25:47 +0000
Local: Sun, Dec 9 2007 6:25 am
Subject: Re: [Rails] rescue_from TamperedWithCookie error?

On 8 Dec 2007, at 23:48, Trevor Turk wrote:

> I submitted a ticket about this, but I thought perhaps I should ping
> this mailing list as well.

> When deploying an an app that was upgraded to run on Rails 2.0 and use
> cookie sessions, users that are logged into the site receive an error:
> CGI::Session::CookieStore::TamperedWithCookie when they first visit  
> the
> site. When they refresh once, this error will no longer appear.  
> However,
> I can't figure out how to work around them seeing an Application Error
> screen the first time. Is there any way to rescue_from this error, or
> otherwise avoid encountering it all together?

If you change the name of the cookie used then the app won't see the  
old cookie at all, which should handle things.


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Trevor Turk  
View profile  
 More options Dec 9 2007, 8:10 pm
From: Trevor Turk <rails-mailing-l...@andreas-s.net>
Date: Mon, 10 Dec 2007 02:10:22 +0100
Local: Sun, Dec 9 2007 8:10 pm
Subject: Re: rescue_from TamperedWithCookie error?

Frederick Cheung wrote:
> If you change the name of the cookie used then the app won't see the
> old cookie at all, which should handle things.

I'm still not able to work around this issue. The problem occurs when I
change the "secret" used by cookie sessions in config/environment.rb:

config.action_controller.session = { :session_key => x, :secret => y }

That seems to trigger the TamperedWithCookie, which resolves itself
after one refresh. Changing the session_key and the secret at the same
time still triggers the error. So, I don't know what to do!

Again, any further help would be much appreciated.

Thanks,
- Trevor
--
Posted via http://www.ruby-forum.com/.


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Xavier Noria  
View profile  
 More options Dec 10 2007, 10:05 am
From: Xavier Noria <f...@hashref.com>
Date: Mon, 10 Dec 2007 16:05:59 +0100
Local: Mon, Dec 10 2007 10:05 am
Subject: Re: [Rails] Re: rescue_from TamperedWithCookie error?
On Dec 10, 2007, at 2:10 AM, Trevor Turk wrote:

> Frederick Cheung wrote:
>> If you change the name of the cookie used then the app won't see the
>> old cookie at all, which should handle things.

> I'm still not able to work around this issue. The problem occurs  
> when I
> change the "secret" used by cookie sessions in config/environment.rb:

> config.action_controller.session = { :session_key => x, :secret => y }

> That seems to trigger the TamperedWithCookie, which resolves itself
> after one refresh. Changing the session_key and the secret at the same
> time still triggers the error. So, I don't know what to do!

It should work, change the value associated to :session_key (which is  
the name of the cookie) in environment.rb and restart the server.

-- fxn


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Trevor Turk  
View profile  
 More options Dec 12 2007, 8:54 pm
From: Trevor Turk <rails-mailing-l...@andreas-s.net>
Date: Thu, 13 Dec 2007 02:54:09 +0100
Local: Wed, Dec 12 2007 8:54 pm
Subject: Re: rescue_from TamperedWithCookie error?

Xavier Noria wrote:
> On Dec 10, 2007, at 2:10 AM, Trevor Turk wrote:
> It should work, change the value associated to :session_key (which is
> the name of the cookie) in environment.rb and restart the server.

I've added more detail to a Rails Trac ticket, including an example of
the error. I'm doing what you suggested, Xavier, and I'm still getting
this error.

http://dev.rubyonrails.org/ticket/10427

Thanks,
- Trevor
--
Posted via http://www.ruby-forum.com/.


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Katie Kelly  
View profile  
(1 user)  More options Dec 13 2007, 9:32 am
From: Katie Kelly <kellyka...@gmail.com>
Date: Thu, 13 Dec 2007 06:32:32 -0800 (PST)
Local: Thurs, Dec 13 2007 9:32 am
Subject: Re: rescue_from TamperedWithCookie error?
Hi, Trevor.

I had the same problem when I upgraded to 2.0.1 and I got around it by
deleting the contents of my tmp/sessions directory.  Hope that helps!

Katie

On Dec 12, 7:54 pm, Trevor Turk <rails-mailing-l...@andreas-s.net>
wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Trevor Turk  
View profile  
 More options Dec 13 2007, 6:19 pm
From: Trevor Turk <rails-mailing-l...@andreas-s.net>
Date: Fri, 14 Dec 2007 00:19:02 +0100
Local: Thurs, Dec 13 2007 6:19 pm
Subject: Re: rescue_from TamperedWithCookie error?

Katie Kelly wrote:
> I had the same problem when I upgraded to 2.0.1 and I got around it by
> deleting the contents of my tmp/sessions directory.  Hope that helps!

I was using the database for sessions, so that's not the problem. Thanks
for the reply, though!
--
Posted via http://www.ruby-forum.com/.

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Saravanan Krishnan  
View profile  
 More options Apr 19 2008, 2:43 am
From: Saravanan Krishnan <rails-mailing-l...@andreas-s.net>
Date: Sat, 19 Apr 2008 08:43:47 +0200
Local: Sat, Apr 19 2008 2:43 am
Subject: Re: rescue_from TamperedWithCookie error?

Trevor Turk wrote:
> Katie Kelly wrote:
>> I had the same problem when I upgraded to 2.0.1 and I got around it by
>> deleting the contents of my tmp/sessions directory.  Hope that helps!

> I was using the database for sessions, so that's not the problem. Thanks
> for the reply, though!

I had the same problem then I got around it by
deleting the contents from sessions table.
--
Posted via http://www.ruby-forum.com/.

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google