diff --git a/CHANGELOG.md b/CHANGELOG.md index e235bb554..ecb8cdeb8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -38,6 +38,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/). - Fixed jwk alg confusion [PR #1329](https://github.com/3scale/APIcast/pull/1329) [THREESCALE-8249](https://issues.redhat.com/browse/THREESCALE-8249) - Fixed issue with resolving target server hostnames to IP when using CONNECT method [PR #1323](https://github.com/3scale/APIcast/pull/1323) [THREESCALE-7967](https://issues.redhat.com/browse/THREESCALE-7967) - Fixed issue with resolving target server hostnames to IPs when forwarding requests through http/s proxy [PR #1323](https://github.com/3scale/APIcast/pull/1323) [THREESCALE-7967](https://issues.redhat.com/browse/THREESCALE-7967) +- Fixed dirty context [PR #1328](https://github.com/3scale/APIcast/pull/1328) [THREESCALE-8000](https://issues.redhat.com/browse/THREESCALE-8000) [THREESCALE-8007](https://issues.redhat.com/browse/THREESCALE-8007) [THREESCALE-8252](https://issues.redhat.com/browse/THREESCALE-8252) +- Fixed dirty context (part 2 of PR #1328) when tls termination policy is in the policy chain [PR #1333](https://github.com/3scale/APIcast/pull/1333) ### Added diff --git a/gateway/src/apicast/policy/tls/tls.lua b/gateway/src/apicast/policy/tls/tls.lua index 0874e0540..8c0d14c03 100644 --- a/gateway/src/apicast/policy/tls/tls.lua +++ b/gateway/src/apicast/policy/tls/tls.lua @@ -191,7 +191,6 @@ function _M:ssl_certificate() for _, cert in ipairs(self.certificates) do if set_certificate(cert) then -- Certificate is set correctly, use this one and end the loop. - ngx.exit(ngx.OK) break end end diff --git a/spec/policy/tls/tls_spec.lua b/spec/policy/tls/tls_spec.lua index c3cbed106..90cb784b1 100644 --- a/spec/policy/tls/tls_spec.lua +++ b/spec/policy/tls/tls_spec.lua @@ -5,6 +5,7 @@ local function assert_certificate_set() assert.spy(ssl.clear_certs).was_called() assert.spy(ssl.set_cert).was_called() assert.spy(ssl.set_priv_key).was_called() + assert.spy(ngx.exit).was_not_called() end describe('tls policy', function() @@ -13,6 +14,7 @@ describe('tls policy', function() stub.new(ssl, 'clear_certs', function() return true, nil end) stub.new(ssl, 'set_cert', function() return true, nil end) stub.new(ssl, 'set_priv_key', function() return true, nil end) + stub.new(ngx, 'exit', function() return true end) end) describe('.new', function()