Welcome! Log In Create A New Profile

Advanced

Re: Manipulating the body of a PUT/POST

Maxim Dounin
October 17, 2012 01:44PM
Hello!

On Wed, Oct 17, 2012 at 03:09:26PM +0400, kyprizel wrote:

> Maxim, we use body handling code from Valery Kholodkov's upload
> module(and nginx core) in Nginx ModSecurity module, can you please
> look at the code and check if we do it correctly?
> http://mod-security.svn.sourceforge.net/viewvc/mod-security/m2/trunk/nginx/modsecurity/

Are you kidding? ;)

It can't be correct without input body filtering implemented.
It's a hack at best, expect it to break on major changes in
request body reading code. Additionally, it looks like you've
failed to provide any logic to actually save request body for use
by other modules if it's large enough to don't fit into memory
buffer configured (that is, write request body to disk), nor any
logic to honor r->request_body_in_file_only.

The only _correct_ aproach available as of now is to call
ngx_http_read_client_request_body(), and work with the result once
post_handler is called.

--
Maxim Dounin
http://nginx.com/support.html

_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

Manipulating the body of a PUT/POST

Adam Hasselbalch Hansen 1875 February 03, 2012 03:52AM

Re: Manipulating the body of a PUT/POST

Maxim Dounin 811 February 03, 2012 05:06AM

Re: Manipulating the body of a PUT/POST

Adam Hasselbalch Hansen 861 February 03, 2012 05:20AM

Re: Manipulating the body of a PUT/POST

Adam Hasselbalch Hansen 696 March 08, 2012 09:02AM

Re: Manipulating the body of a PUT/POST

Pasi Kärkkäinen 746 March 08, 2012 03:12PM

Re: Manipulating the body of a PUT/POST

Maxim Dounin 800 March 09, 2012 09:24AM

Re: Manipulating the body of a PUT/POST

Pasi Kärkkäinen 789 March 19, 2012 04:34AM

Re: Manipulating the body of a PUT/POST

Maxim Dounin 780 March 09, 2012 08:20AM

Re: Manipulating the body of a PUT/POST

Adam Hasselbalch Hansen 689 October 17, 2012 07:04AM

Re: Manipulating the body of a PUT/POST

kyprizel 708 October 17, 2012 07:10AM

Re: Manipulating the body of a PUT/POST

Adam Hasselbalch Hansen 673 October 17, 2012 07:14AM

Re: Manipulating the body of a PUT/POST

VBart 978 October 17, 2012 07:36AM

Re: Manipulating the body of a PUT/POST

Maxim Dounin 619 October 17, 2012 01:44PM

Re: Manipulating the body of a PUT/POST

kyprizel 643 October 17, 2012 04:04PM

Re: Manipulating the body of a PUT/POST

Maxim Dounin 671 October 18, 2012 05:34AM

Re: Manipulating the body of a PUT/POST

kyprizel 866 October 18, 2012 08:38AM

Re: Manipulating the body of a PUT/POST

Maxim Dounin 618 October 17, 2012 01:22PM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 147
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready