Package: hash-slinger
Version: 3.1-1.2
Severity: normal
Tags: patch
Running /usr/bin/tla Python 3.13 about escaped sequences.
For example \d is treated as a Unicode escape character if not used in a raw
string.
Using raw strings solves the issue.
Fixed in master:
https://github.com/letoams/hash-slinger/pull/48
I attach a patch that solves this issue in hash-slinger 3.1-1.2.
-- System Information:
Debian Release: 13.1
APT prefers stable-updates
APT policy: (500, 'stable-updates'), (500, 'stable-security'), (500, 'stable')
Architecture: amd64 (x86_64)
Kernel: Linux 6.12.48+deb13-amd64 (SMP w/4 CPU threads; PREEMPT)
Locale: LANG=C.UTF-8, LC_CTYPE=C.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
Versions of packages hash-slinger depends on:
ii ca-certificates 20250419
ii dns-root-data 2024071801
ii openssh-client 1:10.0p1-7
ii python3 3.13.5-1
ii python3-dnspython 2.7.0-1
ii python3-gnupg 0.5.4-1
ii python3-m2crypto 0.42.0-3
ii python3-unbound 1.22.0-2
hash-slinger recommends no packages.
hash-slinger suggests no packages.
-- no debconf information
--- /usr/bin/tlsa.ORIG 2023-10-05 00:00:00.000000000 +0200
+++ /usr/bin/tlsa 2025-10-17 09:16:28.584236665 +0200
@@ -495,7 +495,7 @@
"""When instanciated, this class contains all the fields of a TLSA
record.
"""
def __init__(self, name, usage, selector, mtype, cert):
- """name is the name of the RR in the format:
/^(_\d{1,5}|\*)\._(tcp|udp|sctp)\.([a-z0-9]*\.){2,}$/
+ r"""name is the name of the RR in the format:
/^(_\d{1,5}|\*)\._(tcp|udp|sctp)\.([a-z0-9]*\.){2,}$/
usage, selector and mtype should be an integer
cert should be a hexidecimal string representing the
certificate to be matched field
"""
@@ -513,7 +513,7 @@
def getRecord(self, generic=False):
"""Returns the RR string of this TLSARecord, either in rfc
(default) or generic format"""
if generic:
- return '%s IN TYPE52 \# %s %s%s%s%s' % (self.name,
(len(self.cert)//2)+3 , self._toHex(self.usage), self._toHex(self.selector),
self._toHex(self.mtype), self.cert)
+ return r'%s IN TYPE52 \# %s %s%s%s%s' % (self.name,
(len(self.cert)//2)+3 , self._toHex(self.usage), self._toHex(self.selector),
self._toHex(self.mtype), self.cert)
return '%s IN TLSA %s %s %s %s' % (self.name, self.usage,
self.selector, self.mtype, self.cert)
def _toHex(self, val):
@@ -554,20 +554,20 @@
def isNameValid(self):
"""Check if the name if in the correct format"""
- if not
re.match('^(_\d{1,5}|\*)\._(tcp|udp|sctp)\.([-a-z0-9]*\.){2,}$', self.name):
+ if not
re.match(r'^(_\d{1,5}|\*)\._(tcp|udp|sctp)\.([-a-z0-9]*\.){2,}$', self.name):
return False
return True
def getProtocol(self):
"""Returns the protocol based on the name"""
- return re.split('\.', self.name)[1][1:]
+ return re.split(r'\.', self.name)[1][1:]
def getPort(self):
"""Returns the port based on the name"""
- if re.split('\.', self.name)[0][0] == '*':
+ if re.split(r'\.', self.name)[0][0] == '*':
return '*'
else:
- return re.split('\.', self.name)[0][1:]
+ return re.split(r'\.', self.name)[0][1:]
class ARecord:
"""An object representing an A Record (IPv4 address)"""