rack-devel archive mirror (unofficial) https://groups.google.com/group/rack-devel
 help / color / mirror / Atom feed
* Questions about the Prohibition of String Subclasses in responses
@ 2009-10-05 21:58 Michael Koziarski
  2009-10-05 23:02 ` Eric Wong
  0 siblings, 1 reply; 8+ messages in thread
From: Michael Koziarski @ 2009-10-05 21:58 UTC (permalink / raw)
  To: Rack Development


Hey Guys,

As I prepare to merge the new on-by-default XSS protection into rails
I'm bumping up against a constraint in rack, and I'm having trouble
figuring out why it's there.

http://github.com/chneukirchen/rack/blob/master/lib/rack/lint.rb#L465-475

Our XSS safe responses will fail this test because they return an
instance of ActionView::SafeBuffer which is a subclass of String.  We
use a subclass so that we can make all the concat and append
operations escape their arguments.

What's the rationale for preventing me from sending a subclass of
string?  Can we just change this stuff to use Object#kind_of? instead?

Cheers

Koz

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2009-10-06 14:23 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-10-05 21:58 Questions about the Prohibition of String Subclasses in responses Michael Koziarski
2009-10-05 23:02 ` Eric Wong
2009-10-05 23:22   ` Eric Wong
2009-10-06  0:38     ` Michael Koziarski
2009-10-06  2:52       ` Eric Wong
2009-10-06  6:40         ` Michael Koziarski
2009-10-06 14:23           ` James Tucker
2009-10-06  8:05     ` James Tucker

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).