diff options
author | Matthew Holt <mholt@users.noreply.github.com> | 2021-05-11 15:26:07 -0600 |
---|---|---|
committer | Matthew Holt <mholt@users.noreply.github.com> | 2021-05-11 15:26:07 -0600 |
commit | dbe164d98a58e8b0dbf3fed26e4e9bb6f668a9e2 (patch) | |
tree | 16252c8c08a262e824741daf9a837f847646b9fa /caddyconfig/httpcaddyfile | |
parent | bc2210247861340c644d9825ac2b2860f8c6e12a (diff) |
httpcaddyfile: Fix automation policy consolidation again (fix #4161)
Also fix a previous test that asserted incorrect behavior.
Diffstat (limited to 'caddyconfig/httpcaddyfile')
-rw-r--r-- | caddyconfig/httpcaddyfile/tlsapp.go | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/caddyconfig/httpcaddyfile/tlsapp.go b/caddyconfig/httpcaddyfile/tlsapp.go index c4af8e4..2510a9b 100644 --- a/caddyconfig/httpcaddyfile/tlsapp.go +++ b/caddyconfig/httpcaddyfile/tlsapp.go @@ -510,7 +510,10 @@ outer: // if they're exactly equal in every way, just keep one of them if reflect.DeepEqual(aps[i], aps[j]) { aps = append(aps[:j], aps[j+1:]...) - break + // must re-evaluate current i against next j; can't skip it! + // even if i decrements to -1, will be incremented to 0 immediately + i-- + continue outer } // if the policy is the same, we can keep just one, but we have |