Bug #1085

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

Added by Fulvio Scapin over 2 years ago. Updated over 2 years ago.

Status:Feedback Start date:12/09/2010
Priority:Normal Due date:
Assignee:- % Done:

100%

Category:Load Balancer
Target version:-
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.

Associated revisions

Revision 5ca559d2
Added by Jim P over 2 years ago

Use a slightly different regex to catch all non-whitespace characters here instead of the current method. Fixes #1085

History

#1 Updated by Chris Buechler over 2 years ago

  • Category set to Load Balancer

#2 Updated by Jim P over 2 years ago

  • Status changed from New to Feedback
  • % Done changed from 0 to 100

Also available in: Atom PDF