Details
-
Bug
-
Resolution: Fixed
-
Medium
-
3.9.1, 3.11
-
3.09
-
Description
The integrity checker will crash if the PortletConfiguration data has invalid data (ironic I know)
In PortletCheck the code
{code]
protected boolean shouldPortletBeDeleted(String entityIdStr) throws GenericEntityException
blindly accepts an entity id as a string and assumes it on Long format. If its not or "" empty string then BANG! The customers data had empty string for a PortletConfiguration projectId. {code] mysql> select * from propertyentry, propertystring where propertyentry.id = propertystring.id and property_key = 'projectId'; +-------+----------------------+-----------+--------------+--------------+-------+---------------+ | ID | ENTITY_NAME | ENTITY_ID | PROPERTY_KEY | propertytype | ID | propertyvalue | +-------+----------------------+-----------+--------------+--------------+-------+---------------+ | 11550 | PortletConfiguration | 10095 | projectid | 5 | 11550 | 10061 | | 11552 | PortletConfiguration | 10096 | projectid | 5 | 11552 | 10060 | | 11563 | PortletConfiguration | 10111 | projectid | 5 | 11563 | 10061 | | 11565 | PortletConfiguration | 10112 | projectid | 5 | 11565 | 10060 | | 11620 | PortletConfiguration | 10133 | projectId | 5 | 11620 | | | 11617 | PortletConfiguration | 10132 | projectid | 5 | 11617 | 10070 | | 11863 | PortletConfiguration | 10246 | projectid | 5 | 11863 | 10061 | | 11873 | PortletConfiguration | 10248 | projectid | 5 | 11873 | 10060 | | 12019 | PortletConfiguration | 10301 | projectid | 5 | 12019 | 10073 | | 12120 | PortletConfiguration | 10331 | projectid | 5 | 12120 | 10060 | | 12448 | PortletConfiguration | 10429 | projectid | 5 | 12448 | 10061 | | 12450 | PortletConfiguration | 10430 | projectid | 5 | 12450 | 10060 | | 12703 | PortletConfiguration | 10512 | projectid | 5 | 12703 | 10072 | +-------+----------------------+-----------+--------------+--------------+-------+---------------+ 13 rows in set (0.01 sec)
The integrity check should have more integrity
The code should look for null values and other invalid id values. Happens on 3.9.1 and 3.11 HEAD