Skip to content

Commit

Permalink
Fixed Python regular expression warning
Browse files Browse the repository at this point in the history
  • Loading branch information
maxirmx committed Oct 27, 2023
1 parent cf2df1d commit 3717432
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/tests/cli_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -3076,10 +3076,10 @@ def test_core_dumps(self):
def test_backend_version(self):
BOTAN_BACKEND_VERSION = r'(?s)^.*.' \
'Backend: Botan.*' \
'Backend version: ([a-zA-z\.0-9]+).*$'
'Backend version: ([a-zA-z\\.0-9]+).*$'

Check warning

Code scanning / CodeQL

Overly permissive regular expression range Medium test

Suspicious character range that overlaps with a-z in the same character class, and is equivalent to [A-Z[]^_`a-z].
OPENSSL_BACKEND_VERSION = r'(?s)^.*' \
'Backend: OpenSSL.*' \
'Backend version: ([a-zA-z\.0-9]+).*$'
'Backend version: ([a-zA-z\\.0-9]+).*$'

Check warning

Code scanning / CodeQL

Overly permissive regular expression range Medium test

Suspicious character range that overlaps with a-z in the same character class, and is equivalent to [A-Z[]^_`a-z].
# Run without parameters and make sure it matches
ret, out, _ = run_proc(RNP, [])
self.assertNotEqual(ret, 0)
Expand Down

0 comments on commit 3717432

Please sign in to comment.