-
Notifications
You must be signed in to change notification settings - Fork 381
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
T6173: Fix build error when "--version" value contains "/" #543
T6173: Fix build error when "--version" value contains "/" #543
Conversation
Why do not use _ in the image version initially? |
I just discovered this bug accidentally and thought, why not fix it, since it is easy to fix. |
I'd probably add |
I don't seems to see any |
A verification function should be added. for character in ['/', '~']:
if character in version_data["version"]:
exit(f'Version contains invalid character: {character}') |
Maybe just use a regex to disallow anything except |
What characters should be allowed by --version? In my tests,
Why should other characters be blocked if it does not cause a build error? |
Regular software engineering paranoia on operating systems. ~ marks the Linux home. Is there any reason to have a ~ in the version file or anything other then in |
Note that version_name is the default image_name during add/install, which has its own validation: |
@rts-kotori thank you for pointing this out. This is now superseeded by #553 |
Change Summary
Types of changes
Related Task(s)
Component(s) name
vyos-build-image
scriptProposed changes
Instead of not checking for any
/
in the--version
string, it now replaces/
to_
so that the copy image step does not throw any errorHow to test
I have ran the build script after applying the changes to the build script, and confirmed that it fixes the issue stated above.
Checklist: