Page MenuHomePhabricator

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?
Perfectly compatible

Event Timeline

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

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.

pasik added a subscriber: pasik.Nov 14 2019, 9:45 AM
jestabro closed this task as Resolved.Mon, Nov 18, 9:12 PM
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.

jestabro reopened this task as In progress.Tue, Nov 26, 4:13 PM

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

jestabro closed this task as Resolved.Tue, Dec 3, 7:10 PM