Skip to content

Commit

Permalink
Merge pull request #23 from tarunbhardwaj/operation_404
Browse files Browse the repository at this point in the history
abort(404) if operation type not allowed
  • Loading branch information
prakashpp committed Sep 7, 2015
2 parents 52faf77 + 2b93c86 commit 87f9e50
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion static_file.py
Expand Up @@ -218,7 +218,8 @@ def _transform_static_file(self, commands, extension, filename):

for command in commands.split('/'):
operation, params = parse_command(command)
assert operation in self.allowed_operations
if operation not in self.allowed_operations:
abort(404)
image_file = getattr(self, operation)(image_file, **params)

image_file.save(filename)
Expand Down

0 comments on commit 87f9e50

Please sign in to comment.