mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-06 13:17:41 +00:00
GUACAMOLE-103: Redirect for login if response hash is not present.
This commit is contained in:
@@ -115,16 +115,9 @@ public class AuthenticationProviderService {
|
|||||||
// Look for the SAML Response parameter.
|
// Look for the SAML Response parameter.
|
||||||
String responseHash = request.getParameter("responseHash");
|
String responseHash = request.getParameter("responseHash");
|
||||||
|
|
||||||
if (responseHash != null) {
|
if (responseHash != null && samlResponseMap.hasSamlResponse(responseHash)) {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
||||||
// Generate the response object
|
|
||||||
if (!samlResponseMap.hasSamlResponse(responseHash)) {
|
|
||||||
logger.warn("SAML response was not found.");
|
|
||||||
logger.debug("SAML response hash {} not found in response map.", responseHash);
|
|
||||||
throw new GuacamoleServerException("Provided response was not found in response map.");
|
|
||||||
}
|
|
||||||
|
|
||||||
SamlResponse samlResponse = samlResponseMap.getSamlResponse(responseHash);
|
SamlResponse samlResponse = samlResponseMap.getSamlResponse(responseHash);
|
||||||
|
|
||||||
@@ -199,7 +192,7 @@ public class AuthenticationProviderService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// No SAML Response is present, so generate a request.
|
// No SAML Response is present, or hash is not present in map.
|
||||||
AuthnRequest samlReq = new AuthnRequest(samlSettings);
|
AuthnRequest samlReq = new AuthnRequest(samlSettings);
|
||||||
URI authUri;
|
URI authUri;
|
||||||
try {
|
try {
|
||||||
|
Reference in New Issue
Block a user