diff options
author | Erlang/OTP <[email protected]> | 2015-05-18 09:54:59 +0200 |
---|---|---|
committer | Erlang/OTP <[email protected]> | 2015-05-18 09:54:59 +0200 |
commit | 34a1d0da9beaaf77dd8ea71f3230c750c74ef88c (patch) | |
tree | 9bd9990bb4417dc5ad3cafce3fa083b325a53405 /lib | |
parent | efbfe9602983ff451b864e557bdf3733222b78ba (diff) | |
parent | b1e1dd967a4f929a239f8d26829304c03d43dcf9 (diff) | |
download | otp-34a1d0da9beaaf77dd8ea71f3230c750c74ef88c.tar.gz otp-34a1d0da9beaaf77dd8ea71f3230c750c74ef88c.tar.bz2 otp-34a1d0da9beaaf77dd8ea71f3230c750c74ef88c.zip |
Merge branch 'hans/inets/bad_content_length/OTP-12739' into maint-17
* hans/inets/bad_content_length/OTP-12739:
inets: reject negative content-length
Diffstat (limited to 'lib')
-rw-r--r-- | lib/inets/src/http_server/httpd_request.erl | 8 | ||||
-rw-r--r-- | lib/inets/vsn.mk | 2 |
2 files changed, 7 insertions, 3 deletions
diff --git a/lib/inets/src/http_server/httpd_request.erl b/lib/inets/src/http_server/httpd_request.erl index 6985065c3e..3ff07616f9 100644 --- a/lib/inets/src/http_server/httpd_request.erl +++ b/lib/inets/src/http_server/httpd_request.erl @@ -417,8 +417,12 @@ check_header({"content-length", Value}, Maxsizes) -> case length(Value) =< MaxLen of true -> try - _ = list_to_integer(Value), - ok + list_to_integer(Value) + of + I when I>= 0 -> + ok; + _ -> + {error, {size_error, Max, 411, "negative content-length"}} catch _:_ -> {error, {size_error, Max, 411, "content-length not an integer"}} end; diff --git a/lib/inets/vsn.mk b/lib/inets/vsn.mk index e9ecb2632a..ecb84e447c 100644 --- a/lib/inets/vsn.mk +++ b/lib/inets/vsn.mk @@ -18,6 +18,6 @@ # %CopyrightEnd% APPLICATION = inets -INETS_VSN = 5.10.7 +INETS_VSN = 5.10.8 PRE_VSN = APP_VSN = "$(APPLICATION)-$(INETS_VSN)$(PRE_VSN)" |