Skip to content

Commit

Permalink
Remove all the annoying debug messages
Browse files Browse the repository at this point in the history
  • Loading branch information
lmcd committed Apr 4, 2012
1 parent be4570a commit c78214c
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions src/mod_auth_pubtkt.c
Original file line number Diff line number Diff line change
Expand Up @@ -768,32 +768,26 @@ static int auth_pubtkt_check(request_rec *r) {

dump_config(r);

fprintf(stderr,"a\n");
if (!current_auth || strcasecmp(current_auth, MOD_AUTH_PUBTKT_AUTH_TYPE)) {
return DECLINED;
}

fprintf(stderr,"one\n");

/* Module misconfigured unless login_url is set */
if (!conf->login_url) {
fprintf(stderr,"err0\n");
ap_log_rerror(APLOG_MARK, APLOG_ERR, APR_SUCCESS, r,
"TKT: TKTAuthLoginURL missing");
return HTTP_INTERNAL_SERVER_ERROR;
}

/* Module misconfigured unless public key set */
if (!sconf->pubkey) {
fprintf(stderr,"err1\n");
ap_log_rerror(APLOG_MARK, APLOG_ERR, APR_SUCCESS, r,
"TKT: TKTAuthPublicKey missing");
return HTTP_INTERNAL_SERVER_ERROR;
}

/* Redirect/login if scheme not "https" and require_ssl is set */
if (conf->require_ssl > 0 && strcmp(scheme, "https") != 0) {
fprintf(stderr,"err2\n");
ap_log_rerror(APLOG_MARK, APLOG_WARNING, APR_SUCCESS, r,
"TKT: redirect/login - unsecured request, TKTAuthRequireSSL is on");
return redirect(r, conf->login_url);
Expand All @@ -802,7 +796,6 @@ static int auth_pubtkt_check(request_rec *r) {
/* Check for ticket cookie */
ticket = get_cookie_ticket(r);
if (ticket == NULL) {
fprintf(stderr,"err3\n");
ap_log_rerror(APLOG_MARK, APLOG_INFO, APR_SUCCESS, r,
"TKT: no ticket found - redirecting to login URL");
return redirect(r, conf->login_url);
Expand All @@ -812,7 +805,6 @@ static int auth_pubtkt_check(request_rec *r) {
parsed = validate_parse_ticket(r, ticket);

if (parsed == NULL) {
fprintf(stderr,"err4\n");
ap_log_rerror(APLOG_MARK, APLOG_INFO, APR_SUCCESS, r,
"TKT: invalid ticket found - redirecting to login URL");
return redirect(r, conf->login_url);
Expand All @@ -827,8 +819,6 @@ static int auth_pubtkt_check(request_rec *r) {
return redirect(r, conf->login_url);
}

fprintf(stderr,"c\n");

/* Valid ticket, check timeout - redirect/timed-out if so */
if (!check_timeout(r, parsed)) {
ap_log_rerror(APLOG_MARK, APLOG_INFO, APR_SUCCESS, r,
Expand All @@ -843,22 +833,18 @@ static int auth_pubtkt_check(request_rec *r) {
return redirect(r, url);
}

fprintf(stderr,"d\n");

ap_log_rerror(APLOG_MARK, APLOG_INFO, APR_SUCCESS, r,
"TKT: TWO");

/* Attempt to refresh cookie if it will expires - redirect on get if so */
if ( !check_grace_period(r, parsed) && strcmp(r->method, "GET") == 0 ) {
fprintf(stderr,"fack1\n");
ap_log_rerror(APLOG_MARK, APLOG_INFO, APR_SUCCESS, r,
"TKT: ticket grace period - redirecting to refresh URL");
return redirect(r, (conf->refresh_url ? conf->refresh_url : conf->login_url));
}

/* Check tokens - redirect/unauthorised if so */
if (!check_tokens(r, parsed)) {
fprintf(stderr,"fack2\n");
return redirect(r, conf->unauth_url ? conf->unauth_url : conf->login_url);
}

Expand Down

0 comments on commit c78214c

Please sign in to comment.