[pubcookie-dev] CVS update: willey;
webiso/pubcookie/src mod_pubcookie.c,1.161,1.162
Stephen Willey
willey at cac.washington.edu
Thu Dec 9 13:36:01 PST 2004
Update of /usr/local/cvsroot/webiso/pubcookie/src
In directory webiso-cvs.cac.washington.edu:/var/tmp/cvs-serv8636
Modified Files:
mod_pubcookie.c
Log Message:
fixed recently broken clearing of granting cookie when using POST method
Index: webiso/pubcookie/src/mod_pubcookie.c
diff -c webiso/pubcookie/src/mod_pubcookie.c:1.161 webiso/pubcookie/src/mod_pubcookie.c:1.162
*** webiso/pubcookie/src/mod_pubcookie.c:1.161 Wed Nov 24 17:08:42 2004
--- webiso/pubcookie/src/mod_pubcookie.c Thu Dec 9 13:35:58 2004
***************
*** 6,12 ****
/** @file mod_pubcookie.c
* Apache pubcookie module
*
! * $Id: mod_pubcookie.c,v 1.161 2004/11/25 01:08:42 willey Exp $
*/
#define MAX_POST_DATA 2048 /* arbitrary */
--- 6,12 ----
/** @file mod_pubcookie.c
* Apache pubcookie module
*
! * $Id: mod_pubcookie.c,v 1.162 2004/12/09 21:35:58 willey Exp $
*/
#define MAX_POST_DATA 2048 /* arbitrary */
***************
*** 162,173 ****
noblank: %d\n\
login: %s\n\
appsrvid: %s\n\
! authtype_names: %s",
scfg->dirdepth,
scfg->noblank,
(scfg->login == NULL ? "" : scfg->login),
(scfg->appsrvid == NULL ? "" : (char *)scfg->appsrvid),
! (scfg->authtype_names == NULL ? "" : (char *)scfg->authtype_names));
}
--- 162,175 ----
noblank: %d\n\
login: %s\n\
appsrvid: %s\n\
! authtype_names: %s\n
! use_post: %d\n",
scfg->dirdepth,
scfg->noblank,
(scfg->login == NULL ? "" : scfg->login),
(scfg->appsrvid == NULL ? "" : (char *)scfg->appsrvid),
! (scfg->authtype_names == NULL ? "" : (char *)scfg->authtype_names),
! scfg->use_post);
}
***************
*** 555,567 ****
void clear_granting_cookie(request_rec *r) {
char *new_cookie;
pool *p = r->pool;
! new_cookie = ap_psprintf(p,
! "%s=; domain=%s; path=/; expires=%s;%s",
! PBC_G_COOKIENAME,
! PBC_ENTRPRS_DOMAIN,
! EARLIEST_EVER, secure_cookie);
ap_table_add(r->headers_out, "Set-Cookie", new_cookie);
}
--- 557,579 ----
void clear_granting_cookie(request_rec *r) {
char *new_cookie;
pool *p = r->pool;
+ pubcookie_server_rec *scfg;
+
+ scfg = (pubcookie_server_rec *) ap_get_module_config(
+ r->server->module_config, &pubcookie_module);
! if ( scfg->use_post )
! new_cookie = ap_psprintf(p, "%s=; path=/; expires=%s;%s",
! PBC_G_COOKIENAME,
! EARLIEST_EVER, secure_cookie);
! else
! new_cookie = ap_psprintf(p, "%s=; domain=%s; path=/; expires=%s;%s",
! PBC_G_COOKIENAME,
! PBC_ENTRPRS_DOMAIN,
! EARLIEST_EVER, secure_cookie);
+ ap_log_rerror(PC_LOG_DEBUG, r, "clear_granting_cookie: setting cookie: %s",
+ new_cookie);
ap_table_add(r->headers_out, "Set-Cookie", new_cookie);
}
***************
*** 1868,1877 ****
/* decrypt cookie. if credtrans is set, then it's from login server
to me. otherwise it's from me to me. */
if (!res && libpbc_rd_priv(p, scfg->sectext, cred_from_trans ?
! ap_get_server_name(r) : NULL,
! cred_from_trans ? 1 : 0,
! blob, bloblen,
! &plain, &plainlen)) {
ap_log_rerror(PC_LOG_ERR, r,
"credtrans: libpbc_rd_priv() failed");
res = -1;
--- 1880,1889 ----
/* decrypt cookie. if credtrans is set, then it's from login server
to me. otherwise it's from me to me. */
if (!res && libpbc_rd_priv(p, scfg->sectext, cred_from_trans ?
! ap_get_server_name(r) : NULL,
! cred_from_trans ? 1 : 0,
! blob, bloblen,
! &plain, &plainlen)) {
ap_log_rerror(PC_LOG_ERR, r,
"credtrans: libpbc_rd_priv() failed");
res = -1;
***************
*** 2924,2933 ****
creply = ap_table_get(args, PBC_CRED_TRANSFER_COOKIENAME);
/* Build the redirection */
!
! gr_cookie = ap_psprintf(p, "%s=%s; domain=%s; path=/;%s",
PBC_G_COOKIENAME, greply,
- ap_get_server_name(r),
secure_cookie);
ap_table_add(r->headers_out, "Set-Cookie", gr_cookie);
--- 2936,2944 ----
creply = ap_table_get(args, PBC_CRED_TRANSFER_COOKIENAME);
/* Build the redirection */
!
! gr_cookie = ap_psprintf(p, "%s=%s; path=/;%s",
PBC_G_COOKIENAME, greply,
secure_cookie);
ap_table_add(r->headers_out, "Set-Cookie", gr_cookie);
end of message
More information about the pubcookie-dev
mailing list