aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authoronefang2020-05-18 14:18:56 +1000
committeronefang2020-05-18 14:18:56 +1000
commitb8d3f5690d2a9d93d7065d058d6df00621bc50f8 (patch)
treeb7d7719736f95d6defb42aec67c90f00a27e635e
parentFix the last of the known leaks. (diff)
downloadopensim-SC_OLD-b8d3f5690d2a9d93d7065d058d6df00621bc50f8.zip
opensim-SC_OLD-b8d3f5690d2a9d93d7065d058d6df00621bc50f8.tar.gz
opensim-SC_OLD-b8d3f5690d2a9d93d7065d058d6df00621bc50f8.tar.bz2
opensim-SC_OLD-b8d3f5690d2a9d93d7065d058d6df00621bc50f8.tar.xz
Don't add two user queries.
-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 02bebe6..00c4c19 100644
--- a/src/sledjchisl/sledjchisl.c
+++ b/src/sledjchisl/sledjchisl.c
@@ -410,7 +410,7 @@ struct _reqData
410{ 410{
411 lua_State *L; 411 lua_State *L;
412 qhashtbl_t *configs, *queries, *body, *cookies, *headers, *valid, *stuff, *database, *Rcookies, *Rheaders; 412 qhashtbl_t *configs, *queries, *body, *cookies, *headers, *valid, *stuff, *database, *Rcookies, *Rheaders;
413 char *Scheme, *Host, *Method, *Script, *RUri, *doit, *form, *output, *outQuery; 413 char *Scheme, *Host, *Method, *Script, *Path, *RUri, *doit, *form, *output, *outQuery;
414 sesh shs, *lnk; 414 sesh shs, *lnk;
415 MYSQL *db; 415 MYSQL *db;
416 gridStats *stats; 416 gridStats *stats;
@@ -4928,7 +4928,7 @@ static void accountWebHeaders(reqData *Rd, inputForm *oF) //, char *name)
4928 { 4928 {
4929 char *nm = qstrreplace("tr", xstrdup(Rd->shs.name), " ", "+"); 4929 char *nm = qstrreplace("tr", xstrdup(Rd->shs.name), " ", "+");
4930 4930
4931 Rd->reply->addstrf(Rd->reply, "<h3>You are <a href='https://%s%s?user=%s'>%s</a></h3>\n", Rd->Host, Rd->RUri, nm, Rd->shs.name); 4931 Rd->reply->addstrf(Rd->reply, "<h3>You are <a href='https://%s%s%s?user=%s'>%s</a></h3>\n", Rd->Host, Rd->Script, Rd->Path, nm, Rd->shs.name);
4932 Rd->reply->addstr(Rd->reply, linky); 4932 Rd->reply->addstr(Rd->reply, linky);
4933 free(nm); 4933 free(nm);
4934 } 4934 }
@@ -5649,7 +5649,7 @@ static void accountExploreValidatedVouchersWeb(reqData *Rd, inputForm *oF, input
5649 qhashtbl_t *tnm = *((qhashtbl_t **) obj.data); 5649 qhashtbl_t *tnm = *((qhashtbl_t **) obj.data);
5650 char *nm = qstrreplace("tr", xstrdup(obj.name), " ", "+"); 5650 char *nm = qstrreplace("tr", xstrdup(obj.name), " ", "+");
5651 5651
5652 Rd->reply->addstrf(Rd->reply, "<tr><td><a href='https://%s%s?user=%s'>%s</a></td>", Rd->Host, Rd->RUri, nm, obj.name); 5652 Rd->reply->addstrf(Rd->reply, "<tr><td><a href='https://%s%s%s?user=%s'>%s</a></td>", Rd->Host, Rd->Script, Rd->Path, nm, obj.name);
5653 Rd->reply->addstrf(Rd->reply, "<td>%s</td><td>%s</td><td>%s</td></tr>", getStrH(tnm, "voucher"), getStrH(tnm, "level"), getStrH(tnm, "title")); 5653 Rd->reply->addstrf(Rd->reply, "<td>%s</td><td>%s</td><td>%s</td></tr>", getStrH(tnm, "voucher"), getStrH(tnm, "level"), getStrH(tnm, "title"));
5654 free(nm); 5654 free(nm);
5655 tnm->clear(tnm); 5655 tnm->clear(tnm);
@@ -6860,8 +6860,8 @@ if ((strcmp("HTTP_COOKIE", ky) == 0) || (strcmp("CONTENT_LENGTH", ky) == 0) || (
6860 // The FCGI paramaters sent from the server, are converted to environment variablse for the fcgi2 SDK. 6860 // The FCGI paramaters sent from the server, are converted to environment variablse for the fcgi2 SDK.
6861 // The FCGI spec doesn't mention what these are. except FCGI_WEB_SERVER_ADDRS. 6861 // The FCGI spec doesn't mention what these are. except FCGI_WEB_SERVER_ADDRS.
6862 char *Role = Rd->headers->getstr(Rd->headers, "FCGI_ROLE", false); 6862 char *Role = Rd->headers->getstr(Rd->headers, "FCGI_ROLE", false);
6863 char *Path = Rd->headers->getstr(Rd->headers, "PATH_INFO", false); 6863 Rd->Path = Rd->headers->getstr(Rd->headers, "PATH_INFO", false);
6864// if (NULL == Path) {msleep(1000); continue;} 6864// if (NULL == Rd->Path) {msleep(1000); continue;}
6865 char *Length = Rd->headers->getstr(Rd->headers, "CONTENT_LENGTH", false); 6865 char *Length = Rd->headers->getstr(Rd->headers, "CONTENT_LENGTH", false);
6866//char *Type = Rd->headers->getstr(Rd->headers, "CONTENT_TYPE", false); 6866//char *Type = Rd->headers->getstr(Rd->headers, "CONTENT_TYPE", false);
6867 Rd->Method = Rd->headers->getstr(Rd->headers, "REQUEST_METHOD", false); 6867 Rd->Method = Rd->headers->getstr(Rd->headers, "REQUEST_METHOD", false);
@@ -6906,7 +6906,7 @@ t("QUERY");
6906T("ignoring QUERY"); 6906T("ignoring QUERY");
6907 Rd->queries = qhashtbl(0, 0); 6907 Rd->queries = qhashtbl(0, 0);
6908 free(Rd->RUri); 6908 free(Rd->RUri);
6909 Rd->RUri = xmprintf("%s%s", Rd->Script, Path); 6909 Rd->RUri = xmprintf("%s%s", Rd->Script, Rd->Path);
6910 } 6910 }
6911t("BODY"); 6911t("BODY");
6912 char *Body = NULL; 6912 char *Body = NULL;
@@ -6927,10 +6927,10 @@ t("BODY");
6927 free(Body); 6927 free(Body);
6928 santize(Rd->body); 6928 santize(Rd->body);
6929 6929
6930 I("%s %s://%s%s -> %s%s", Rd->Method, Rd->Scheme, Rd->Host, Rd->RUri, webRoot, Path); 6930 I("%s %s://%s%s -> %s%s", Rd->Method, Rd->Scheme, Rd->Host, Rd->RUri, webRoot, Rd->Path);
6931 D("Started FCGI web request ROLE = %s, body is %s bytes, pid %d.", Role, Length, getpid()); 6931 D("Started FCGI web request ROLE = %s, body is %s bytes, pid %d.", Role, Length, getpid());
6932 6932
6933 if (NULL == Path) 6933 if (NULL == Rd->Path)
6934 { 6934 {
6935 E("NULL path in FCGI request!"); 6935 E("NULL path in FCGI request!");
6936 Rd->Rheaders->putstr(Rd->Rheaders, "Status", "404 Not Found"); 6936 Rd->Rheaders->putstr(Rd->Rheaders, "Status", "404 Not Found");
@@ -6991,11 +6991,11 @@ t("BODY");
6991 } 6991 }
6992 6992
6993 memset(toybuf, 0, sizeof(toybuf)); 6993 memset(toybuf, 0, sizeof(toybuf));
6994 snprintf(toybuf, sizeof(toybuf), "%s%s", webRoot, Path); 6994 snprintf(toybuf, sizeof(toybuf), "%s%s", webRoot, Rd->Path);
6995 HTMLfile *thisFile = checkHTMLcache(toybuf); 6995 HTMLfile *thisFile = checkHTMLcache(toybuf);
6996 if (NULL == thisFile) 6996 if (NULL == thisFile)
6997 { 6997 {
6998 dynPage *dp = dynPages->get(dynPages, &Path[1], NULL, false); 6998 dynPage *dp = dynPages->get(dynPages, &Rd->Path[1], NULL, false);
6999 if (NULL == dp) 6999 if (NULL == dp)
7000 { 7000 {
7001 E("Can't access file %s", toybuf); 7001 E("Can't access file %s", toybuf);