Problem setting multi-value cookie


#1

I’m trying to set a multi-value cookie but for some reason it’s not
working. Any help would be appreciated.

cookies[:user] = { :value => {:email=>params[:login][:email],
:passwd=>params[:login][:passwd]}, :expires => 30.days.from_now, :path
=> “/login”}

Thiago J.


#2

On 1/27/06, Thiago J. removed_email_address@domain.invalid wrote:


Rails mailing list
removed_email_address@domain.invalid
http://lists.rubyonrails.org/mailman/listinfo/rails

You really should be setting that in the session. It’s a particularly
bad idea to be storing a cleartext password in a cookie.


Kyle M.
Chief Technologist
E Factor Media // FN Interactive
removed_email_address@domain.invalid
1-866-263-3261


#3

Kyle M. wrote:

On 1/27/06, Thiago J. removed_email_address@domain.invalid wrote:


Rails mailing list
removed_email_address@domain.invalid
http://lists.rubyonrails.org/mailman/listinfo/rails

You really should be setting that in the session. It’s a particularly
bad idea to be storing a cleartext password in a cookie.


Kyle M.
Chief Technologist
E Factor Media // FN Interactive
removed_email_address@domain.invalid
1-866-263-3261

Well, true, but that isn’t the point, the password will be md5 hashed.
The point is that it’s not accepting an array as the value and I need it
to be a cookie. Any ideas?


#4

On 1/27/06, Thiago J. removed_email_address@domain.invalid wrote:

bad idea to be storing a cleartext password in a cookie.
to be a cookie. Any ideas?


Posted via http://www.ruby-forum.com/.


Rails mailing list
removed_email_address@domain.invalid
http://lists.rubyonrails.org/mailman/listinfo/rails

I would expect that you have to serialize the data. In Ruby that is
done using the Marshal class.


Kyle M.
Chief Technologist
E Factor Media // FN Interactive
removed_email_address@domain.invalid
1-866-263-3261