Page MenuHomeVyOS Platform

Add validation to reject whitespace in tag node value names
Closed, ResolvedPublicBUG

Description

As was reported in T4628, whitespace in the tag node value name of " ... authentication public-keys" caused an error on migration. The immediate cause was clear: whitepsace in tag node value names was accepted by the legacy backend, however, config_tree, as used by migration scripts, did not quote the value in the output of to_string(), hence a subsequent read would fail.

It was discussed at the time whether whitespace should ever be allowed in tag node value names, since it is not allowed in node names in general; the consensus was that is should always be disallowed. Closer inspection of the problem revealed that one could not 'migrate away' whitespace, as it's presence disallows manipulation by standard migration techniques, even if the output is quoted in to_string. The conclusion was to add a global validator within cstore while the legacy backend is still in use; it will be a non-issue once the legacy code is retired.

Details

Difficulty level
Normal (likely a few hours)
Version
vyos-1.4
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Stricter validation
Issue type
Bug (incorrect behavior)