[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [onionperf/master] Add path validation to filter interface
commit 1a81b3dff756cf197d661f931485443d1454c7c4
Author: Ana Custura <ana@xxxxxxxxxxxxxx>
Date: Fri Aug 21 01:38:01 2020 +0100
Add path validation to filter interface
---
onionperf/onionperf | 3 +++
1 file changed, 3 insertions(+)
diff --git a/onionperf/onionperf b/onionperf/onionperf
index b1e7bd3..96c6869 100755
--- a/onionperf/onionperf
+++ b/onionperf/onionperf
@@ -439,6 +439,9 @@ def analyze(args):
def filter(args):
from onionperf.filtering import Filtering
+ p = os.path.abspath(os.path.expanduser(args.input))
+ if not os.path.exists(p):
+ raise argparse.ArgumentTypeError("path '%s' does not exist" % args.input)
filtering = Filtering()
filtering.read_input(args.input)
if args.include_fingerprints is not None:
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits