Skip to content

Commit

Permalink
Prevent user from using a single quote in an AS path (see #81).
Browse files Browse the repository at this point in the history
  • Loading branch information
gmazoyer committed Aug 5, 2019
1 parent 2131cdd commit 439f7fd
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions includes/utils.php
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,12 @@ function match_aspath_regexp($aspath_regexp) {
return false;
}

// AS path containing a ' (not a valid character, the string is automatically
// quoted if needed)
if (strpos($aspath_regexp, '\'') !== false) {
return false;
}

// Check if the AS path regexp in in the list of regexp considered as
// invalid (see config option)
foreach ($config['filters']['aspath_regexp'] as $invalid_aspath_regexp) {
Expand Down

0 comments on commit 439f7fd

Please sign in to comment.