[jira] [Commented] (OFBIZ-11385) Possible NPE in DatabaseUtil.getColumnInfo(...)

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[jira] [Commented] (OFBIZ-11385) Possible NPE in DatabaseUtil.getColumnInfo(...)

Nicolas Malin (Jira)

    [ https://issues.apache.org/jira/browse/OFBIZ-11385?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17271552#comment-17271552 ]

Michael Brohl commented on OFBIZ-11385:
---------------------------------------

Thanks Benjamin!

Keeping it open for backport to the 18.12 branch.

> Possible NPE in DatabaseUtil.getColumnInfo(...)
> -----------------------------------------------
>
>                 Key: OFBIZ-11385
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-11385
>             Project: OFBiz
>          Issue Type: Bug
>          Components: framework/webtools
>    Affects Versions: Trunk
>            Reporter: Benjamin Jugl
>            Assignee: Michael Brohl
>            Priority: Major
>              Labels: backport-needed
>             Fix For: Upcoming Branch
>
>         Attachments: OFBIZ-11385_Possible_NPE_in_DatabaseUtil_001.patch
>
>
> Right at the start DatabaseUtil.getColumnInfo(....) does an if comparison to 0 with the unchecked parameter tableNames.
> The way this method and especially the parameter is used in DatabaseUtil.induceModelFromDb(Collection<String> messages) is not secure to not provide null-values for this parameter.
> I suggest using a UtilValidate.isEmpty(...) instead of the unsave comparison.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)