BUG: Unescaped left brace in regex is illegal here in regex; marked by <-- HERE in m/^(http|https)://%{ <-- HERE HTTP_HOST}(/.*)$/ at /usr/share/webmin/virtual-server/list_redirects.cgi line 20

SYSTEM INFORMATION
OS type and version Ubuntu 18.04.6
Webmin version 2.001
Virtualmin version 7.3-1 PRO
Related packages SUGGESTED

This has just started happening.

Can you advise please as I cannot find a file called list_redirects.cgi

Hello,

find /usr/share -name list_redirects.cgi

This is a known and a solved issue:

Hello,

Thank you for this.
I have hacked the two files and amended to escape the braces.

I assume this is fixed in the next release.

Cheers
Spart

How do I get this fix as I don’t see it in my current version. Also my error path is different

500 -
Unescaped left brace in regex is illegal here in regex; marked by ← HERE in m/^(http|https)://%{ ← HERE HTTP_HOST}(/.*)$/ at /usr/libexec/webmin/virtual-server/list_redirects.cgi line 20.

SYSTEM INFORMATION
OS type and version AlmaLinux 8.7
Webmin version 2.001
Usermin version 1.860
Virtualmin version 7.3 Pro
Theme version 20.01.1:5
Package updates All installed packages are up to date

Edit line 20 in /usr/libexec/webmin/virtual-server/list_redirects.cgi to

 $dest =~ /^(http|https):\/\/%\{HTTP_HOST\}(\/.*)$/) {

Two extra backslashes inserted.
{HTTP_HOST} edited to \{HTTP_HOST\}

Thanks, just to tidy up for anyone else reading this thread you’ll also need to add the same escapes in line 39 of /usr/libexec/webmin/virtual-server/edit_redirects.cgi. Thus it becomes as below

 $r->{'dest'} =~ /^(http|https):\/\/%\{HTTP_HOST\}(\/.*)$/) {

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.