Commit 743849c3 authored by haemmer's avatar haemmer

Fixed #1812

parent 9e9caf05
...@@ -334,8 +334,8 @@ function submitForm(){ ...@@ -334,8 +334,8 @@ function submitForm(){
if (entityIDGETParam != "" && returnGETParam != ""){ if (entityIDGETParam != "" && returnGETParam != ""){
redirect_url = returnGETParam; redirect_url = returnGETParam;
} else { } else {
redirect_url = wayf_sp_samlDSURL ; redirect_url = wayf_sp_samlDSURL;
redirect_url += '?target=' + encodeURIComponent(wayf_return_url); redirect_url += getGETArgumentSeparator(redirect_url) + 'target=' + encodeURIComponent(wayf_return_url);
} }
// Append selected Identity Provider // Append selected Identity Provider
...@@ -712,6 +712,14 @@ function getGETArgument(name){ ...@@ -712,6 +712,14 @@ function getGETArgument(name){
} }
} }
function getGETArgumentSeparator(url){
if (url.indexOf('?') >=0 ){
return '&';
} else {
return '?';
}
}
(function() { (function() {
var config_ok = true; var config_ok = true;
...@@ -1016,7 +1024,8 @@ function getGETArgument(name){ ...@@ -1016,7 +1024,8 @@ function getGETArgument(name){
wayf_authReq_URL += '?entityID=' + encodeURIComponent(entityIDGETParam); wayf_authReq_URL += '?entityID=' + encodeURIComponent(entityIDGETParam);
wayf_authReq_URL += '&return=' + encodeURIComponent(returnGETParam); wayf_authReq_URL += '&return=' + encodeURIComponent(returnGETParam);
} else { } else {
var return_url = wayf_sp_samlDSURL + '?SAMLDS=1&target=' + encodeURIComponent(wayf_return_url); var return_url = wayf_sp_samlDSURL + getGETArgumentSeparator(wayf_sp_samlDSURL);
return_url += 'SAMLDS=1&target=' + encodeURIComponent(wayf_return_url);
wayf_authReq_URL += '?entityID=' + encodeURIComponent(wayf_sp_entityID); wayf_authReq_URL += '?entityID=' + encodeURIComponent(wayf_sp_entityID);
wayf_authReq_URL += '&return=' + encodeURIComponent(return_url); wayf_authReq_URL += '&return=' + encodeURIComponent(return_url);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment