Diff for /parser3/src/classes/file.C between versions 1.83 and 1.85

version 1.83, 2002/06/11 14:14:15 version 1.85, 2002/06/18 11:09:02
Line 195  static bool is_safe_env_key(const char * Line 195  static bool is_safe_env_key(const char *
         if(strncmp(key, "CGI_", 4)==0)          if(strncmp(key, "CGI_", 4)==0)
                 return true;                  return true;
         for(int i=0; suexec_safe_env_lst[i]; i++) {          for(int i=0; suexec_safe_env_lst[i]; i++) {
                 if(strncmp(key, suexec_safe_env_lst[i], strlen(suexec_safe_env_lst[i]))==0)                  if(strcmp(key, suexec_safe_env_lst[i])==0)
                         return true;                          return true;
         }          }
         return false;          return false;
 }  }
 static void append_env_pair(const Hash::Key& key, Hash::Val *value, void *info) {  static void append_env_pair(const Hash::Key& key, Hash::Val *value, void *info) {
         Hash& hash=*static_cast<Hash *>(info);          Hash& hash=*static_cast<Hash *>(info);
         if(is_safe_env_key(key.cstr()))          if(!is_safe_env_key(key.cstr()))
                 hash.put(key, &static_cast<Value *>(value)->as_string());                  throw Exception("parser.runtime",
                           &key,
                           "not safe environment variable");
           hash.put(key, &static_cast<Value *>(value)->as_string());
 }  }
 static void pass_cgi_header_attribute(Array::Item *value, void *info) {  static void pass_cgi_header_attribute(Array::Item *value, void *info) {
         String& string=*static_cast<String *>(value);          String& string=*static_cast<String *>(value);

Removed from v.1.83  
changed lines
  Added in v.1.85


E-mail: