Skip to content

Commit

Permalink
FIX: Check if paste is None before using it
Browse files Browse the repository at this point in the history
  • Loading branch information
d-Rickyy-b committed Feb 21, 2019
1 parent e257e4e commit 2fd7b39
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pastepwn/analyzers/regexanalyzer.py
Expand Up @@ -14,5 +14,8 @@ def __init__(self, actions, regex):

def match(self, paste):
"""Match the content of a paste via regex. Return true if regex matches"""
if paste is None:
return False

paste_content = paste.body or ""
return self.regex.search(paste_content) is not None

0 comments on commit 2fd7b39

Please sign in to comment.