]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: cache: Consider invalid Age values as stale
authorRemi Tricot-Le Breton <rlebreton@haproxy.com>
Thu, 3 Dec 2020 17:19:32 +0000 (18:19 +0100)
committerWilliam Lallemand <wlallemand@haproxy.org>
Fri, 4 Dec 2020 09:21:56 +0000 (10:21 +0100)
Do not store responses that have an invalid age header (non numerical,
negative ...).

src/cache.c

index e0560e57e188e90ca78ad623da4fe730cb1bdc13..df6bd3352e221f8bbd247b902c3ae36e55524d13 100644 (file)
@@ -897,6 +897,8 @@ enum act_return http_action_store_cache(struct act_rule *rule, struct proxy *px,
                        if (unlikely(object->age > true_maxage))
                                goto out;
                }
+               else
+                       goto out;
                http_remove_header(htx, &ctx);
        }