[connections/fix-add-connection-issues: 2/2] assistant: Validate server address




commit bc9589f8dd20af3c6a09137c28235ea6a7466d5d
Author: Felipe Borges <felipeborges gnome org>
Date:   Tue Jul 20 10:41:17 2021 +0200

    assistant: Validate server address
    
    The URI needs to have at least a scheme and a server address.
    
    Fixes #58

 src/assistant.vala | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/src/assistant.vala b/src/assistant.vala
index e045c50..8e4cdd8 100644
--- a/src/assistant.vala
+++ b/src/assistant.vala
@@ -44,7 +44,7 @@ namespace Connections {
             }
 
             var uri = Xml.URI.parse (url_entry.text);
-            if (uri == null || uri.scheme == null || uri.path != null) {
+            if (uri == null || uri.scheme == null || uri.path != null || uri.server == null) {
                 create_button.sensitive = false;
 
                 return;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]