diff options
| author | Daniil Baturin <daniil@baturin.org> | 2018-09-11 12:59:53 +0200 |
|---|---|---|
| committer | Daniil Baturin <daniil@baturin.org> | 2018-09-11 12:59:53 +0200 |
| commit | 1af50ec84a39ef50c9ec5f17b2a7b4a1ce514b2a (patch) | |
| tree | d26b12a12a62a2e1039c091284c9a87354c58729 | |
| parent | 81f662f716dbc36129957cde5b97284e6e2f4181 (diff) | |
| download | vyos-1x-1af50ec84a39ef50c9ec5f17b2a7b4a1ce514b2a.tar.gz vyos-1x-1af50ec84a39ef50c9ec5f17b2a7b4a1ce514b2a.zip | |
Allow all characters except braces, quotes, and whitespace in "identifiers"
(bare strings that can be either node identifiers or leaf node values).
That's required for compatibility with old configs because old configs allow it,
for example, "pre-shared secret f%#$!@*&".
| -rw-r--r-- | debian/changelog | 6 | ||||
| -rw-r--r-- | parser/vyos1x_lexer.mll | 2 |
2 files changed, 7 insertions, 1 deletions
diff --git a/debian/changelog b/debian/changelog index cdfb586ba..27954ffc4 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +libvyosconfig0 (0.0.3) unstable; urgency=medium + + * Allow all characters except braces, quotes, and whitespace in identifiers. + + -- Daniil Baturin <daniil@baturin.org> Tue, 11 Sep 2018 12:57:39 +0200 + libvyosconfig0 (0.0.2) unstable; urgency=medium * Add support for node renaming. diff --git a/parser/vyos1x_lexer.mll b/parser/vyos1x_lexer.mll index 1969b914c..73bcd8368 100644 --- a/parser/vyos1x_lexer.mll +++ b/parser/vyos1x_lexer.mll @@ -66,7 +66,7 @@ rule token = parse { vy_inside_node := false; LEFT_BRACE } | '}' { vy_inside_node := false; RIGHT_BRACE } -| [^ ' ' '\t' '\n' '\r' '{' '}' '[' ']' ';' '#' '"' ''' ]+ as s +| [^ ' ' '\t' '\n' '\r' '{' '}' '"' ''' ]+ as s { vy_inside_node := true; IDENTIFIER s} | eof { EOF } |
