Fix encoding issue in SP configure flow
document.getElementById('templateDesc').value = templateDesc;
validateSPConfigurations();
+ encodeSPCertificate();
+
$.ajax({
type: "POST",
url: 'add-service-provider-as-template.jsp',
},
async: false
});
+ decodeSPCertificate();
}
function createAppOnclick() {
document.getElementById('sp-certificate').value = btoa(spCertificate);
}
+ function decodeSPCertificate() {
+ var spCertificate = document.getElementById('sp-certificate').value;
+ document.getElementById('sp-certificate').value = atob(spCertificate);
+ }
+
function updateBeanAndRedirect(redirectURL) {
var numberOfClaimMappings = document.getElementById("claimMappingAddTable").rows.length;
document.getElementById('number_of_claim_mappings').value = numberOfClaimMappings;
var numberOfRoleMappings = document.getElementById("roleMappingAddTable").rows.length;
document.getElementById('number_of_rolemappings').value = numberOfRoleMappings;
+ encodeSPCertificate();
$.ajax({
type: "POST",
location.href = redirectURL;
}
});
+ decodeSPCertificate();
}
function getConfigurationType(postURL) {
var numberOfRoleMappings = document.getElementById("roleMappingAddTable").rows.length;
document.getElementById('number_of_rolemappings').value = numberOfRoleMappings;
+ encodeSPCertificate();
$.ajax({
type: "POST",
});
}
});
+ decodeSPCertificate();
}
function updateBeanAndPostToWithConfirmation(postURL, data) {
}
function updateBeanAndPostTo(postURL, data) {
+
+ encodeSPCertificate();
+
$.ajax({
type: "POST",
url: 'update-application-bean.jsp?spName=<%=Encode.forUriComponent(spName)%>',
});
}
});
+ decodeSPCertificate();
}
function onSamlSsoClick() {
var numberOfRoleMappings = document.getElementById("roleMappingAddTable").rows.length;
document.getElementById('number_of_rolemappings').value = numberOfRoleMappings;
+ encodeSPCertificate();
$.ajax({
type: "POST",
url: 'configure-service-provider-update-ajaxprocessor.jsp?spName=<%=Encode.forUriComponent(spName)%>',
data: $("#configure-sp-form").serialize()
});
+ decodeSPCertificate();
}
jQuery('#publicCertDeleteLink').click(function () {
