Skip to content

Commit

Permalink
Update loginurl caching for apereo#160
Browse files Browse the repository at this point in the history
  • Loading branch information
dhawes committed Oct 18, 2021
1 parent cdf2eb4 commit ac9c5ab
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/mod_auth_cas.c
Original file line number Diff line number Diff line change
Expand Up @@ -1344,7 +1344,7 @@ char *createCASCookie(request_rec *r, char *user, cas_saml_attr *attrs, char *ti

if(c->CASDebug) {
ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, "entering createCASCookie()");
ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, "login URL = %s", getCASLoginURL(r, c));
ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, "login URL = %s", getCASLoginURL(r));
}

CASCleanCache(r, c);
Expand All @@ -1353,7 +1353,7 @@ char *createCASCookie(request_rec *r, char *user, cas_saml_attr *attrs, char *ti
e.issued = apr_time_now();
e.lastactive = apr_time_now();
e.path = getCASPath(r);
e.loginurl = getCASLoginURL(r, c);
e.loginurl = getCASLoginURL(r);
e.renewed = (d->CASRenew == NULL ? 0 : 1);
e.secure = (isSSL(r) == TRUE ? 1 : 0);
e.ticket = ticket;
Expand Down Expand Up @@ -1805,14 +1805,14 @@ apr_byte_t isValidCASCookie(request_rec *r, cas_cfg *c, char *cookie, char **use
}

/* make sure the loginurl matches */
if(strcasecmp(cache.loginurl, getCASLoginURL(r, c))) {
if(strcasecmp(cache.loginurl, getCASLoginURL(r))) {
if(c->CASDebug) {
ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, "cache.loginurl (%s) does not equal getCASLoginURL (%s)", cache.loginurl, getCASLoginURL(r, c));
ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, "cache.loginurl (%s) does not equal getCASLoginURL (%s)", cache.loginurl, getCASLoginURL(r));
}
return FALSE;
} else {
if(c->CASDebug) {
ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, "cache.loginurl (%s) equals getCASLoginURL (%s)", cache.loginurl, getCASLoginURL(r, c));
ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, "cache.loginurl (%s) equals getCASLoginURL (%s)", cache.loginurl, getCASLoginURL(r));
}
}

Expand Down

0 comments on commit ac9c5ab

Please sign in to comment.