}
// 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:
if (!old.first || !old.second) {
wayf=m_app->getString("providerId");
if (wayf.first)
- m_authnRequest=m_authnRequest + "&providerId=" + wayf.second;
+ m_authnRequest=m_authnRequest + "&providerId=" + url_encode(wayf.second);
}
}
}
RPC rpc;
do {
clnt = rpc->connect();
- if (shibrpc_session_is_valid_1(&arg, &ret, clnt) != RPC_SUCCESS) {
+ clnt_stat status = shibrpc_session_is_valid_1(&arg, &ret, clnt);
+ if (status != RPC_SUCCESS) {
// FAILED. Release, disconnect, and try again...
- log.debug("RPC Failure: %p (%p): %s", this, clnt, clnt_spcreateerror(""));
+ log.error("RPC Failure: %p (%p) (%d) %s", this, clnt, status, clnt_spcreateerror("shibrpc_session_is_valid_1"));
rpc->disconnect();
if (retry)
retry--;
- else {
- log.error("RPC Failure: %p (%p)", this, clnt);
- return new RPCError(-1, "RPC Failure");
- }
+ else
+ return new RPCError(-1, "RPC Failure");
}
else {
- // SUCCESS. Return to the pool.
- rpc.pool();
+ // SUCCESS
retry = -1;
}
} while (retry>=0);
retval = new RPCError();
clnt_freeres (clnt, (xdrproc_t)xdr_shibrpc_session_is_valid_ret_1, (caddr_t)&ret);
+ rpc.pool();
log.debug("returning");
return retval;
RPC rpc;
do {
clnt = rpc->connect();
- if (shibrpc_new_session_1 (&arg, &ret, clnt) != RPC_SUCCESS) {
+ clnt_stat status = shibrpc_new_session_1 (&arg, &ret, clnt);
+ if (status != RPC_SUCCESS) {
// FAILED. Release, disconnect, and retry
- log.debug("RPC Failure: %p (%p): %s", this, clnt, clnt_spcreateerror (""));
+ log.error("RPC Failure: %p (%p) (%d): %s", this, clnt, status, clnt_spcreateerror("shibrpc_new_session_1"));
rpc->disconnect();
if (retry)
- retry--;
- else {
- log.error("RPC Failure: %p (%p)", this, clnt);
+ retry--;
+ else
return new RPCError(-1, "RPC Failure");
- }
}
else {
// SUCCESS. Pool and continue
- rpc.pool();
retry = -1;
}
} while (retry>=0);
}
clnt_freeres(clnt, (xdrproc_t)xdr_shibrpc_new_session_ret_1, (caddr_t)&ret);
+ rpc.pool();
log.debug("returning");
return retval;