Skip to content
Snippets Groups Projects
Commit a869fc69 authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Don't write uploaded filename and description to env variables

Environment variables are shared among all threads of a process (e.g. all nodes of a instance of sbbs), so this scheme of passing the uploaded filename and description to an external file tester (upload processor) via environment variables has always been fraught with the possibility of failure or flakiness in Synchronet v3. Since I very much doubt that any upload processor is actually using this scheme, just remove it. Upload processors can and should)use the sbbsfile.nam and sbbsfile.des text files created in the node directory instead.
parent b0df2d4e
No related branches found
No related tags found
No related merge requests found
......@@ -1015,7 +1015,6 @@ public:
/* upload.cpp */
bool uploadfile(file_t* f);
char sbbsfilename[128],sbbsfiledesc[128]; /* env vars */
bool upload(uint dirnum);
char upload_lastdesc[LEN_FDESC+1];
bool bulkupload(uint dirnum);
......
......@@ -61,10 +61,6 @@ bool sbbs_t::uploadfile(file_t* f)
attr(LIGHTGRAY);
bputs(cfg.ftest[i]->workstr);
safe_snprintf(sbbsfilename,sizeof(sbbsfilename),"SBBSFILENAME=%s",f->name);
putenv(sbbsfilename);
safe_snprintf(sbbsfiledesc,sizeof(sbbsfiledesc),"SBBSFILEDESC=%s",f->desc);
putenv(sbbsfiledesc);
SAFEPRINTF(str,"%ssbbsfile.nam",cfg.node_dir);
if((stream=fopen(str,"w"))!=NULL) {
fprintf(stream, "%s", f->desc);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment