[
https://issues.apache.org/jira/browse/VCL-755?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14247277#comment-14247277
]
ASF subversion and git services commented on VCL-755:
-----------------------------------------------------
Commit 1645767 from [~arkurth] in branch 'vcl/trunk'
[ https://svn.apache.org/r1645767 ]
VCL-755
Fixed all locations that were using get_management_node_info()->{} to first get
the info, check if defined, then access the hash key.
> Add 'if defined' checks for all get_management_node_info calls
> --------------------------------------------------------------
>
> Key: VCL-755
> URL: https://issues.apache.org/jira/browse/VCL-755
> Project: VCL
> Issue Type: Bug
> Components: vcld (backend)
> Affects Versions: 2.3.2
> Reporter: Andy Kurth
> Priority: Minor
> Fix For: 2.4
>
>
> There are calls to get_management_node_info in utils.pm, DataStructure.pm,
> and healthcheck.pm which do not check if a defined value is returned such as:
> {noformat}
> $identity_paths = get_management_node_info()->{keys};
> {noformat}
> There are cases where get_management_node_info will fail and return null such
> as if a database connection cannot be obtained. When this happens and the
> caller doesn't check for a defined value, the following unhandled error is
> generated:
> {quote}
> Can't use an undefined value as a HASH reference at
> /usr/local/vcl/bin/../lib/VCL/utils.pm line 4017.
> {quote}
> Every line containing _get_management_node_info()->_ should be changed to
> first retrieve the info, then check it, then access the hash reference value.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)