[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdelibs/kio/misc
From: Waldo Bastian <bastian () kde ! org>
Date: 2004-05-14 12:37:30
Message-ID: 20040514123730.5E0A790E7 () office ! kde ! org
[Download RAW message or body]
CVS commit by waba:
Reject hostname that starts with '-',
telnet/ssh/rlogin will consider it a command line option
M +12 -3 ktelnetservice.cpp 1.9
--- kdelibs/kio/misc/ktelnetservice.cpp #1.8:1.9
@@ -78,8 +78,17 @@ int main(int argc, char **argv)
}
+ QString host;
if (!url.host().isEmpty())
- cmd << url.host(); // telnet://host
+ host = url.host(); // telnet://host
else if (!url.path().isEmpty())
- cmd << url.path(); // telnet:host
+ host = url.path(); // telnet:host
+
+ if (host.isEmpty() || host.startsWith("-"))
+ {
+ kdError() << "Invalid hostname " << host << endl;
+ return 2;
+ }
+
+ cmd << host;
if (url.port()){
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic