From bb37f2f55a391e9c89220150f53d6aae678f6ce1 Mon Sep 17 00:00:00 2001 From: Alarig Le Lay Date: Sun, 28 Jul 2024 09:58:35 +0200 Subject: [PATCH] be sure that the provided server url ends with / for future concat Signed-off-by: Alarig Le Lay --- check_domain_expiration_rdap.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/check_domain_expiration_rdap.py b/check_domain_expiration_rdap.py index beb1995..631746b 100755 --- a/check_domain_expiration_rdap.py +++ b/check_domain_expiration_rdap.py @@ -255,8 +255,14 @@ def main(): ) domain = pyunycode.convert(args.domain) + # be sure that the provided server url ends with / for future concat + if args.server is not None: + if args.server[-1] != '/': + server = args.server + '/' + else: + server = args.server check = nagiosplugin.Check( - Expiration(domain, args.server), + Expiration(domain, server), nagiosplugin.ScalarContext( 'daystoexpiration', warning=wrange,