def Redirect(self, destination, URL1):
     # Utility function to allow user-controlled redirects.
     # No docstring please, we do not want an open redirect
     # available as url.
     if destination.find('//') >= 0:
         raise RedirectException(destination)
     raise RedirectException("%s/%s" % (URL1, destination))
예제 #2
0
 def Redirect(self, destination, URL1):
     """Utility function to allow user-controlled redirects"""
     if destination.find('//') >= 0:
         raise RedirectException(destination)
     raise RedirectException("%s/%s" % (URL1, destination))