You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Modular Input: Error during ValidationDefinition/InputDefinition when no value for parameter is passed #198
Here, no null check is performed for the child variable. In case when the modular input parameter has no value, child will be null and child.getNodeType() leads to null pointer.
Sample input to --validate-arguments that triggers the error:
<?xml version="1.0" encoding="utf-16"?>
<items xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<server_host>tiny</server_host>
<server_uri>https://127.0.0.1:8089</server_uri>
<checkpoint_dir>/opt/splunk/var/lib/splunk/modinputs</checkpoint_dir>
<session_key>123102983109283019283</session_key>
<!-- The items element only ever contains one item element -->
<item name="aaa">
<param name="param1">value1</param>
<param name="param_bug"></param>
<param name="disabled">0</param>
<param name="index">default</param>
<param_list name="multiValue">
<value>value1</value>
<value>value2</value>
</param_list>
<param_list name="multiValue2">
<value>value3</value>
<value>value4</value>
</param_list>
</item>
</items>
In the above example param_bug has no value (user did not input any value to the modular input parameter), this causes child to be null in the textInNode() method.
Please let me know if you need any other information regarding this issue.
Similar issue was created previously: #122 back in March 2018, but it was closed stating that it could not reproduced.
@ashah-splunk Hi, any update on this? We have been using a custom splunk java sdk jar with the fix(null check) for this. But, recently our app got flagged for cloud app inspect because we don't use the official version of splunk java sdk. So, this issue is of priority for us, or our app could get removed for splunk cloud.
@jrobins04 is null check the only fix or are there any other changes done as well? if so then I would request you to share your fix for this so that we can analyse that option for possible solution.
Hi @jrobins04 , we have added the null check for the child as per your suggestion ( ref PR ). would request you to have a look and let us know if anything else needs to be handled. We are planning a new Java SDK release next week.
Activity
ashah-splunk commentedon Oct 27, 2022
@jrobins04 thanks for the detailed steps to reproduce the issue. We are looking into this and update you soon.
jrobins04 commentedon Oct 31, 2022
@ashah-splunk Hi, any update on this? We have been using a custom splunk java sdk jar with the fix(null check) for this. But, recently our app got flagged for cloud app inspect because we don't use the official version of splunk java sdk. So, this issue is of priority for us, or our app could get removed for splunk cloud.
ashah-splunk commentedon Nov 3, 2022
@jrobins04 is null check the only fix or are there any other changes done as well? if so then I would request you to share your fix for this so that we can analyse that option for possible solution.
jrobins04 commentedon Nov 3, 2022
@ashah-splunk Yes, null check is all what we need in my analysis.
Here child variable needs to be checked for null.
ashah-splunk commentedon Nov 11, 2022
Hi @jrobins04 , we have added the null check for the child as per your suggestion ( ref PR ). would request you to have a look and let us know if anything else needs to be handled. We are planning a new Java SDK release next week.
jrobins04 commentedon Nov 12, 2022
@ashah-splunk thank you for looking into this with priority.
jrobins04 commentedon Nov 15, 2022
@ashah-splunk Thanks for looking into this. When are you planning a release for this fix?
ashah-splunk commentedon Nov 16, 2022
@jrobins04 we are planning a release by end of this week.
ashah-splunk commentedon Nov 18, 2022
@jrobins04 we have a new Java SDK 1.9.2 release, request you to try with the latest release and let us know if you still face the issue. Thanks!
ashah-splunk commentedon Dec 12, 2022
Closing the issue as no response received. @jrobins04 please reopen the issue if you still face the problem. Thanks!
jrobins04 commentedon Dec 14, 2022
@ashah-splunk Thank you for quickly fixing this. I have verified that the bug has been fixed in the latest release. Thanks again !