Mitigating XSS in the mod_perl API

2003-01-26 Thread Matt Sergeant
At the moment it's possible to do nasty XSS things in mod_perl when you set a cookie. That's because $r->headers_out->add() (or set()) doesn't care if you include carriage returns in your header. Simple example would be: $r->headers_out->add('Set-Cookie' => 'mycookie=' . $r->param('myparam'));

Re: Mitigating XSS in the mod_perl API

2003-01-26 Thread Stas Bekman
Matt Sergeant wrote: At the moment it's possible to do nasty XSS things in mod_perl when you set a cookie. That's because $r->headers_out->add() (or set()) doesn't care if you include carriage returns in your header. Simple example would be: $r->headers_out->add('Set-Cookie' => 'mycookie=' . $

Re: Mitigating XSS in the mod_perl API

2003-01-26 Thread Matt Sergeant
On Sunday, Jan 26, 2003, at 22:28 Europe/London, Stas Bekman wrote: If that causes a bug, may be this should be fixed in Apache? That sounds plausible. Perhaps you could bring this up on new-httpd@ for me since I'm not subscribed ;-) I guess the argument you could use is that if you write out

Re: Mitigating XSS in the mod_perl API

2003-01-26 Thread Stas Bekman
Matt Sergeant wrote: On Sunday, Jan 26, 2003, at 22:28 Europe/London, Stas Bekman wrote: If that causes a bug, may be this should be fixed in Apache? That sounds plausible. Perhaps you could bring this up on new-httpd@ for me since I'm not subscribed ;-) You know that bringing up things on