From b1b9e500a771098d3ea07f626fdb9ff8755d425d Mon Sep 17 00:00:00 2001 From: Abin Antony Date: Wed, 4 Sep 2024 16:55:32 -0700 Subject: [PATCH 1/2] #FOIMOD-3439 Zipperservice update removing sensitive content --- .gitignore | 2 ++ .../ZippingServices/requirements.txt | Bin 760 -> 790 bytes .../ZippingServices/services/zipperservice.py | 27 +++++++++++++++++- 3 files changed, 28 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 3e5f06c34..f9395bcd2 100644 --- a/.gitignore +++ b/.gitignore @@ -100,3 +100,5 @@ bld/ MCS.FOI.S3FileConversion/MCS.FOI.S3FileConversion/QtBinariesWindows/ computingservices/ZippingServices/env/* openshift/templates/zippingservice/zipper.env +*.locenv + diff --git a/computingservices/ZippingServices/requirements.txt b/computingservices/ZippingServices/requirements.txt index 6e93668753e3922077ce2411f35c45e150eb823a..a08f010df70dbc95af321746348195b932952cee 100644 GIT binary patch delta 38 pcmeytI*o0^4< Date: Thu, 5 Sep 2024 13:22:31 -0700 Subject: [PATCH 2/2] #FOIMOD-3429 - Removing sensitive info from REDLINE packages as well. --- .../ZippingServices/services/zipperservice.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/computingservices/ZippingServices/services/zipperservice.py b/computingservices/ZippingServices/services/zipperservice.py index 8e98ff311..5c343244e 100644 --- a/computingservices/ZippingServices/services/zipperservice.py +++ b/computingservices/ZippingServices/services/zipperservice.py @@ -114,11 +114,11 @@ def __zipfilesandupload(_message, s3credentials): _docbytes = __getdocumentbytearray(fileobj, s3credentials) _formattedbytes = None - if(filename == "{0}.pdf".format(_message.requestnumber)): - try: - _formattedbytes = __removesensitivecontent(_docbytes) - except Exception: - print(traceback.format_exc()) + + try: + _formattedbytes = __removesensitivecontent(_docbytes) + except Exception: + print(traceback.format_exc()) zip.writestr( filename, _docbytes if _formattedbytes is None else _formattedbytes )