diff roundup/cgi/actions.py @ 5162:3ee79a2d95d4

rename clean_url method to examine_url. the method doesn't realy clean anything, it throws a ValueError if it finds a problem
author John Rouillard <rouilj@ieee.org>
date Sat, 23 Jul 2016 15:22:06 -0400
parents 12190efa30d4
children 114d9628fd77
line wrap: on
line diff
--- a/roundup/cgi/actions.py	Sat Jul 23 14:00:49 2016 -0400
+++ b/roundup/cgi/actions.py	Sat Jul 23 15:22:06 2016 -0400
@@ -40,7 +40,7 @@
         self.permission()
         return self.handle()
 
-    def clean_url(self, url):
+    def examine_url(self, url):
         '''Return URL validated to be under self.base and properly escaped
 
         If url not properly escaped or validation fails raise ValueError.
@@ -822,7 +822,7 @@
         # Allow an option to stay on the page to create new things
         if '__redirect_to' in self.form:
             raise exceptions.Redirect('%s&@ok_message=%s'%(
-                self.clean_url(self.form['__redirect_to'].value),
+                self.examine_url(self.form['__redirect_to'].value),
                 urllib_.quote(messages)))
 
         # otherwise redirect to the new item's page
@@ -1141,7 +1141,7 @@
             #    This will be redefined if there is a login error to include
             #      a new error message
 
-            clean_url = self.clean_url(self.form['__came_from'].value)
+            clean_url = self.examine_url(self.form['__came_from'].value)
             redirect_url_tuple = urllib_.urlparse(clean_url)
             # now I have a tuple form for the __came_from url
             try:

Roundup Issue Tracker: http://roundup-tracker.org/