Page MenuHomeVyOS Platform

Investigate base64 validator decoding with validate=True
Open, NormalPublic

Description

AI agent identified this as an issue in PR 5702.

Reject non-base64 characters before rendering the secret.

src/validators/base64 decodes without validate=True, so it accepts aGVs"bG8= after discarding the quote. The configuration retains that quote. tsig.key.j2, Line 4, then emits secret "aGVs"bG8=";, which is malformed. Use strict base64 validation for this leaf. Keep valid values such as aGVsbG8= accepted.

Since the validator is used in multiple places, it needs to be assessed independently so that we don't have a side effect.

See: https://github.com/vyos/vyos-1x/pull/5702#discussion_r4762094603

Details

Version
rolling
Is it a breaking change?
Unspecified (possibly destroys the router)
Issue type
Bug (incorrect behavior)
Forum thread
https://github.com/vyos/vyos-1x/pull/5702#discussion_r4762094603