Skip to content

Commit

Permalink
filter non-v1 protocols on access log parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
notmyname committed Feb 16, 2015
1 parent 06c58c4 commit e3a4de5
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions slogging/access_processor.py
Expand Up @@ -104,6 +104,14 @@ def log_line_parser(self, raw_log):
self.logger.debug(_('Invalid path: %(error)s from data: %(log)s') %
{'error': e, 'log': repr(raw_log)})
return {}
if version != 'v1':
# "In the wild" places this can be caught are with auth systems
# that use the same endpoint as the rest of the Swift API (eg
# tempauth or swauth). But if the Swift API ever does change, this
# protects that too.
self.logger.debug(_('Unexpected Swift version string: found ' \
'"%s" expected "v1"') % version)
return {}
if container_name is not None:
container_name = container_name.split('?', 1)[0]
if object_name is not None:
Expand Down

0 comments on commit e3a4de5

Please sign in to comment.