Skip to content

Commit 199f182

Browse files
authored
Merge pull request #296 from cloudfoundry/haproxy-2-5-7
HAProxy 2.5.7 and `h1-accept-payload-with-any-method`
2 parents 395ab49 + 9c57025 commit 199f182

File tree

7 files changed

+26
-34
lines changed

7 files changed

+26
-34
lines changed

ci/release_notes.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,10 @@
33

44
# New Features
55
- socat is directly executable due to a symlink
6+
- expose `h1-accept-payload-with-any-method` as `ha_proxy.always_allow_body_http10`
67

78
# Upgrades
8-
- None
9+
- HAProxy 2.5.4 -> 2.5.7
910

1011
# Acknowledgements
1112

config/blobs.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
haproxy/haproxy-2.5.4.tar.gz:
2-
size: 3819082
3-
object_id: 8b4e411e-1726-45ba-4d57-8f2a23df8d58
4-
sha: sha256:dc4015d85c7fef811b459803b763001d809b07a9251dc1864fedb9a07b44aefb
1+
haproxy/haproxy-2.5.7.tar.gz:
2+
size: 3832801
3+
object_id: 7427e80b-f2b1-4d20-6176-644309b53c63
4+
sha: sha256:e29f6334c6bdb521f63ddf335e2621bd2164503b99cf1f495b6f56ff9f3c164e
55
haproxy/hatop:
66
size: 72445
77
object_id: 17a5f66c-bbc1-4e4d-681c-e36420d3e0f5

haproxy-patches/disable-http10-body-in-get-request.patch

Lines changed: 0 additions & 27 deletions
This file was deleted.

jobs/haproxy/spec

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -677,3 +677,6 @@ properties:
677677
ha_proxy.enable_http2:
678678
description: Enables ingress (frontend) and egress (backend) HTTP/2 ALPN negotiation. Egress (backend) HTTP protocol version may be overriden by `ha_proxy.backend_ssl`, `ha_proxy.disable_backend_http2_websockets` and `ha_proxy.backend_match_http_protocol`.
679679
default: false
680+
ha_proxy.always_allow_body_http10:
681+
description: Always allow a body to be sent when using HTTP/1.0. By default HAProxy denies GET/HEAD/DELETE requests with a body when using HTTP/1.0 due to potential request smuggling attacks. See https://github.com/haproxy/haproxy/commit/e136bd12a32970bc90d862d5fe09ea1952b62974
682+
default: false

jobs/haproxy/templates/haproxy.config.erb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -276,6 +276,9 @@ global
276276
<%- if backend_match_http_protocol && backends.length == 2 -%>
277277
set-var proc.h2_alpn_tag str(h2)
278278
<%- end -%>
279+
<%- if p("ha_proxy.always_allow_body_http10") %>
280+
h1-accept-payload-with-any-method
281+
<%- end %>
279282

280283
defaults
281284
log global

packages/haproxy/packaging

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ PCRE_VERSION=10.40
1010
# http://www.dest-unreach.org/socat/download/socat-1.7.4.1.tar.gz
1111
SOCAT_VERSION=1.7.4.1
1212

13-
# http://www.haproxy.org/download/2.5/src/haproxy-2.5.4.tar.gz
14-
HAPROXY_VERSION=2.5.4
13+
# https://www.haproxy.org/download/2.5/src/haproxy-2.5.7.tar.gz
14+
HAPROXY_VERSION=2.5.7
1515

1616
mkdir ${BOSH_INSTALL_TARGET}/bin
1717

spec/haproxy/templates/haproxy_config/global_and_default_options_spec.rb

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -491,4 +491,16 @@
491491
expect(defaults).to include('option allbackups')
492492
end
493493
end
494+
495+
context 'when ha_proxy.always_allow_body_http10 is true' do
496+
let(:properties) do
497+
{
498+
'always_allow_body_http10' => true
499+
}
500+
end
501+
502+
it 'sets the global option' do
503+
expect(global).to include('h1-accept-payload-with-any-method')
504+
end
505+
end
494506
end

0 commit comments

Comments
 (0)