From cab6e738aa238d0c306d1824ba2bca034de6aac3 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 | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/check_domain_expiration_rdap.py b/check_domain_expiration_rdap.py index beb1995..933adad 100755 --- a/check_domain_expiration_rdap.py +++ b/check_domain_expiration_rdap.py @@ -255,8 +255,13 @@ def main(): ) domain = pyunycode.convert(args.domain) + # be sure that the provided server url ends with / for future concat + if (isinstance(args.server, str) and 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,