You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@unomi.apache.org by "Kevan Jahanshahi (Jira)" <ji...@apache.org> on 2021/02/16 09:39:00 UTC
[jira] [Created] (UNOMI-433) PersistenceService.update no check
that item is of type Class
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)