Forum: Ruby on Rails Problem setting multi-value cookie

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
7fb5fbb71c98194e4d63170314aea238?d=identicon&s=25 Thiago Jackiw (Guest)
on 2006-01-27 18:51
(Received via mailing list)
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 Jackiw
4bd34a2216dc8bdbf1f017f64e4d59e8?d=identicon&s=25 Kyle Maxwell (Guest)
on 2006-01-27 20:59
(Received via mailing list)
On 1/27/06, Thiago Jackiw <thiago@mingle.com> wrote:
>
> _______________________________________________
> Rails mailing list
> Rails@lists.rubyonrails.org
> 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 Maxwell
Chief Technologist
E Factor Media // FN Interactive
kyle@efactormedia.com
1-866-263-3261
7fb5fbb71c98194e4d63170314aea238?d=identicon&s=25 Thiago Jackiw (Guest)
on 2006-01-27 21:29
Kyle Maxwell wrote:
> On 1/27/06, Thiago Jackiw <thiago@mingle.com> wrote:
>>
>> _______________________________________________
>> Rails mailing list
>> Rails@lists.rubyonrails.org
>> 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 Maxwell
> Chief Technologist
> E Factor Media // FN Interactive
> kyle@efactormedia.com
> 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?
4bd34a2216dc8bdbf1f017f64e4d59e8?d=identicon&s=25 Kyle Maxwell (Guest)
on 2006-01-27 23:54
(Received via mailing list)
On 1/27/06, Thiago Jackiw <thiago@mingle.com> 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
> Rails@lists.rubyonrails.org
> 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 Maxwell
Chief Technologist
E Factor Media // FN Interactive
kyle@efactormedia.com
1-866-263-3261
This topic is locked and can not be replied to.