156dbcfc96c9a4a5eba481f8d979700b0ca1024e
galt
  Mon Feb 3 06:28:18 2025 -0800
Fixing security concern in hgEncodeVocab. fixes #287. Note that actual full cleanup by removing the unneeded encode/cv.ra from trackDb files has not been done yet., and making the code tolerate its presence or absence in the trackDb.ra files, at the start of the controlledVocabulary setting.

diff --git src/hg/lib/cv.c src/hg/lib/cv.c
index 70eed9412b2..15bcaef29bf 100644
--- src/hg/lib/cv.c
+++ src/hg/lib/cv.c
@@ -140,31 +140,31 @@
 return ret;
 }
 
 /*
 TBD
 char *cvLabDeNormalize(char *minimalTerm)
 // returns lab name with parenthesized trailing info, by lookup in cv.ra, and restores
 // other oddities caught by Normalize
 }
 */
 
 static char *cvFileRequested = NULL;
 
 void cvFileDeclare(const char *filePath)
 // Declare an altername cv.ra file to use
-// (The cv.ra file is normally discovered based upon CGI/Tool and envirnment)
+// (The cv.ra file is normally discovered based upon CGI/Tool and environment)
 {
 cvFileRequested = cloneString(filePath);
 }
 
 const char *cvFile()
 // return default location of cv.ra
 {
 static char filePath[PATH_LEN];
 if (cvFileRequested != NULL)
     {
     safecpy(filePath, sizeof(filePath), cvFileRequested);
     }
 else
     {
     char *root = hCgiRoot();