658fc795c84d9110bdfa444fc9eede842322759a angie Wed Mar 1 17:14:13 2017 -0800 Don't allow ',' in download file name -- replace with '.'. refs #18931 diff --git src/hg/hgTables/hgTables.c src/hg/hgTables/hgTables.c index 5a08393..a54119f 100644 --- src/hg/hgTables/hgTables.c +++ src/hg/hgTables/hgTables.c @@ -225,30 +225,32 @@ else return hgTablesName(); } void textOpen() /* Start up page in text format. (No need to close this). * In case of pipeline output to a compressor, it is closed * at main() exit. */ { hgBotDelayNoWarn(); // delay but suppress warning at 10-20 sec delay level because this is not html output. char *fileName = cartUsualString(cart, hgtaOutFileName, ""); // Don't allow '/' in fileName -- textOutInit interprets that as indicating a local file on disk subChar(fileName, '/', '_'); +// Don't allow ',' in fileName -- results in HTTP response header syntax error. +subChar(fileName, ',', '.'); char *compressType = cartUsualString(cart, hgtaCompressType, textOutCompressNone); if (doGenomeSpace()) { char hgsid[64]; struct tempName tn; safef(hgsid, sizeof(hgsid), "%s", cartSessionId(cart)); trashDirFile(&tn, "genomeSpace", hgsid, ".tmp"); gsTemp = cloneString(tn.forCgi); fileName = gsTemp; } compressPipeline = textOutInit(fileName, compressType, &saveStdout); }