subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From danie...@apache.org
Subject svn commit: r1721175 - /subversion/trunk/tools/backup/hot-backup.py.in
Date Mon, 21 Dec 2015 15:01:22 GMT
Author: danielsh
Date: Mon Dec 21 15:01:22 2015
New Revision: 1721175

URL: http://svn.apache.org/viewvc?rev=1721175&view=rev
Log:
hot-backup.py: Input validation.

* tools/backup/hot-backup.py.in: Error out on unknown values.

Modified:
    subversion/trunk/tools/backup/hot-backup.py.in

Modified: subversion/trunk/tools/backup/hot-backup.py.in
URL: http://svn.apache.org/viewvc/subversion/trunk/tools/backup/hot-backup.py.in?rev=1721175&r1=1721174&r2=1721175&view=diff
==============================================================================
--- subversion/trunk/tools/backup/hot-backup.py.in (original)
+++ subversion/trunk/tools/backup/hot-backup.py.in Mon Dec 21 15:01:22 2015
@@ -137,6 +137,11 @@ for o, a in opts:
     usage()
     sys.exit()
 
+if archive_type not in (None, 'bz2', 'gz', 'zip', 'zip64'):
+  sys.stderr.write("ERROR: Bad --archive-type\n")
+  usage(sys.stderr)
+  sys.exit(2)
+
 if len(args) != 2:
   sys.stderr.write("ERROR: only two arguments allowed.\n\n")
   sys.stderr.flush()



Mime
View raw message