diff --git a/qubes/vm/mix/net.py b/qubes/vm/mix/net.py index 258e685a1..ad8cf133a 100644 --- a/qubes/vm/mix/net.py +++ b/qubes/vm/mix/net.py @@ -38,7 +38,7 @@ def _setter_mac(self, prop, value): if not isinstance(value, str): raise ValueError('MAC address must be a string') value = value.lower() - if re.match(r"^([0-9a-f][0-9a-f]:){5}[0-9a-f][0-9a-f]$", value) is None: + if re.match(r"\A([0-9a-f][0-9a-f]:){5}[0-9a-f][0-9a-f]\Z", value) is None: raise ValueError('Invalid MAC address value') return value