[
https://issues.apache.org/jira/browse/OFBIZ-12741?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17675920#comment-17675920
]
ASF subversion and git services commented on OFBIZ-12741:
---------------------------------------------------------
Commit dbd366cced283635571516047047f0df8628a42d in ofbiz-framework's branch
refs/heads/release22.01 from Daniel Watford
[ https://gitbox.apache.org/repos/asf?p=ofbiz-framework.git;h=dbd366cced ]
Fixed: ModelPermission handles errors from permission-services (OFBIZ-12741)
Responses from permission services are checked for errors. Errors are
returned to the caller.
> ModelPermission should handle error responses from permission-services
> ----------------------------------------------------------------------
>
> Key: OFBIZ-12741
> URL: https://issues.apache.org/jira/browse/OFBIZ-12741
> Project: OFBiz
> Issue Type: Bug
> Components: framework/service
> Affects Versions: 22.01.01
> Reporter: Daniel Watford
> Assignee: Daniel Watford
> Priority: Major
>
> ModelPermission's evalPermissionService method will call a permission-service
> as part of checking whether a user is permitted to execute a service.
> If the permission service returns an error response then a Null Pointer
> Exception will be thrown by evalPermissionService since the error response is
> not trapped.
> Amend evalPermissionService to detect an error response from the permission
> service and return it unchanged to the caller.
> Further, amend evalPermissionService to check for the presence of the
> hasPermission attribute in the response before attempting to retrieve and
> convert it to a boolean.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)