fix(ping): quote the destination and source in the ping command
ping() typed its arguments into the interactive shell as they came, so a destination such as "1.2.3.4; id" ran the command after the semicolon as the login user. destination and source now go through shlex.quote, and count, timeout, size and ttl are coerced with int(), which refuses anything that is not a number before a command is sent. The command is built in _ping.py, next to its parser, which keeps linux.py within its recorded length. Closes #55
This commit is contained in:
1 parent
5687f5d9a1
commit
c2d7c4d1b4
5 files changed
+51
-6
No files matched your search
@@ -21,7 +21,7 @@
|
||||
"napalm_linux.linux"
|
||||
],
|
||||
"python_file_lines": {
|
||||
"napalm_linux/linux.py": 2142
|
||||
"napalm_linux/linux.py": 2140
|
||||
},
|
||||
"untyped_public": []
|
||||
}
|
||||
Reference in new issue
Block a user