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!

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...