[gnome-boxes/gnome-3-8] wizard: scheme part is mandatory in URI
- From: Zeeshan Ali Khattak <zeeshanak src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-boxes/gnome-3-8] wizard: scheme part is mandatory in URI
- Date: Mon, 13 May 2013 16:06:13 +0000 (UTC)
commit 682c523b0b5246e7a9384d074daca568c2b5bb79
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date: Fri Apr 19 23:45:14 2013 +0300
wizard: scheme part is mandatory in URI
By catching bogus URIs like 'rd' early, we avoid showing weird errors
like "Unsupported protocol '(null)'" in the UI and also many
criticals/warnings on the console.
https://bugzilla.gnome.org/show_bug.cgi?id=698338
src/wizard.vala | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/wizard.vala b/src/wizard.vala
index 704105e..385e34b 100644
--- a/src/wizard.vala
+++ b/src/wizard.vala
@@ -247,7 +247,7 @@ private class Boxes.Wizard: Boxes.UI {
private void prepare_for_uri (string uri_as_text) throws Boxes.Error {
var uri = Xml.URI.parse (uri_as_text);
- if (uri == null)
+ if (uri == null || uri.scheme == null)
throw new Boxes.Error.INVALID (_("Invalid URI"));
source = new CollectionSource (uri.server ?? uri_as_text, uri.scheme, uri_as_text);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]