From c89fbe2e48afe88acf40d09398b8c5a286e9788d Mon Sep 17 00:00:00 2001 From: ARRABITO Luisa Date: Tue, 16 Sep 2025 15:25:30 +0200 Subject: [PATCH 1/2] fix: regular expression to get Diracx token --- src/DIRAC/Core/Security/DiracX.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/DIRAC/Core/Security/DiracX.py b/src/DIRAC/Core/Security/DiracX.py index 8e866dd28d7..341767e1dcf 100644 --- a/src/DIRAC/Core/Security/DiracX.py +++ b/src/DIRAC/Core/Security/DiracX.py @@ -40,7 +40,7 @@ PEM_BEGIN = "-----BEGIN DIRACX-----" PEM_END = "-----END DIRACX-----" -RE_DIRACX_PEM = re.compile(rf"{PEM_BEGIN}\n(.*)\n{PEM_END}", re.MULTILINE | re.DOTALL) +RE_DIRACX_PEM = re.compile(rf"{PEM_BEGIN}\n(.*?)\n{PEM_END}",re.DOTALL) @convertToReturnValue From 61891a76a32726be4d5b764f1d69de247bf167f9 Mon Sep 17 00:00:00 2001 From: ARRABITO Luisa Date: Tue, 16 Sep 2025 15:46:49 +0200 Subject: [PATCH 2/2] fix: to be compliant with pre-commit hooks --- src/DIRAC/Core/Security/DiracX.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/DIRAC/Core/Security/DiracX.py b/src/DIRAC/Core/Security/DiracX.py index 341767e1dcf..f5ff210fd23 100644 --- a/src/DIRAC/Core/Security/DiracX.py +++ b/src/DIRAC/Core/Security/DiracX.py @@ -40,7 +40,7 @@ PEM_BEGIN = "-----BEGIN DIRACX-----" PEM_END = "-----END DIRACX-----" -RE_DIRACX_PEM = re.compile(rf"{PEM_BEGIN}\n(.*?)\n{PEM_END}",re.DOTALL) +RE_DIRACX_PEM = re.compile(rf"{PEM_BEGIN}\n(.*?)\n{PEM_END}", re.DOTALL) @convertToReturnValue