From 2b7efbd03295f8a345b63acd212e22cb5a3d19df Mon Sep 17 00:00:00 2001 From: Viktor Dukhovni Date: Mon, 15 Jul 2019 13:12:04 -0400 Subject: Actually silently ignore GET / OCSP requests Reviewed-by: Matt Caswell --- apps/ocsp.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/apps/ocsp.c b/apps/ocsp.c index 066a2e43af..5d23918169 100644 --- a/apps/ocsp.c +++ b/apps/ocsp.c @@ -1416,9 +1416,11 @@ static int do_responder(OCSP_REQUEST **preq, BIO **pcbio, BIO *acbio, *q = '\0'; /* - * Skip "GET / HTTP..." requests often used by load-balancers + * Skip "GET / HTTP..." requests often used by load-balancers. Note: + * 'p' was incremented above to point to the first byte *after* the + * leading slash, so with 'GET / ' it is now an empty string. */ - if (p[1] == '\0') + if (p[0] == '\0') goto out; len = urldecode(p); -- cgit v1.2.3