[gnome-boxes] wizard: scheme part is mandatory in URI
- From: Zeeshan Ali Khattak <zeeshanak src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-boxes] wizard: scheme part is mandatory in URI
- Date: Tue, 23 Apr 2013 12:44:37 +0000 (UTC)
commit 14c562406cc86f820f96ef8c73f350a56b978131
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 07cd380..f9fbbd8 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]