feat(wg-config): integrate shared validator into TunnelConfig + import flows#14
Merged
Conversation
…drop brittle count assertion
…t flows - TunnelConfig.parse: fail-closed via WgConfigValidator.validate before parsing - SetupViewModel.importConfig + SettingsViewModel.importConfigFromUri: replace naive [Interface] check with full validator, log rejects, i18n error - add setup_invalid_config string (de + en) - update TunnelConfigTest fixtures to keys that pass stricter validation
importConfig now runs WgConfigValidator (strict), so the old PrivateKey=abc/ PublicKey=xyz dummy config is rejected and the success path never fires. Swap to a fixture with valid 43+pad base64 keys (same as TunnelConfigTest).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Integrates the WgConfigValidator (1:1 Kotlin port of shared validateWgConfig) into the Android client:
TunnelConfig.parse: fail-closed viaWgConfigValidator.validatebefore parsingSetupViewModel.importConfig+SettingsViewModel.importConfigFromUri: replace naive[Interface]check with full validator, log rejects, surface i18n errorsetup_invalid_configstring (de + en)TunnelConfigTestfixtures to keys that pass the stricter validationPart of the cross-repo wg-config-validator rollout.