Page MenuHomeVyOS Platform

Unescaped backslashes in config values cause configuration failure
Closed, ResolvedPublicBUG

Description

The output of cli-shell-api showCfg does not escape backslashes, however, libvyosconfig requires an input string with backslashes escaped. With the optimization made by [T1758: Switch vyos.config to libvyosconfig], care should be taken for the possibility of unescaped backslashes in config values.

Details

Difficulty level
Unknown (require assessment)
Version
1.2-rolling, 1.3
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Unspecified (possibly destroys the router)
Issue type
Bug (incorrect behavior)

Event Timeline

jestabro changed the task status from Open to In progress.Nov 12 2019, 10:01 PM
jestabro triaged this task as Normal priority.

In PR https://github.com/vyos/vyos-1x/pull/162, util.py is pulled in to the nosetests path; T1804 will need to be closed before merging.

jestabro moved this task from Need Triage to Finished on the VyOS 1.3 Equuleus board.

I tested https://phabricator.vyos.net/T1787 for @c-po with the following results. He asked me to write down this here in the parent task.

Test1 (ok):
Update from V1.2.3-LTS on Hyper-V in the lab to vyos-1.2-rolling-201911180217 is ok (with the login banner and the backslashes)

Test2 (failed):
vyos-1.2-rolling-201908130337 on AWS direct update to vyos-1.2-rolling-201911200217 -> same 'Configuration error' as before. The I reverted to the snapshot before, deleted the login banner line out of the config, update again, the update is successfull.

The merged fix addressed the problem as it occurs in configuration mode, however, the same issue can occur during the running of migration scripts. A solution to cover all cases has been tested, and is pending.

The general solution has been merged into vyos-1x.

erkin set Issue type to Bug (incorrect behavior).Aug 31 2021, 6:19 PM