浏览代码

HPCC-26059 Remove Util.CmdProcess to fix security hole

Signed-off-by: Gavin Halliday <gavin.halliday@lexisnexis.com>
Gavin Halliday 4 年之前
父节点
当前提交
dc01699b23
共有 3 个文件被更改,包括 6 次插入28 次删除
  1. 0 11
      ecllibrary/std/system/Util.ecl
  2. 2 15
      plugins/fileservices/fileservices.cpp
  3. 4 2
      plugins/fileservices/fileservices.hpp

+ 0 - 11
ecllibrary/std/system/Util.ecl

@@ -11,17 +11,6 @@ import lib_fileservices;
 RETURN MODULE
 
 /**
- * Execute an external program.
- *
- * @param prog          The name of the program to excute.  Can include command line options.
- * @param src           The text that is piped into the program as stdin.
- * @returns             The text output from the pipe program.
- */
- 
-EXPORT string CmdProcess(varstring prog, string src) :=
-    lib_fileservices.FileServices.CmdProcess2(prog, src) : deprecated('This function will be removed in 8.4.x');
-
-/**
  * Returns the host name associated with a particular ip.
  *
  * @param ipaddress     The ip address to resolve.

文件差异内容过多而无法显示
+ 2 - 15
plugins/fileservices/fileservices.cpp


+ 4 - 2
plugins/fileservices/fileservices.hpp

@@ -52,8 +52,6 @@ FILESERVICES_API void FILESERVICES_CALL fsSendEmailAttachText_v2(ICodeContext *
 FILESERVICES_API void FILESERVICES_CALL fsSendEmailAttachText(ICodeContext * ctx, const char * to, const char * subject, const char * body, const char * attachment, const char * mimeType, const char * attachmentName, const char * mailServer, unsigned int port, const char * sender);
 FILESERVICES_API void FILESERVICES_CALL fsSendEmailAttachData_v2(ICodeContext * ctx, const char * to, const char * subject, const char * body, size32_t lenAttachment, const void * attachment, const char * mimeType, const char * attachmentName, const char * mailServer, unsigned int port, const char * sender, const char *cc, const char *bcc, bool highPriority);
 FILESERVICES_API void FILESERVICES_CALL fsSendEmailAttachData(ICodeContext * ctx, const char * to, const char * subject, const char * body, size32_t lenAttachment, const void * attachment, const char * mimeType, const char * attachmentName, const char * mailServer, unsigned int port, const char * sender);
-FILESERVICES_API char * FILESERVICES_CALL fsCmdProcess(const char *prog, const char *src);
-FILESERVICES_API void FILESERVICES_CALL fsCmdProcess2(unsigned & tgtLen, char * & tgt, const char *prog, unsigned srcLen, const char * src);
 FILESERVICES_API void FILESERVICES_CALL fsSprayFixed(ICodeContext *ctx, const char * sourceIP, const char * sourcePath, int recordSize, const char * destinationGroup, const char * destinationLogicalName, int timeOut, const char * espServerIpPort, int maxConnections, bool overwrite=false, bool replicate=false, bool compress=false, bool failIfNoSourceFile=false);
 FILESERVICES_API void FILESERVICES_CALL fsSprayFixed_v2(ICodeContext *ctx, const char * sourceIP, const char * sourcePath, int recordSize, const char * destinationGroup, const char * destinationLogicalName, int timeOut, const char * espServerIpPort, int maxConnections, bool overwrite=false, bool replicate=false, bool compress=false, bool failIfNoSourceFile=false, int expireDays=-1);
 FILESERVICES_API void FILESERVICES_CALL fsSprayFixed_v3(ICodeContext *ctx, const char * sourceIP, const char * sourcePath, int recordSize, const char * destinationGroup, const char * destinationLogicalName, int timeOut, const char * espServerIpPort, int maxConnections, bool overwrite=false, bool replicate=false, bool compress=false, bool failIfNoSourceFile=false, int expireDays=-1, const char * dfuServerQueue=nullptr);
@@ -174,6 +172,10 @@ FILESERVICES_API int FILESERVICES_CALL fsGetExpireDays(ICodeContext * ctx, const
 FILESERVICES_API void FILESERVICES_CALL fsSetExpireDays(ICodeContext * ctx, const char *lfn, int expireDays);
 FILESERVICES_API void FILESERVICES_CALL fsClearExpireDays(ICodeContext * ctx, const char *lfn);
 
+//Deprecated, but kept to allow old workunits to load
+FILESERVICES_API char * FILESERVICES_CALL fsCmdProcess(const char *prog, const char *src);
+FILESERVICES_API void FILESERVICES_CALL fsCmdProcess2(unsigned & tgtLen, char * & tgt, const char *prog, unsigned srcLen, const char * src);
+
 }
 
 #endif