wojciech.kapcia@tigase.net opened 5 years ago
|
|
@andrzej.wojcik I made a (really short) change, that should fix the problem. From what I gathered, in I added a check (next to the existing ones that make sure that both Could you verify that it fits author's intention? IMHO, there is still a problem with handling 'defaults' of boolean values and lack of clarity what "unchecked" mean - whether disabled or use default. tri-state value would fit here nicely (unfortunately, DataForms doesn't seem to support it). |
|
Well, I see what you've tried to do, but I'm not sure that you've got that. Basically, now you check if a set of extensions matches. However, if the extension is missing in default and you as for it (call to Right now, I'm not sure if the extension refresh will work correctly. As for merging defaults, each extension has its own custom logic for that and idea how to handle bool values. In case of brute force locker extension, it was assumed that it should be enabled always if default setting or vhost setting is enabled. |
|
Thank you for your comment. I spend more time on this and made a couple of changes (@andrzej.wojcik please review https://github.com/tigase/tigase-server/pull/32). In a nutshell:
Especially two first points are important - setting defaultVHost when getting item instance also triggered refreshing of default vhost, but it wasn't yet loaded from the database. On the other hand, actual item should be refreshed only after it's loaded from the database or once default vhost is set (to update it's effective configuration). |
|
There is an NPE when default item hasn't been set and client tries to login.
One solution would be:
Other (quick fix):
|
|
@wojtek I've pushed different solution to the NPE - basically I've moved creation of default NPE (hardcoded values) to the point where vhosts from database are already loaded. That should work correctly and without any issues as in most cases default VHost will be in the database. |
|
@andrzej.wojcik While if got rid of NPE, it broke configuration after startup. I started Tigase, disabled BruteForceLocker for domain X and I'll crate a test case (most likely with some sort of TestExtension that would be enabled and used only in TTS). Note: from #helpdeskpr-535 - at the moment of addition and calling |
|
OK, the issue is finally fixed:
commit:4302d76869913d9ead99e948ad378ec8c5715ca8 (@andrzej.wojcik feel free to take a look) |
Type |
Bug
|
Priority |
Normal
|
Assignee | |
Version |
tigase-server-8.1.0
|
Spent time |
51h 15m
|
In the following code, even though
BruteForceLockerVHostExtension
is configured as disabled aboveextension.isEnabled();
returns defaulttrue