All Apps and Add-ons

App setup configuration in infinte loop after upgrading to splunk 8.1.2

wallwalker
New Member

I have a splunk app which works fine in 7.x. We recently migrated it to 8.x and made minor python file changes to support python 3. Everything is working fine except app's setup configuration. It seems that configuration is never saved and it keeps redirecting to the start of configuration again. The same app configuration works just fine in 7.x

After investigating further, I realized that one of the splunk templates, <splunk dir>/share/splunk/search_mrsparkle/templates/admin/edit.html has been updated in 8.x with additional check for safe redirect.

---------------------------------------------------------

function handleEditFormSubmit(ev) {
% if kwargs.get('redirect_override') and splunk.util.isRedirectSafe(kwargs['redirect_override']):
window.location = ${ jsonify(make_url(kwargs['redirect_override'])) };

% else:
var frm = $('#eaiform');
var eai = Splunk.EAI.getInstance();
if (!eai)
return false; // page not yet loaded?
// eai.confirmSubmission = true;
// eai.confirmQuestion = _("Submitting this form will switch you to LDAP configuration, make sure you write down your failsafe login information or you won't be able to login.");
eai.saveForm(frm);
% endif
return false;
}

---------------------------------------------------------

Due to this check, my app's configuration submission form has only following statement instead of actual form submission logic (which is in 'else' part of the above template)

window.location = ${ jsonify(make_url(kwargs['redirect_override'])) };

Is someone else facing similar issue? I Is there any way to avoid having redirect_override which seems to be auto generated from Splunk?

Labels (1)
0 Karma
Get Updates on the Splunk Community!

Enhance Security Visibility with Splunk Enterprise Security 7.1 through Threat ...

(view in My Videos)Struggling with alert fatigue, lack of context, and prioritization around security ...

Troubleshooting the OpenTelemetry Collector

  In this tech talk, you’ll learn how to troubleshoot the OpenTelemetry collector - from checking the ...

Adoption of Infrastructure Monitoring at Splunk

  Splunk's Growth Engineering team showcases one of their first Splunk product adoption-Splunk Infrastructure ...