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!

Built-in Service Level Objectives Management to Bridge the Gap Between Service & ...

Wednesday, May 29, 2024  |  11AM PST / 2PM ESTRegister now and join us to learn more about how you can ...

Get Your Exclusive Splunk Certified Cybersecurity Defense Engineer at Splunk .conf24 ...

We’re excited to announce a new Splunk certification exam being released at .conf24! If you’re headed to Vegas ...

Share Your Ideas & Meet the Lantern team at .Conf! Plus All of This Month’s New ...

Splunk Lantern is Splunk’s customer success center that provides advice from Splunk experts on valuable data ...