Permalink
Browse files

use strict regexes

  • Loading branch information...
1 parent 4907c60 commit 5906f5fd8ae5b8d270774c3f40861c4c5f14abb9 Attila Oláh committed Mar 27, 2013
Showing with 3 additions and 3 deletions.
  1. +2 −2 api/batch.py
  2. +1 −1 app.yaml
View
@@ -70,6 +70,6 @@ def put(self, batch_hash):
app = webapp.WSGIApplication([
- (r'^/batch/([0-9a-f]+)$', BatchUpload),
- (r'^/batch/([0-9a-f]+)(?:.(bz2|gz|z))?$', Batch),
+ (r'^/batch/([0-9a-f]{40})$', BatchUpload),
+ (r'^/batch/([0-9a-f]{40})(?:.(bz2|gz|z))?$', Batch),
])
View
@@ -17,5 +17,5 @@ libraries:
handlers:
-- url: /batch/(?:[a-z0-9]+)(?:.(?:bz2|gz|z))?
+- url: /batch/([a-z0-9]{40})(.(bz2|gz|z))?
script: api.batch.app

0 comments on commit 5906f5f

Please sign in to comment.