def returnToMatches(allowed_return_to_urls, return_to):
 for allowed_return_to in allowed_return_to_urls:
  return_realm = TrustRoot.parse(allowed_return_to)
  if ((return_realm is not None) and (not return_realm.wildcard) and return_realm.validateURL(return_to)):
   return True
 return False

def returnToMatches ( allowed_return_to_urls , return_to ) : for allowed_return_to in allowed_return_to_urls : return_realm = TrustRoot . parse ( allowed_return_to ) if ( ( return_realm is not None ) and ( not return_realm . wildcard ) and return_realm . validateURL ( return_to ) ) : return True return False
is the return_to url under one of the supplied allowed return_to urls? @since: 2 .