diff options
author | Andrew Tridgell <tridge@samba.org> | 2005-08-05 15:34:31 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:31:18 -0500 |
commit | 71f8de6bb3306f2d6b63f3b1c1551af473caa483 (patch) | |
tree | c99a69b672ffbc6bde0336459e7ab9ad04797619 /source4/web_server | |
parent | c3ee5d6f751679e04886fa450555295e74cc56bc (diff) | |
download | samba-71f8de6bb3306f2d6b63f3b1c1551af473caa483.tar.gz samba-71f8de6bb3306f2d6b63f3b1c1551af473caa483.tar.bz2 samba-71f8de6bb3306f2d6b63f3b1c1551af473caa483.zip |
r9122: cope with trailing garbage in POST contents in the web server
(This used to be commit de0ac6a9d6f38f9c8067f974e3bdc1c9a164d638)
Diffstat (limited to 'source4/web_server')
-rw-r--r-- | source4/web_server/web_server.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/source4/web_server/web_server.c b/source4/web_server/web_server.c index 50a01db3d4..80e479d8a7 100644 --- a/source4/web_server/web_server.c +++ b/source4/web_server/web_server.c @@ -103,7 +103,10 @@ static void websrv_recv(struct stream_connection *conn, uint16_t flags) a blank line) and any post data, as indicated by the content_length */ if (web->input.end_of_headers && - web->input.partial.length == web->input.content_length) { + web->input.partial.length >= web->input.content_length) { + if (web->input.partial.length > web->input.content_length) { + web->input.partial.data[web->input.content_length] = 0; + } EVENT_FD_NOT_READABLE(web->conn->event.fde); http_process_input(web); } |