Projects tigase _server server-core Issues #1231
'default-virtual-host' should validate configured VHost (#1231)
Closed
wojciech.kapcia@tigase.net opened 4 years ago

Currently following configuration:

'default-virtual-host' = [ 'test-domain.com' ] 

results in invalid vhost: [test-domain.com]

Andrzej Wójcik (Tigase) commented 4 years ago

Reader properly parsed config (and that was OK), but DefaultTypesConverter decided to accept anything for fileds of type String, BareJID, JID as it used String.valueOf() on the value and the result converted to String, BareJID, JID.

To fix that, I've added code checking if the field of type String is not accepting Collection or Map. That fixes this issue and is a valid generic check for those fields.

wojciech.kapcia@tigase.net commented 4 years ago
[2021-03-03 19:28:40:343] [WARNING ] [                  main ] AbstractBeanConfigurator.configure(): Can''t prepare value of property 'mainVHostName' of bean 'instance': '[test-domain.com]'
java.lang.RuntimeException: Cannot convert [test-domain.com] to class java.lang.String
	at tigase.kernel.DefaultTypesConverter.convert(DefaultTypesConverter.java:160)

Works as expected.

issue 1 of 1
Type
Bug
Priority
If you are bored
Assignee
Version
tigase-server-8.2.0
Spent time
45m
Issue Votes (0)
Watchers (0)
Reference
tigase/_server/server-core#1231
Please wait...
Page is in error, reload to recover