Skip to content
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

common/ase/configuration_change_tftp.1.1.py does not sanitize tftp_config_file_name_prefix #10

Open
Link214FR opened this issue Jul 19, 2024 · 0 comments

Comments

@Link214FR
Copy link

Script common/ase/configuration_change_tftp.1.1.py does not sanitize tftp_config_file_name_prefix parameter.

If the parameter contains blank space (" ") for example it will fail because line 223 :
tftp_command = 'copy running-config tftp://%s/%s %s' % (tftp_server,
file_name,
tftp_format)
will generate an invalid command (copy run tftp://server/illegal file json) for example.
an easy fix is to sanitize the parameter with re()
sanitized_file_name_prefix = sub('[^A-Za-z0-9]','_',file_name_prefix )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant