about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorJosh Rickmar <jrick@devio.us>2012-08-31 13:13:20 -0400
committerJosh Rickmar <jrick@devio.us>2012-08-31 13:13:20 -0400
commit100e71afe87bf87ec9565f0bbe93ff5656728f02 (patch)
tree020e457070cd95cef12b289a2f63f2d205b1f79d
parent3ddd0a34bcf01f767494e81796250735b3f2ae9b (diff)
downloadxombrero-100e71afe87bf87ec9565f0bbe93ff5656728f02.tar.gz
Make custom URI handling work again
This changes the order custom and invalid URI checking so that items
set with custom_uri are still able to be handled properly, even if the
URI scheme is invalid (not whitelisted) and we don't want xombrero
opening it.
-rw-r--r--xombrero.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/xombrero.c b/xombrero.c
index 529490e..e02f3ba 100644
--- a/xombrero.c
+++ b/xombrero.c
@@ -4967,13 +4967,6 @@ webview_npd_cb(WebKitWebView *wv, WebKitWebFrame *wf,
 
 	uri = (char *)webkit_network_request_get_uri(request);
 
-	if (valid_url_type(uri)) {
-		show_oops(t, "Stopping attempt to load an invalid URI (possible"
-		    " bait and switch attack)");
-		webkit_web_policy_decision_ignore(pd);
-		return (TRUE);
-	}
-
 	if (!auto_load_images && t->load_images) {
 
 		/* Disable autoloading of images, now that we're done loading
@@ -4996,6 +4989,13 @@ webview_npd_cb(WebKitWebView *wv, WebKitWebFrame *wf,
 		return (TRUE);
 	}
 
+	if (valid_url_type(uri)) {
+		show_oops(t, "Stopping attempt to load an invalid URI (possible"
+		    " bait and switch attack)");
+		webkit_web_policy_decision_ignore(pd);
+		return (TRUE);
+	}
+
 	if ((t->mode == XT_MODE_HINT && t->new_tab) || t->ctrl_click) {
 		t->ctrl_click = 0;
 		create_new_tab(uri, NULL, ctrl_click_focus, -1);