Project

General

Profile

Actions

Bug #1085

closed

Status: Load Balancer: Virtual Server fails to display a correct status for «some» "virtual server" names

Added by Fulvio Scapin almost 14 years ago. Updated about 10 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
Load Balancer
Target version:
-
Start date:
12/09/2010
Due date:
% Done:

100%

Estimated time:
Plus Target Version:
Release Notes:
Affected Version:
2.0
Affected Architecture:

Description

I've noticed how inserting characters like «-» in a virtual server name breaks the regex match on the output of «relayctl show redirects».
The aforementioned regex match is in the file /usr/local/www/status_lb_vs.php, inside the parse_redirects function

[...]
      $regs = array();
      if($x = preg_match("/^[0-9]+\s+redirect\s+([0-9a-zA-Z\.]+)\s+([a-z]+)/", $line, $regs)) {
        $vs[trim($regs[1])] = array();
[...]

It appears as though only the set of alphanumeric characters plus «.» is allowed, however the virtual server creation form validates names with additional characters, such as «-» above.

The result is a virtual server displaying an "unknown state", regardless of its actual condition.

Actions

Also available in: Atom PDF