Ok, thanks Jon.  I wanted to write a test for it, but I guess I'll just 
manually cast it and be done with it.  

And sorry for the sock puppet; I'll put him away now.


On Saturday, 9 February 2013 at 14:03 , Jon Rowe wrote:

> If you're casting the token to a string manually, you're not vulnerable. 
> (i.e. you're calling .to_s)
>  
> If you're relying on Rails to cast it, haven't removed the XML/JSON params 
> interpreters you are, as XML and JSON payloads can force integers which MySQL 
> does unexpected things with.  
>  
> Jon Rowe
> -----------------------------
> [email protected] (mailto:[email protected])
> jonrowe.co.uk (http://jonrowe.co.uk)
>  
>  
> On Saturday, 9 February 2013 at 13:37, Sock Puppet wrote:
>  
> > That's a super awesome question, Tim!  I'd really like to hear some 
> > feedback on it too.  Anybody?  
> >  
> > :P
> >  
> >  
> > On Thursday, 7 February 2013 at 23:31 , Tim McEwan wrote:
> >  
> > > We use a get request for our password_reset links 
> > > (/password_resets/wYOBshhbxPwd9QL0L4F2/edit) and post requests aren't 
> > > routable.  The random part in the link is just the perishable token, and 
> > > always gets cast to a string.  This leads me to think we're not 
> > > vulnerable - am I missing something?
> > >  
> > > Thanks!
> > >  
> > >  
> > > On Thursday, 7 February 2013 at 09:35 , Chris Corbyn wrote:
> > >  
> > > > > >  
> > > > > > I guess the only solution really is to not use MySQL :/
> > > >  
> > > > This doesn't seem to affect DataMapper in any way, due to the property 
> > > > system handling typecasts before doing comparisons.
> > > >  
> > > > mysql> select * from users where username=0 limit 1;
> > > > … snip …
> > > > 1 row in set, 1 warning (0.00 sec)
> > > >  
> > > > irb> User.first(:username => 0)  
> > > > => nil
> > > >  
> > > > --  
> > > > You received this message because you are subscribed to the Google 
> > > > Groups "Ruby or Rails Oceania" group.
> > > > To unsubscribe from this group and stop receiving emails from it, send 
> > > > an email to [email protected] 
> > > > (mailto:[email protected]).
> > > > To post to this group, send email to [email protected] 
> > > > (mailto:[email protected]).
> > > > Visit this group at http://groups.google.com/group/rails-oceania?hl=en.
> > > > For more options, visit https://groups.google.com/groups/opt_out.
> > > >  
> > > >  
> > > >  
> > >  
> > >  
> >  
> > --  
> > You received this message because you are subscribed to the Google Groups 
> > "Ruby or Rails Oceania" group.
> > To unsubscribe from this group and stop receiving emails from it, send an 
> > email to [email protected] 
> > (mailto:[email protected]).
> > To post to this group, send email to [email protected] 
> > (mailto:[email protected]).
> > Visit this group at http://groups.google.com/group/rails-oceania?hl=en.
> > For more options, visit https://groups.google.com/groups/opt_out.
> >   
> >   
>  
> --  
> You received this message because you are subscribed to the Google Groups 
> "Ruby or Rails Oceania" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected] 
> (mailto:[email protected]).
> To post to this group, send email to [email protected] 
> (mailto:[email protected]).
> Visit this group at http://groups.google.com/group/rails-oceania?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>   
>   

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
or Rails Oceania" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/rails-oceania?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to