aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authoronefang2021-09-14 11:44:07 +1000
committeronefang2021-09-14 11:44:07 +1000
commit78b928e862529f65e44ab0137cba2602fdc7d663 (patch)
treee541e8a9def15ea79f7cab57b9b2ff4918efee88
parentLog the account name people are trying to use. (diff)
downloadopensim-SC-78b928e862529f65e44ab0137cba2602fdc7d663.zip
opensim-SC-78b928e862529f65e44ab0137cba2602fdc7d663.tar.gz
opensim-SC-78b928e862529f65e44ab0137cba2602fdc7d663.tar.bz2
opensim-SC-78b928e862529f65e44ab0137cba2602fdc7d663.tar.xz
Reenable some debug logging.
-rw-r--r--src/sledjchisl/sledjchisl.c20
1 files 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)
5965 5965
5966 // In this case the session stuff has to come from specific places. 5966 // In this case the session stuff has to come from specific places.
5967 hashish = Rd->queries->getstr(Rd->queries, "hashish", true); 5967 hashish = Rd->queries->getstr(Rd->queries, "hashish", true);
5968//d("O hashish %s", hashish); 5968d("O hashish %s", hashish);
5969 if (NULL != hashish) 5969 if (NULL != hashish)
5970 { 5970 {
5971 char *t = xstrdup(hashish); 5971 char *t = xstrdup(hashish);
@@ -6001,15 +6001,15 @@ static int sessionValidate(reqData *Rd, inputForm *iF, inputValue *iV)
6001 I("Validating SESSION hashish %s", hashish); 6001 I("Validating SESSION hashish %s", hashish);
6002 } 6002 }
6003 6003
6004//d("O toke_n_munchie %s", toke_n_munchie); 6004d("O toke_n_munchie %s", toke_n_munchie);
6005//d("O munchie %s", munchie); 6005d("O munchie %s", munchie);
6006 if (0 == ret) 6006 if (0 == ret)
6007 { 6007 {
6008 struct stat st; 6008 struct stat st;
6009 struct timespec now; 6009 struct timespec now;
6010 6010
6011 leaf = myHMACkey(getStrH(Rd->configs, "pepper"), hashish, TRUE); 6011 leaf = myHMACkey(getStrH(Rd->configs, "pepper"), hashish, TRUE);
6012//d("leaf %s", leaf); 6012d("leaf %s", leaf);
6013 if (linky) 6013 if (linky)
6014 t0 = xmprintf("%s/sessions/%s.linky", scCache, leaf); 6014 t0 = xmprintf("%s/sessions/%s.linky", scCache, leaf);
6015 else 6015 else
@@ -6042,12 +6042,12 @@ static int sessionValidate(reqData *Rd, inputForm *iF, inputValue *iV)
6042 else 6042 else
6043 { 6043 {
6044 timeStamp = xmprintf("%ld.%ld", (long) st.st_mtim.tv_sec, st.st_mtim.tv_nsec); 6044 timeStamp = xmprintf("%ld.%ld", (long) st.st_mtim.tv_sec, st.st_mtim.tv_nsec);
6045//d("timeStamp %s", timeStamp); 6045d("timeStamp %s", timeStamp);
6046 seshion = xmprintf("%s%s", tnm->getstr(tnm, "seshID", false), timeStamp); 6046 seshion = xmprintf("%s%s", tnm->getstr(tnm, "seshID", false), timeStamp);
6047//d("sesh %s", seshion); 6047d("sesh %s", seshion);
6048 t0 = myHMAC(seshion, FALSE); 6048 t0 = myHMAC(seshion, FALSE);
6049 munchie = xmprintf("%s%s", t0, timeStamp); 6049 munchie = xmprintf("%s%s", t0, timeStamp);
6050//d("munchie %s", munchie); 6050d("munchie %s", munchie);
6051 free(t0); 6051 free(t0);
6052 free(timeStamp); 6052 free(timeStamp);
6053 t1 = getStrH(Rd->body, "munchie"); 6053 t1 = getStrH(Rd->body, "munchie");
@@ -6065,7 +6065,7 @@ static int sessionValidate(reqData *Rd, inputForm *iF, inputValue *iV)
6065 t1 = myHMAC(t0, FALSE); 6065 t1 = myHMAC(t0, FALSE);
6066 free(t0); 6066 free(t0);
6067 6067
6068//d("toke_n_munchie %s", t1); 6068d("toke_n_munchie %s", t1);
6069 if (strcmp(t1, toke_n_munchie) != 0) 6069 if (strcmp(t1, toke_n_munchie) != 0)
6070 { 6070 {
6071 bitchSession(Rd, "Wrong toke_n_munchie for session.", "HMAC(UUID + munchie) != toke_n_munchie"); 6071 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)
6080 t1 = myHMAC(t0, FALSE); 6080 t1 = myHMAC(t0, FALSE);
6081 free(t0); 6081 free(t0);
6082 toke_n_munchie = t1; 6082 toke_n_munchie = t1;
6083//d("toke_n_munchie %s", t1); 6083d("toke_n_munchie %s", t1);
6084 } 6084 }
6085 t1 = myHMACkey(getStrH(tnm, "salt"), toke_n_munchie, FALSE); 6085 t1 = myHMACkey(getStrH(tnm, "salt"), toke_n_munchie, FALSE);
6086//d("hashish %s", t1); 6086d("hashish %s", t1);
6087 if (strcmp(t1, hashish) != 0) 6087 if (strcmp(t1, hashish) != 0)
6088 { 6088 {
6089 bitchSession(Rd, "Wrong hashish for session.", "HMAC(toke_n_munchie + salt) != hashish"); 6089 bitchSession(Rd, "Wrong hashish for session.", "HMAC(toke_n_munchie + salt) != hashish");