From 78b928e862529f65e44ab0137cba2602fdc7d663 Mon Sep 17 00:00:00 2001 From: onefang Date: Tue, 14 Sep 2021 11:44:07 +1000 Subject: Reenable some debug logging. --- src/sledjchisl/sledjchisl.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/sledjchisl/sledjchisl.c b/src/sledjchisl/sledjchisl.c index 70d16d2..87af137 100644 --- a/src/sledjchisl/sledjchisl.c +++ b/src/sledjchisl/sledjchisl.c @@ -5965,7 +5965,7 @@ static int sessionValidate(reqData *Rd, inputForm *iF, inputValue *iV) // In this case the session stuff has to come from specific places. hashish = Rd->queries->getstr(Rd->queries, "hashish", true); -//d("O hashish %s", hashish); +d("O hashish %s", hashish); if (NULL != hashish) { char *t = xstrdup(hashish); @@ -6001,15 +6001,15 @@ static int sessionValidate(reqData *Rd, inputForm *iF, inputValue *iV) I("Validating SESSION hashish %s", hashish); } -//d("O toke_n_munchie %s", toke_n_munchie); -//d("O munchie %s", munchie); +d("O toke_n_munchie %s", toke_n_munchie); +d("O munchie %s", munchie); if (0 == ret) { struct stat st; struct timespec now; leaf = myHMACkey(getStrH(Rd->configs, "pepper"), hashish, TRUE); -//d("leaf %s", leaf); +d("leaf %s", leaf); if (linky) t0 = xmprintf("%s/sessions/%s.linky", scCache, leaf); else @@ -6042,12 +6042,12 @@ static int sessionValidate(reqData *Rd, inputForm *iF, inputValue *iV) else { timeStamp = xmprintf("%ld.%ld", (long) st.st_mtim.tv_sec, st.st_mtim.tv_nsec); -//d("timeStamp %s", timeStamp); +d("timeStamp %s", timeStamp); seshion = xmprintf("%s%s", tnm->getstr(tnm, "seshID", false), timeStamp); -//d("sesh %s", seshion); +d("sesh %s", seshion); t0 = myHMAC(seshion, FALSE); munchie = xmprintf("%s%s", t0, timeStamp); -//d("munchie %s", munchie); +d("munchie %s", munchie); free(t0); free(timeStamp); t1 = getStrH(Rd->body, "munchie"); @@ -6065,7 +6065,7 @@ static int sessionValidate(reqData *Rd, inputForm *iF, inputValue *iV) t1 = myHMAC(t0, FALSE); free(t0); -//d("toke_n_munchie %s", t1); +d("toke_n_munchie %s", t1); if (strcmp(t1, toke_n_munchie) != 0) { bitchSession(Rd, "Wrong toke_n_munchie for session.", "HMAC(UUID + munchie) != toke_n_munchie"); @@ -6080,10 +6080,10 @@ static int sessionValidate(reqData *Rd, inputForm *iF, inputValue *iV) t1 = myHMAC(t0, FALSE); free(t0); toke_n_munchie = t1; -//d("toke_n_munchie %s", t1); +d("toke_n_munchie %s", t1); } t1 = myHMACkey(getStrH(tnm, "salt"), toke_n_munchie, FALSE); -//d("hashish %s", t1); +d("hashish %s", t1); if (strcmp(t1, hashish) != 0) { bitchSession(Rd, "Wrong hashish for session.", "HMAC(toke_n_munchie + salt) != hashish"); -- cgit v1.1