// Declare SHIRE object for this request.
SHIRE shire(application);
+ const char* shireURL=shire.getShireURL(targeturl);
+ if (!shireURL) {
+ ap_log_rerror(APLOG_MARK,APLOG_ERR|APLOG_NOERRNO,SH_AP_R(r),
+ "shib_check_user: unable to map request to proper shireURL setting, check configuration");
+ return SERVER_ERROR;
+ }
+
// Get location of this application's assertion consumer service and see if this is it.
- if (strstr(targeturl,shire.getShireURL(targeturl))) {
+ if (strstr(targeturl,shireURL)) {
return shib_handler(r,application,shire);
}
const char* targeturl=shib_get_targeturl(r,sc->szScheme);
+ const char* shireURL=shire.getShireURL(targeturl);
+ if (!shireURL) {
+ ap_log_rerror(APLOG_MARK,APLOG_ERR|APLOG_NOERRNO,SH_AP_R(r),
+ "shib_post_handler: unable to map request to proper shireURL setting, check configuration");
+ return SERVER_ERROR;
+ }
+
// Make sure we only process the SHIRE requests.
- if (!strstr(targeturl,shire.getShireURL(targeturl)))
+ if (!strstr(targeturl,shireURL))
return DECLINED;
ap_log_rerror(APLOG_MARK,APLOG_DEBUG|APLOG_NOERRNO,SH_AP_R(r),"shib_handler() running");
// Declare SHIRE object for this request.
SHIRE shire(application);
+
+ const char* shireURL=shire.getShireURL(targeturl.c_str());
+ if (!shireURL)
+ return WriteClientError(pfc,"Unable to map request to proper shireURL setting, check configuration.");
// If the user is accessing the SHIRE acceptance point, pass it on.
- if (targeturl.find(shire.getShireURL(targeturl.c_str()))!=string::npos)
+ if (targeturl.find(shireURL)!=string::npos)
return SF_STATUS_REQ_NEXT_NOTIFICATION;
// Now check the policy for this request.
return WriteClientError(lpECB,"Unable to map request to application session settings, check configuration.");
SHIRE shire(application);
+
+ const char* shireURL=shire.getShireURL(targeturl.c_str());
+ if (!shireURL)
+ return WriteClientError(lpECB,"Unable to map request to proper shireURL setting, check configuration.");
// Make sure we only process the SHIRE requests.
- if (!strstr(targeturl.c_str(),shire.getShireURL(targeturl.c_str())))
+ if (!strstr(targeturl.c_str(),shireURL))
return WriteClientError(lpECB,"The request's application and associated shireURL setting are inconsistent.");;
pair<const char*,const char*> shib_cookie=shire.getCookieNameProps();
}
// Should never happen...
- if (!shire)
+ if (!shire || (*shire!='/' && strncmp(shire,"http:",5) && strncmp(shire,"https:",6)))
return NULL;
// The "shireURL" property can be in one of three formats: