From b09914dad71cf030e57b4aa3195e702cb80aba10 Mon Sep 17 00:00:00 2001 From: KangShin Date: Fri, 25 Sep 2020 16:02:51 +0900 Subject: [PATCH] =?UTF-8?q?zip=20=ED=8C=8C=EC=9D=BC=20=EB=82=B4=EB=B6=80?= =?UTF-8?q?=20=EA=B2=80=EC=82=AC=20=EC=88=98=ED=96=89=20=ED=9B=84=20?= =?UTF-8?q?=EC=A0=9C=EC=99=B8=EC=82=AC=EC=9C=A0=20=EC=B6=9C=EB=A0=A5?= =?UTF-8?q?=EB=90=98=EB=8F=84=EB=A1=9D=20=EA=B8=B0=EB=8A=A5=20=EA=B5=AC?= =?UTF-8?q?=ED=98=84.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Components/SGPopUp/Transfer_Denied.razor | 17 +- .../SGDicData/SGUnitData/FileAddManage.cs | 388 +++++++++++++++++- src/OpenNetLinkApp/wwwroot/conf/HSText.xml | 35 ++ 3 files changed, 415 insertions(+), 25 deletions(-) diff --git a/src/OpenNetLinkApp/Components/SGPopUp/Transfer_Denied.razor b/src/OpenNetLinkApp/Components/SGPopUp/Transfer_Denied.razor index 1c325ff18..e15d052b1 100644 --- a/src/OpenNetLinkApp/Components/SGPopUp/Transfer_Denied.razor +++ b/src/OpenNetLinkApp/Components/SGPopUp/Transfer_Denied.razor @@ -61,14 +61,15 @@
@strExceptionContent
-
diff --git a/src/OpenNetLinkApp/Data/SGDicData/SGUnitData/FileAddManage.cs b/src/OpenNetLinkApp/Data/SGDicData/SGUnitData/FileAddManage.cs index 680198e9d..308f40e45 100644 --- a/src/OpenNetLinkApp/Data/SGDicData/SGUnitData/FileAddManage.cs +++ b/src/OpenNetLinkApp/Data/SGDicData/SGUnitData/FileAddManage.cs @@ -235,32 +235,32 @@ public string SetExceptionReason(eFileAddErr err) case eFileAddErr.eUnZipInnerZipPassword: // zip파일에 내부의 zip 비밀번호 사용 중 /* TODO */ - /* str = xmlConf.GetTitle("T_eUnZipInnerZipPassword"); */ - str = xmlConf.GetTitle("T_eFAZipPW"); + str = xmlConf.GetTitle("T_eUnZipInnerZipPassword"); + //str = xmlConf.GetTitle("T_eFAZipPW"); break; case eFileAddErr.eUnZipInnerExt: // zip파일에 내부의 zip 확장자 제한 파일 포함 /* TODO */ - /* str = xmlConf.GetTitle("T_eUnZipInnerExt"); */ - str = xmlConf.GetTitle("T_eFAEXT"); + str = xmlConf.GetTitle("T_eUnZipInnerExt"); + //str = xmlConf.GetTitle("T_eFAEXT"); break; case eFileAddErr.eUnZipInnerExtChange: // zip파일에 내부의 zip 위변조 파일 포함 /* TODO */ - /* str = xmlConf.GetTitle("T_eUnZipInnerExtChange"); */ - str = xmlConf.GetTitle("T_eFACHG"); + str = xmlConf.GetTitle("T_eUnZipInnerExtChange"); + //str = xmlConf.GetTitle("T_eFACHG"); break; case eFileAddErr.eUnZipInnerExtUnknown: // zip파일에 내부의 zip 알수 없는 파일형식 포함 /* TODO */ - /* str = xmlConf.GetTitle("T_eUnZipInnerExtUnknown"); */ - str = xmlConf.GetTitle("T_eFAUNKNOWN"); + str = xmlConf.GetTitle("T_eUnZipInnerExtUnknown"); + //str = xmlConf.GetTitle("T_eFAUNKNOWN"); break; - case eFileAddErr.eUnZipInnerFileEmpty: // zip파일에 내부의 zip 비어있는 파일 + case eFileAddErr.eUnZipInnerFileEmpty: // zip파일에 내부의 zip 비어있는 파일 /* TODO */ - /* str = xmlConf.GetTitle("T_eUnZipInnerFileEmpty"); */ - str = xmlConf.GetTitle("T_eFAEMPTY"); + str = xmlConf.GetTitle("T_eUnZipInnerFileEmpty"); + //str = xmlConf.GetTitle("T_eFAEMPTY"); break; case eFileAddErr.eUnZipInnerLengthOver: // zip파일에 내부의 zip Length Over @@ -793,6 +793,186 @@ public int GetFileFolderNameOverExceptionCount() return count; } + /** + * @breif zip 파일의 내부 zip 파일 Open 실패한 개수를 반환한다. + * @return zip 파일의 내부 zip 파일 Open 실패한 개수 + */ + public int GetInnerZipOpenFailCount() + { + int nTotalCount = GetAddErrCount(); + if (nTotalCount <= 0) + return nTotalCount; + + int count = 0; + for (int i = 0; i < nTotalCount; i++) + { + eFileAddErr e = m_FileAddErrList[i].eErrType; + if (e == eFileAddErr.eUnZipInnerZipOpenFail) // zip 파일의 내부 zip 파일 Open 실패로 제외 + count++; + } + return count; + } + + /** + * @breif zip 파일의 내부 zip 파일 비번 사용 중인 개수를 반환한다. + * @return zip 파일의 내부 zip 파일 비번 사용 중인 개수 + */ + public int GetInnerZipPassWordCount() + { + int nTotalCount = GetAddErrCount(); + if (nTotalCount <= 0) + return nTotalCount; + + int count = 0; + for (int i = 0; i < nTotalCount; i++) + { + eFileAddErr e = m_FileAddErrList[i].eErrType; + if (e == eFileAddErr.eUnZipInnerZipPassword) // zip 파일의 내부 zip 파일 비번 사용 중인 개수 + count++; + } + return count; + } + + /** + * @breif zip 파일의 내부 확장자 제한 파일 개수를 반환한다. + * @return zip 파일의 내부 확장자 제한 파일 개수 + */ + public int GetInnerZipExtCount() + { + int nTotalCount = GetAddErrCount(); + if (nTotalCount <= 0) + return nTotalCount; + + int count = 0; + for (int i = 0; i < nTotalCount; i++) + { + eFileAddErr e = m_FileAddErrList[i].eErrType; + if (e == eFileAddErr.eUnZipInnerExt) // zip 파일의 내부 확장자 제한 파일 개수 + count++; + } + return count; + } + + /** + * @breif zip 파일의 내부 확장자 변경 파일 개수를 반환한다. + * @return zip 파일의 내부 확장자 변경 파일 개수 + */ + public int GetInnerZipExtChangeCount() + { + int nTotalCount = GetAddErrCount(); + if (nTotalCount <= 0) + return nTotalCount; + + int count = 0; + for (int i = 0; i < nTotalCount; i++) + { + eFileAddErr e = m_FileAddErrList[i].eErrType; + if (e == eFileAddErr.eUnZipInnerExtChange) // zip 파일의 내부 확장자 변경 파일 개수 + count++; + } + return count; + } + + /** + * @breif zip 파일의 내부 알수 없는 파일 개수를 반환한다. + * @return zip 파일의 내부 알수 없는 파일 개수 + */ + public int GetInnerZipUnKnownCount() + { + int nTotalCount = GetAddErrCount(); + if (nTotalCount <= 0) + return nTotalCount; + + int count = 0; + for (int i = 0; i < nTotalCount; i++) + { + eFileAddErr e = m_FileAddErrList[i].eErrType; + if (e == eFileAddErr.eUnZipInnerExtUnknown) // zip 파일의 내부 알수 없는 파일 개수 + count++; + } + return count; + } + + /** + * @breif zip 파일의 내부 빈 파일 개수를 반환한다. + * @return zip 파일의 내부 빈 파일 개수 + */ + public int GetInnerZipEmptyCount() + { + int nTotalCount = GetAddErrCount(); + if (nTotalCount <= 0) + return nTotalCount; + + int count = 0; + for (int i = 0; i < nTotalCount; i++) + { + eFileAddErr e = m_FileAddErrList[i].eErrType; + if (e == eFileAddErr.eUnZipInnerFileEmpty) // zip 파일의 내부 빈 파일 개수 + count++; + } + return count; + } + + /** + * @breif zip 파일의 내부 zip Length Over 개수를 반환한다. + * @return zip 파일의 내부 zip Length Over 개수 + */ + public int GetInnerZipLengthOverCount() + { + int nTotalCount = GetAddErrCount(); + if (nTotalCount <= 0) + return nTotalCount; + + int count = 0; + for (int i = 0; i < nTotalCount; i++) + { + eFileAddErr e = m_FileAddErrList[i].eErrType; + if (e == eFileAddErr.eUnZipInnerLengthOver) // zip 파일의 내부 zip Length Over 개수 + count++; + } + return count; + } + + /** + * @breif zip 파일의 내부 검사 후 남아있는 zip 파일 개수를 반환한다. + * @return zip 파일의 내부 검사 후 남아있는 zip 파일 개수 + */ + public int GetInnerZipLeftZipCount() + { + int nTotalCount = GetAddErrCount(); + if (nTotalCount <= 0) + return nTotalCount; + + int count = 0; + for (int i = 0; i < nTotalCount; i++) + { + eFileAddErr e = m_FileAddErrList[i].eErrType; + if (e == eFileAddErr.eUnZipInnerLeftZip) // zip 파일의 내부 검사 후 남아있는 zip 파일 개수 + count++; + } + return count; + } + + /** + * @breif zip 파일의 내부 DRM 파일 개수를 반환한다. + * @return zip 파일의 내부 DRM 파일 개수 + */ + public int GetInnerZipDRMCount() + { + int nTotalCount = GetAddErrCount(); + if (nTotalCount <= 0) + return nTotalCount; + + int count = 0; + for (int i = 0; i < nTotalCount; i++) + { + eFileAddErr e = m_FileAddErrList[i].eErrType; + if (e == eFileAddErr.eUnZipInnerDRM) // zip 파일의 내부 DRM 파일 개수 + count++; + } + return count; + } + public static bool GetRegCountEnable(int nStandardCount, int nRegCount) { if (nStandardCount < nRegCount) @@ -1097,7 +1277,7 @@ public List GetMakeReason() strReason = ""; } - int nChangeExceptionCount = GetChangeExceptionCount(); + int nChangeExceptionCount = 0; nChangeExceptionCount = GetChangeExceptionCount(); if (nChangeExceptionCount > 0) { @@ -1108,7 +1288,7 @@ public List GetMakeReason() strReason = ""; } - int nHiddenExceptionCount = GetHiddenExceptionCount(); + int nHiddenExceptionCount = 0; nHiddenExceptionCount = GetHiddenExceptionCount(); if (nHiddenExceptionCount > 0) { @@ -1118,7 +1298,7 @@ public List GetMakeReason() m_FileAddErrReason.Add(strReason); strReason = ""; } - int nEmptyExceptionCount = GetEmptyExceptionCount(); + int nEmptyExceptionCount = 0; nEmptyExceptionCount = GetEmptyExceptionCount(); if (nEmptyExceptionCount > 0) { @@ -1129,7 +1309,7 @@ public List GetMakeReason() strReason = ""; } - int nFilePathOverExcetpion = GetFilePathOverExceptionCount(); + int nFilePathOverExcetpion = 0; nFilePathOverExcetpion = GetFilePathOverExceptionCount(); if (nFilePathOverExcetpion > 0) { @@ -1140,7 +1320,7 @@ public List GetMakeReason() strReason = ""; } - int nSuperFolderNameOverException = GetSuperFolderNameOverExceptionCount(); + int nSuperFolderNameOverException = 0; nSuperFolderNameOverException = GetSuperFolderNameOverExceptionCount(); if (nSuperFolderNameOverException > 0) { @@ -1151,7 +1331,7 @@ public List GetMakeReason() strReason = ""; } - int nFileFolderNameOverException = GetFileFolderNameOverExceptionCount(); + int nFileFolderNameOverException = 0; nFileFolderNameOverException = GetFileFolderNameOverExceptionCount(); if (nFileFolderNameOverException > 0) { @@ -1162,6 +1342,180 @@ public List GetMakeReason() strReason = ""; } + int nFileSizeOverException = 0; + nFileSizeOverException = GetSizeExceptionCount(); + if (nFileSizeOverException > 0) + { + strReason = fileAddErr.SetExceptionReason(eFileAddErr.eFAFileSize); + strCount = fileAddErr.GetExceptionCountString(nFileSizeOverException); + strReason = strReason + " : " + strCount; + m_FileAddErrReason.Add(strReason); + strReason = ""; + } + + int nFileDaySizeOverException = 0; + nFileDaySizeOverException = GetDaySizeOverExceptionCount(); + if (nFileDaySizeOverException > 0) + { + strReason = fileAddErr.SetExceptionReason(eFileAddErr.eFADAYSIZEOVER); + strCount = fileAddErr.GetExceptionCountString(nFileDaySizeOverException); + strReason = strReason + " : " + strCount; + m_FileAddErrReason.Add(strReason); + strReason = ""; + } + + int nZIpPWException = 0; + nZIpPWException = GetZipPWExceptionCount(); + if (nZIpPWException > 0) + { + strReason = fileAddErr.SetExceptionReason(eFileAddErr.eFAZipPW); + strCount = fileAddErr.GetExceptionCountString(nZIpPWException); + strReason = strReason + " : " + strCount; + m_FileAddErrReason.Add(strReason); + strReason = ""; + } + + int nZIpNotPWException = 0; + nZIpNotPWException = GetZipNotPWExceptionCount(); + if (nZIpNotPWException > 0) + { + strReason = fileAddErr.SetExceptionReason(eFileAddErr.eFAZipNotPW); + strCount = fileAddErr.GetExceptionCountString(nZIpNotPWException); + strReason = strReason + " : " + strCount; + m_FileAddErrReason.Add(strReason); + strReason = ""; + } + + int nZIpErrorException = 0; + nZIpErrorException = GetZipErrorExceptionCount(); + if (nZIpErrorException > 0) + { + strReason = fileAddErr.SetExceptionReason(eFileAddErr.eFAZipError); + strCount = fileAddErr.GetExceptionCountString(nZIpErrorException); + strReason = strReason + " : " + strCount; + m_FileAddErrReason.Add(strReason); + strReason = ""; + } + + int nZipException = 0; + nZipException = GetZipExtExceptionCount(); + if (nZipException > 0) + { + strReason = fileAddErr.SetExceptionReason(eFileAddErr.eFAZIP); + strCount = fileAddErr.GetExceptionCountString(nZipException); + strReason = strReason + " : " + strCount; + m_FileAddErrReason.Add(strReason); + strReason = ""; + } + + int nInnerZipOpenFailException = 0; + nInnerZipOpenFailException = GetInnerZipOpenFailCount(); + if (nInnerZipOpenFailException > 0) + { + strReason = fileAddErr.SetExceptionReason(eFileAddErr.eUnZipInnerZipOpenFail); + strReason = " => " + strReason; + strCount = fileAddErr.GetExceptionCountString(nInnerZipOpenFailException); + strReason = strReason + " : " + strCount; + m_FileAddErrReason.Add(strReason); + strReason = ""; + } + + int nInnerZipPassWordException = 0; + nInnerZipPassWordException = GetInnerZipPassWordCount(); + if (nInnerZipPassWordException > 0) + { + strReason = fileAddErr.SetExceptionReason(eFileAddErr.eUnZipInnerZipPassword); + strReason = " => " + strReason; + strCount = fileAddErr.GetExceptionCountString(nInnerZipPassWordException); + strReason = strReason + " : " + strCount; + m_FileAddErrReason.Add(strReason); + strReason = ""; + } + + int nInnerZipExtException = 0; + nInnerZipExtException = GetInnerZipExtCount(); + if (nInnerZipExtException > 0) + { + strReason = fileAddErr.SetExceptionReason(eFileAddErr.eUnZipInnerExt); + strReason = " => " + strReason; + strCount = fileAddErr.GetExceptionCountString(nInnerZipExtException); + strReason = strReason + " : " + strCount; + m_FileAddErrReason.Add(strReason); + strReason = ""; + } + + int nInnerZipExtChangeException = 0; + nInnerZipExtChangeException = GetInnerZipExtChangeCount(); + if (nInnerZipExtChangeException > 0) + { + strReason = fileAddErr.SetExceptionReason(eFileAddErr.eUnZipInnerExtChange); + strReason = " => " + strReason; + strCount = fileAddErr.GetExceptionCountString(nInnerZipExtChangeException); + strReason = strReason + " : " + strCount; + m_FileAddErrReason.Add(strReason); + strReason = ""; + } + + int nInnerZipExtUnKnownException = 0; + nInnerZipExtUnKnownException = GetInnerZipUnKnownCount(); + if (nInnerZipExtUnKnownException > 0) + { + strReason = fileAddErr.SetExceptionReason(eFileAddErr.eUnZipInnerExtUnknown); + strReason = " => " + strReason; + strCount = fileAddErr.GetExceptionCountString(nInnerZipExtUnKnownException); + strReason = strReason + " : " + strCount; + m_FileAddErrReason.Add(strReason); + strReason = ""; + } + + int nInnerZipFileEmptyException = 0; + nInnerZipFileEmptyException = GetInnerZipEmptyCount(); + if (nInnerZipFileEmptyException > 0) + { + strReason = fileAddErr.SetExceptionReason(eFileAddErr.eUnZipInnerFileEmpty); + strReason = " => " + strReason; + strCount = fileAddErr.GetExceptionCountString(nInnerZipFileEmptyException); + strReason = strReason + " : " + strCount; + m_FileAddErrReason.Add(strReason); + strReason = ""; + } + + int nInnerZipLengthOverException = 0; + nInnerZipLengthOverException = GetInnerZipLengthOverCount(); + if (nInnerZipLengthOverException > 0) + { + strReason = fileAddErr.SetExceptionReason(eFileAddErr.eUnZipInnerLengthOver); + strReason = " => " + strReason; + strCount = fileAddErr.GetExceptionCountString(nInnerZipLengthOverException); + strReason = strReason + " : " + strCount; + m_FileAddErrReason.Add(strReason); + strReason = ""; + } + + int nInnerZipLeftZipException = 0; + nInnerZipLeftZipException = GetInnerZipLeftZipCount(); + if (nInnerZipLeftZipException > 0) + { + strReason = fileAddErr.SetExceptionReason(eFileAddErr.eUnZipInnerLeftZip); + strReason = " => " + strReason; + strCount = fileAddErr.GetExceptionCountString(nInnerZipLeftZipException); + strReason = strReason + " : " + strCount; + m_FileAddErrReason.Add(strReason); + strReason = ""; + } + + int nInnerZipDRMException = 0; + nInnerZipDRMException = GetInnerZipDRMCount(); + if (nInnerZipDRMException > 0) + { + strReason = fileAddErr.SetExceptionReason(eFileAddErr.eUnZipInnerDRM); + strReason = " => " + strReason; + strCount = fileAddErr.GetExceptionCountString(nInnerZipDRMException); + strReason = strReason + " : " + strCount; + m_FileAddErrReason.Add(strReason); + strReason = ""; + } + return m_FileAddErrReason; } public List LoadRMFileAdd(string strFilePath) diff --git a/src/OpenNetLinkApp/wwwroot/conf/HSText.xml b/src/OpenNetLinkApp/wwwroot/conf/HSText.xml index fd5b419f9..f0dd96692 100644 --- a/src/OpenNetLinkApp/wwwroot/conf/HSText.xml +++ b/src/OpenNetLinkApp/wwwroot/conf/HSText.xml @@ -3381,6 +3381,41 @@ + + + zip파일 내부의 비밀번호 사용중인 zip 파일 + + + + + + + zip파일 내부의 확장자 제한 파일 + + + + + + + zip파일 내부의 위변조 파일 + + + + + + + zip파일 내부의 알수 없는 파일 + + + + + + + zip파일 내부의 빈 파일 + + + +