Skip to content

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

@Link214FR

Description

@Link214FR

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 )

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions