Bug 319394

Summary: KNode does not validate server addresses at account creation
Product: knode Reporter: Shriramana Sharma <samjnaa>
Component: generalAssignee: kdepim bugs <kdepim-bugs>
Status: RESOLVED UNMAINTAINED    
Severity: normal    
Priority: NOR    
Version: 4.10.x   
Target Milestone: ---   
Platform: Ubuntu   
OS: Linux   
Latest Commit: Version Fixed In: 4.10.4

Description Shriramana Sharma 2013-05-06 06:15:29 UTC
Hello. I am using Kubuntu Raring with latest updates i.e. KDE 4.10.2.

I created a newsgroup as follows:

Settings > Configure KNotes > Accounts > NewsGroup Servers > Add >

Name: DigitalMars
Server: news://news.digitalmars.com/

Click OK. Then select the new group, click Subscribe > Fetch List. I get an error saying:

Malformed URL nntp://:119?desc=true.

If I go back to the account properties and change the server address to:

news.digitalmars.com

then it works. Even a slash at the end of the server name will cause this problem.

If there is only a particular format of server address that is recognized, then the Server Field textbox should validate that. At least upon pressing OK the dialog box should validate the server address.

And I don't get why it is a problem to include news:// at the beginning or a slash at the end -- URLs copy-pasted from the net can have these. The program can and should easily test for these and remove these automatically without reporting an error.
Comment 1 Laurent Montel 2013-05-06 11:14:52 UTC
Git commit a934cf6babddd6a1b227cb25005a1314ca6369bd by Montel Laurent.
Committed on 06/05/2013 at 13:14.
Pushed by mlaurent into branch 'KDE/4.10'.

Fix Bug 319394 - KNode does not validate server addresses at account creation

FIXED-IN: 4.10.4

M  +1    -1    knode/knconfigwidgets.cpp

http://commits.kde.org/kdepim/a934cf6babddd6a1b227cb25005a1314ca6369bd
Comment 2 Shriramana Sharma 2013-05-06 11:38:36 UTC
Hello and thanks for your quick response. However it seems you have merely added a .remove(QLatin1String("news://")) to the field, but:

1) Perhaps nntp:// is also another string to remove.
2) As I have remarked, even if there is a / at the end (no news:// or nntp:// at the beginning) it doesn't work.

So perhaps a better solution is to check for presence of / and object to it with an indication that the desired format is of the form subdomain.example.com.

It would be appropriate to check with the places where the server name is actually used within the code to connect to the server to determine the exact format as I am not sure about it. (I just use the software.)

Thanks.
Comment 3 Andrew Crouthamel 2018-09-04 18:32:36 UTC
Hello! Sorry to be the bearer of bad news, but this project has been unmaintained for many years so I am closing this bug.