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!

Introducing Splunk Enterprise 9.2

WATCH HERE! Watch this Tech Talk to learn about the latest features and enhancements shipped in the new Splunk ...

Adoption of RUM and APM at Splunk

    Unleash the power of Splunk Observability   Watch Now In this can't miss Tech Talk! The Splunk Growth ...

Routing logs with Splunk OTel Collector for Kubernetes

The Splunk Distribution of the OpenTelemetry (OTel) Collector is a product that provides a way to ingest ...