From cd483779b9f4d98c932059e124cf985e3cc8ab58 Mon Sep 17 00:00:00 2001 From: Andy Loftus Date: Sun, 14 Jan 2024 07:48:42 +0000 Subject: [PATCH] sanitize_val retains dash --- jiracmdline/libjira.py | 1 + jiracmdline/libweb.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/jiracmdline/libjira.py b/jiracmdline/libjira.py index 53389fa..0ea2c47 100644 --- a/jiracmdline/libjira.py +++ b/jiracmdline/libjira.py @@ -39,6 +39,7 @@ def jira_login( token=None, username=None, passwd=None ): else: logr.debug( f'Login using usr/pwd from .netrc' ) params[ 'basic_auth' ] = ( login, pwd ) + raw_connection = None try: raw_connection = jira.JIRA( **params ) except jira.exceptions.JIRAError as e: diff --git a/jiracmdline/libweb.py b/jiracmdline/libweb.py index aedc9af..d7dc4f6 100644 --- a/jiracmdline/libweb.py +++ b/jiracmdline/libweb.py @@ -7,7 +7,7 @@ def sanitize_key( key ): def sanitize_val( val ): temp = re.sub( ',', ' ', val ) - return re.sub( '[^\r\n a-zA-Z0-9_()-+/]', '', temp ) + return re.sub( '[^\r\n a-zA-Z0-9_()+/-]', '', temp ) def sanitize_dict( dirty ):