Skip to content

Commit

Permalink
[logindex] Handle parsing error related to empty string in referrer f…
Browse files Browse the repository at this point in the history
…ield
  • Loading branch information
lovett committed Nov 8, 2018
1 parent 16a6dc1 commit 8ee6fab
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions plugins/parse.py
Expand Up @@ -435,6 +435,10 @@ def parse_appengine(self, val):
if val.count('"') % 2 > 0:
val = '{}"'.format(val)

# Sanity check to avoid problems with an empty double-quoted
# string for the referrer field.
val = val.replace(' "" "', ' - "')

try:
fields = self.appengine_grammar.parseString(val).asDict()
except pp.ParseException as exception:
Expand Down

0 comments on commit 8ee6fab

Please sign in to comment.