Kevan Jahanshahi created UNOMI-433:
--------------------------------------
Summary: PersistenceService.update no check that item is of type
Class
Key: UNOMI-433
URL: https://issues.apache.org/jira/browse/UNOMI-433
Project: Apache Unomi
Issue Type: Bug
Components: core
Affects Versions: 2.0.0, 1.5.5
Reporter: Kevan Jahanshahi
For updating object we are passing:
* the item
* the class of the item for detecting the index name
* the map<String, Object> of props to be updated
There is no check that the given item is of type class.
This mean that we could pass a Session item and Profile class to this function.
And it will try to update session in the profile index.
That seem's wrong and we could do a check in the persistence service.
Throw InvalidArgumentException in that case.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)