From: Michal 'vorner' Vaner Date: Fri, 17 May 2013 09:24:20 +0000 (+0200) Subject: [2937] Parse CSV in strict mode X-Git-Tag: bind10-1.2.0beta1-release~445^2~3 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=4bc06a779cbe53dd5ad91ef4fe0c0262e430f03e;p=thirdparty%2Fkea.git [2937] Parse CSV in strict mode Don't accept invalid inputs. It seems some versions of the csv library rejected this before, but some didn't. Making sure all of them reject now, to get more reliable operation and consistent behavior. --- diff --git a/src/bin/usermgr/b10-cmdctl-usermgr.py.in b/src/bin/usermgr/b10-cmdctl-usermgr.py.in index 37be304d23..b0fd30f8a0 100755 --- a/src/bin/usermgr/b10-cmdctl-usermgr.py.in +++ b/src/bin/usermgr/b10-cmdctl-usermgr.py.in @@ -75,7 +75,7 @@ class UserManager: # Just let any file read error bubble up; it will # be caught in the run() method with open(self.options.output_file, newline='') as csvfile: - reader = csv.reader(csvfile) + reader = csv.reader(csvfile, strict=True) for row in reader: self.user_info[row[0]] = row