b04a39a028980ea32b2ac62950bdff0a67de16d0
galt
Wed Jul 18 14:48:19 2018 -0700
Add missing CSP header to pages not handled automatically by library functions. refs #21729.
diff --git src/hg/phyloPng/phyloPng.c src/hg/phyloPng/phyloPng.c
index 2eb5aa0..ee9dc37 100644
--- src/hg/phyloPng/phyloPng.c
+++ src/hg/phyloPng/phyloPng.c
@@ -539,31 +539,31 @@
"6. Wrap-in-html is useful when the browser automatically shrinks a large image.\n"
"This option keeps the image view full in the browser automatically.\n"
"
"
);
cartWebEnd();
return 0;
}
else
usage("-phyloPng_tree is a required 'option' or cgi variable.");
}
if (htmlPageWrapper)
{
printf("Content-type: text/html\r\n");
printf("\r\n");
- puts("
"); + printf("\n%sPhyloTree parse error ",getCspMetaHeader()); /* we dont think the specific error message coming back are correct or useful * so supply a generic err msg */ htmlPrintf("Original input tree:\n[%s]\n\n",cgiString("phyloPng_tree")); htmlPrintf("Input tree as passed to parser:\n[%s]\n\n",phyloData); printf("Parser syntax error:\n%s",errMsg); puts(""); } else { warn("%s", errMsg); } freez(&errMsg); freez(&phyloData); return 0; } @@ -665,31 +665,31 @@ lengthLegend = lengthLegend && branchLengths; /* moot without lengths */ if (lengthLegend) { int fHeight = mgFontPixelHeight(font); height -= (MARGIN+2*fHeight); } phyloTreeLayoutBL(phyloTree, &maxDepth, &numLeafs, 0, font, &maxLabelWidth, width, &minMaxFactor, 0.0); if (layoutErrMsg[0] != 0) { if (onWeb) { printf("Content-type: text/html\r\n"); printf("\r\n"); - puts("PhyloTree error "); + printf("\n%sPhyloTree error ",getCspMetaHeader()); printf("input tree: [%s]\n\n%s",cgiString("phyloPng_tree"),layoutErrMsg); puts(""); } else { warn("%s", layoutErrMsg); } freez(&phyloData); mgFree(&mg); return 0; } if (branchLengths) phyloTreePngBL(phyloTree, maxDepth, numLeafs, maxLabelWidth, width, height, mg, font, minMaxFactor, FALSE);