Skip to content

Commit

Permalink
Merge pull request apereo#89 from antsar/master
Browse files Browse the repository at this point in the history
Fixed redirect loop with CASTimeout=0
  • Loading branch information
dhawes authored Oct 11, 2016
2 parents bbe8860 + 6f8cc2f commit c796a6b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/mod_auth_cas.c
Original file line number Diff line number Diff line change
Expand Up @@ -1678,7 +1678,9 @@ apr_byte_t isValidCASCookie(request_rec *r, cas_cfg *c, char *cookie, char **use
return FALSE;
}

if(cache.issued < (apr_time_now()-(c->CASTimeout*((apr_time_t) APR_USEC_PER_SEC))) || cache.lastactive < (apr_time_now()-(c->CASIdleTimeout*((apr_time_t) APR_USEC_PER_SEC)))) {
if((c->CASTimeout > 0 &&
(cache.issued < (apr_time_now()-(c->CASTimeout*((apr_time_t) APR_USEC_PER_SEC))))) ||
cache.lastactive < (apr_time_now()-(c->CASIdleTimeout*((apr_time_t) APR_USEC_PER_SEC)))) {
/* delete this file since it is no longer valid */
deleteCASCacheFile(r, cookie);
if(c->CASDebug)
Expand Down

0 comments on commit c796a6b

Please sign in to comment.