From d3acecdf129cd940f8b2d1b229a6e2a343cab74b Mon Sep 17 00:00:00 2001 From: zsdc Date: Thu, 6 Jun 2024 23:04:51 +0300 Subject: grub: T6453: Fixed GRUB variables parsing To parse variables with `=` a variable name should be limited by alphanumerical characters only. --- python/vyos/system/grub.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'python/vyos/system') diff --git a/python/vyos/system/grub.py b/python/vyos/system/grub.py index faf68c2d1..daddb799a 100644 --- a/python/vyos/system/grub.py +++ b/python/vyos/system/grub.py @@ -49,7 +49,7 @@ TMPL_GRUB_COMMON: str = 'grub/grub_common.j2' BOOT_OPTS_STEM: str = 'boot=live rootdelay=5 noautologin net.ifnames=0 biosdevname=0 vyos-union=/boot/' # prepare regexes -REGEX_GRUB_VARS: str = r'^set (?P.+)=[\'"]?(?P.*)(?\w+)=[\'"]?(?P.*)(?.+)$' REGEX_KERNEL_CMDLINE: str = r'^BOOT_IMAGE=/(?Pboot|live)/((?P.+)/)?vmlinuz.*$' REGEX_GRUB_BOOT_OPTS: str = r'^\s*set boot_opts="(?P[^$]+)"$' -- cgit v1.2.3