Introduction
Introduction Statistics Contact Development Disclaimer Help
tOnly plumb some URI, when it's ASCII. - surf - customized build of surf, the s…
git clone git://src.adamsgaard.dk/surf
Log
Files
Refs
README
LICENSE
---
commit 344efec3fb932a9c5baae582fe70c72a0bc4a747
parent d4e31d9472ec2f4ec9e44ad56926ee4cfed157ee
Author: Christoph Lohmann <[email protected]>
Date: Tue, 20 Jan 2015 17:38:22 +0100
Only plumb some URI, when it's ASCII.
Diffstat:
M surf.c | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
---
diff --git a/surf.c b/surf.c
t@@ -213,6 +213,7 @@ beforerequest(WebKitWebView *w, WebKitWebFrame *f, WebKitW…
WebKitNetworkRequest *req, WebKitNetworkResponse *resp,
Client *c) {
const gchar *uri = webkit_network_request_get_uri(req);
+ int i, isascii = 1;
if(g_str_has_suffix(uri, "/favicon.ico"))
webkit_network_request_set_uri(req, "about:blank");
t@@ -224,7 +225,15 @@ beforerequest(WebKitWebView *w, WebKitWebFrame *f, WebKit…
&& !g_str_has_prefix(uri, "data:") \
&& !g_str_has_prefix(uri, "blob:") \
&& strlen(uri) > 0) {
- handleplumb(c, w, uri);
+
+ for(i = 0; i < strlen(uri); i++) {
+ if(!g_ascii_isprint(uri[i])) {
+ isascii = 0;
+ break;
+ }
+ }
+ if(isascii)
+ handleplumb(c, w, uri);
}
}
You are viewing proxied material from mx1.adamsgaard.dk. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.