def matches_filter(finding, request):
 name = request.args.get('name', None)
 url = request.args.get('url', None)
 if ((name is not None) and (url is not None)):
  return ((name.lower() in finding.get_name().lower()) and (finding.get_url() is not None) and finding.get_url().url_string.startswith(url))
 elif (name is not None):
  return (name.lower() in finding.get_name().lower())
 elif (url is not None):
  return ((finding.get_url() is not None) and finding.get_url().url_string.startswith(url))
 return True

def matches_filter ( finding , request ) : name = request . args . get ( 'name' , None ) url = request . args . get ( 'url' , None ) if ( ( name is not None ) and ( url is not None ) ) : return ( ( name . lower ( ) in finding . get_name ( ) . lower ( ) ) and ( finding . get_url ( ) is not None ) and finding . get_url ( ) . url_string . startswith ( url ) ) elif ( name is not None ) : return ( name . lower ( ) in finding . get_name ( ) . lower ( ) ) elif ( url is not None ) : return ( ( finding . get_url ( ) is not None ) and finding . get_url ( ) . url_string . startswith ( url ) ) return True
filters: * /scans/0/kb/?name= returns only vulnerabilities which contain the specified string in the vulnerability name .