#125 Features: sanity checks

open
nobody
Server (143)
5
2007-04-23
2007-04-23
wiebe
No

There appears to be no sanity check on the value for features of type string and integer, not when set in the conf and not when set with /SET.

Integer type
Specifying a string for integer type feature, causes the value to become 0, negative numbers also appear to be accepted. Also features like NICKLEN CHANNELLEN etc. should not ever be advertised in /VERSION with greater value than they can actually have (define NICKLEN CHANNELLEN). It looks a bit weird to have NICKLEN=18 and MAXNICKLEN=12 or something like that.

String type
All string type features can contain spaces, but HIS_SERVER, HIDDEN_HOST, HIDDEN_IP, and NETWORK should not be allowed to contain spaces. When they do, clients break on that. Of course one should not set such values, but perhaps a check could prevent or warn about it.

Boolean type
Sanity checks here appear to work fine, it complains when invalid values are set in the conf, or are given in /SET. So I think would make sense to have checks on the other types of features too.

Tested with /SET and by setting in conf
Tested on u2.10.12.pre11. latest from CVS

Discussion


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks