summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDominik George <nik@naturalnet.de>2019-02-24 19:20:31 +0100
committerChristian Dywan <christian@twotoasts.de>2019-02-24 19:20:31 +0100
commit7d66c70d6d9b8b570dc17b81ff9b08fbee08888a (patch)
tree8c3d028f01615c38a6c1b46557f73707581578b1
parentb2742d28f38d8f9bc363b85289d43d55f4370207 (diff)
downloadmidori-git-7d66c70d6d9b8b570dc17b81ff9b08fbee08888a.tar.gz
Check for split string in proxy setting before splitting
Closes #243
-rw-r--r--core/preferences.vala4
1 files changed, 4 insertions, 0 deletions
diff --git a/core/preferences.vala b/core/preferences.vala
index 8834d2d9..faa65c98 100644
--- a/core/preferences.vala
+++ b/core/preferences.vala
@@ -166,6 +166,10 @@ namespace Midori {
}
}
proxy.search_changed.connect (() => {
+ if (! ("://" in settings.http_proxy)) {
+ proxy.get_style_context ().add_class ("error");
+ return;
+ }
string[] parts = settings.http_proxy.split ("://", 2);
if (parts[1] == "" || ":" in parts[1] || "/" in parts[1]) {
proxy.get_style_context ().add_class ("error");