mirror of
https://github.com/unrealircd/unrealircd.git
synced 2026-07-08 06:43:12 +02:00
- Will now error at too large cloak keys (2147483647 and greater) because it's dangerous
and could cause cloak key differences (ex: mixed ia32&ia64 networks).
This commit is contained in:
@@ -2277,3 +2277,5 @@ seen. gmtime warning still there
|
||||
- Clarified what ban server {} does, suggested by Joolz (#0001110)
|
||||
- Fixed a problem related to crontab reported by LRL (#0001034)
|
||||
- Fixed a problem in PPC detection
|
||||
- Will now error at too large cloak keys (2147483647 and greater) because it's dangerous
|
||||
and could cause cloak key differences (ex: mixed ia32&ia64 networks).
|
||||
|
||||
@@ -5711,6 +5711,20 @@ int _test_set(ConfigFile *conf, ConfigEntry *ce)
|
||||
errors++;
|
||||
continue;
|
||||
}
|
||||
/* values which are >LONG_MAX are (re)set to LONG_MAX, problem is
|
||||
* that 'long' could be 32 or 64 bits resulting in different limits (LONG_MAX),
|
||||
* which then again results in different cloak keys.
|
||||
* We could warn/error here or silently reset them to 2147483647...
|
||||
* IMO it's best to error because the value 2147483647 would be predictable
|
||||
* (actually that's even unrelated to this 64bit problem).
|
||||
*/
|
||||
if ((l1 >= 2147483647) || (l2 >= 2147483647) || (l3 >= 2147483647))
|
||||
{
|
||||
config_error("%s:%i: set::cloak-keys: values must be below 2147483647 (2^31-1)",
|
||||
cep->ce_fileptr->cf_filename, cep->ce_varlinenum);
|
||||
errors++;
|
||||
continue;
|
||||
}
|
||||
requiredstuff.settings.cloakkeys = 1;
|
||||
}
|
||||
else if (!strcmp(cep->ce_varname, "scan")) {
|
||||
|
||||
Reference in New Issue
Block a user