--- dialog/misc/ajax.js
+++ dialog/misc/ajax.js
@@ -619,7 +619,7 @@
    * Command to set the window.location, redirecting the browser.
    */
   redirect: function (ajax, response, status) {
-    window.location.href = data.url;
+    window.location.href = response.url;
   },
 
   /**
