diff options
author | Anders Lind <anders.lind@gmail.com> | 2016-03-01 20:26:41 +0100 |
---|---|---|
committer | Anders Lind <anders.lind@gmail.com> | 2016-03-01 20:26:41 +0100 |
commit | 5e422c880d7de319886b4ce84508185a925f5ef1 (patch) | |
tree | 63779ea52a3e12304a9853b8dbc996fe870ecafa /src/usr | |
parent | a7d60d26331e80e04a571dabc992ca3f54857d3b (diff) | |
download | pfsense-5e422c880d7de319886b4ce84508185a925f5ef1.zip pfsense-5e422c880d7de319886b4ce84508185a925f5ef1.tar.gz |
Fix substr mistake
Made a silly mistake and overlooked an important difference between javascript substring() and php substr().
Tightened regex check for octal value.
Diffstat (limited to 'src/usr')
-rw-r--r-- | src/usr/local/sbin/prefixes.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/usr/local/sbin/prefixes.php b/src/usr/local/sbin/prefixes.php index 048fc11..8ad1ec4 100644 --- a/src/usr/local/sbin/prefixes.php +++ b/src/usr/local/sbin/prefixes.php @@ -119,7 +119,7 @@ function extract_duid($ia_string) { continue; } else if ($len - $i >= 4) { - if (preg_match('/[0-7]{3}/', substr($ia_string, $i+1, $i+4))) { + if (preg_match('/[0-3][0-7]{2}/', substr($ia_string, $i+1, 3))) { $i += 3; continue; } |