Error loading file in ispconfig.js
short description
loading some wrong "php" files when the system is on the login page.
correct behaviour
the "ispconfig.js" file must check what page it is on before uploading the file.
environment
Server OS: (debian)
ISPConfig version: (3.1.15p3)
proposed fix
find 326 line of /usr/local/ispconfig/interface/web/themes/default/assets/javascripts/ispconfig.js and replace function "loadInitContent" with
loadInitContent: function() {
var startpage = $('#pageContent').attr('data-startpage');
if(startpage) {
startpage = 'dashboard/dashboard.php';
var pageContentObject = $.ajax({
type: "GET",
url: startpage,
data: "",
dataType: "html",
beforeSend: function () {
ISPConfig.showLoadIndicator();
},
success: function (data, textStatus, jqXHR) {
if (jqXHR.responseText.indexOf('HEADER_REDIRECT:') > -1) {
var parts = jqXHR.responseText.split(":");
ISPConfig.loadContent(parts[1]);
} else {
$('#pageContent').html(jqXHR.responseText);
ISPConfig.onAfterContentLoad('dashboard/dashboard.php', "");
ISPConfig.pageFormChanged = false;
}
ISPConfig.hideLoadIndicator();
},
error: function () {
ISPConfig.hideLoadIndicator();
ISPConfig.reportError('Ajax Request was not successful. 114');
}
});
ISPConfig.loadMenus();
ISPConfig.keepalive();
ISPConfig.dataLogNotification();
setTimeout(function () {
try {
$('form#pageForm').find('input[name="username"]').focus();
} catch (e) {
}
}, 1000);
}
},