assemblyline-v4-service 4.5.0.15__py3-none-any.whl → 4.5.0.17__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of assemblyline-v4-service might be problematic. Click here for more details.

@@ -1 +1 @@
1
- 4.5.0.15
1
+ 4.5.0.17
@@ -262,7 +262,7 @@ class ServiceBase:
262
262
  scheme, verify = 'https', UPDATES_CA
263
263
  url_base = f"{scheme}://{self.dependencies['updates']['host']}:{self.dependencies['updates']['port']}/"
264
264
  headers = {
265
- 'X_APIKEY': self.dependencies['updates']['key']
265
+ 'x-apikey': self.dependencies['updates']['key']
266
266
  }
267
267
 
268
268
  # Check if there are new signatures
@@ -78,17 +78,17 @@ class ServiceRequest:
78
78
  :return: None
79
79
  """
80
80
 
81
- outtmp = tempfile.NamedTemporaryFile(dir=self._working_directory, delete=False)
82
- data = {}
83
- with tempfile.NamedTemporaryFile(dir=self._working_directory, delete=False) as thumbtmp:
84
- # Load Image
85
- img = Image.open(path)
81
+ # Load Image
82
+ img = Image.open(path)
86
83
 
87
- # Force image format switch to prevent exploit to cross-over
88
- img_format = 'WEBP'
89
- if img.format == img_format:
90
- img_format = 'PNG'
84
+ # Force image format switch to prevent exploit to cross-over
85
+ img_format = 'WEBP'
86
+ if img.format == img_format:
87
+ img_format = 'PNG'
91
88
 
89
+ outtmp = tempfile.NamedTemporaryFile(dir=self._working_directory, delete=False, suffix=f".{img_format}")
90
+ data = {}
91
+ with tempfile.NamedTemporaryFile(dir=self._working_directory, delete=False, suffix=".thumb") as thumbtmp:
92
92
  if img_format == "WEBP" and (img.height > WEBP_MAX_SIZE or img.width > WEBP_MAX_SIZE):
93
93
  # Maintain aspect ratio
94
94
  img.thumbnail((WEBP_MAX_SIZE, WEBP_MAX_SIZE), Image.LANCZOS)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: assemblyline-v4-service
3
- Version: 4.5.0.15
3
+ Version: 4.5.0.17
4
4
  Summary: Assemblyline 4 - Service base
5
5
  Home-page: https://github.com/CybercentreCanada/assemblyline-v4-service/
6
6
  Author: CCCS Assemblyline development team
@@ -1,4 +1,4 @@
1
- assemblyline_v4_service/VERSION,sha256=2qZaGOWJpi6rzbS4eUSObMdqOmRU0ulnlROOmolU4Co,9
1
+ assemblyline_v4_service/VERSION,sha256=DQEnHh74qGXu8c2EXNMQ8ANkWBZPqkR50n26cBXRnNY,9
2
2
  assemblyline_v4_service/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
3
3
  assemblyline_v4_service/healthz.py,sha256=3QGBg0EZuXC6UN411HFwpLNEop9UvS9feFhvBUTP-k4,1576
4
4
  assemblyline_v4_service/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -6,11 +6,11 @@ assemblyline_v4_service/run_privileged_service.py,sha256=qd4DmHo5G_Tpv8tb0A96qNf
6
6
  assemblyline_v4_service/run_service.py,sha256=NiFX52NfsbBQY6E3nrjoB3e2XxIlwFcQpYYY-rADIk4,5996
7
7
  assemblyline_v4_service/common/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
8
8
  assemblyline_v4_service/common/api.py,sha256=Xzp8j4HCCfjPvNSGKiZl5ttH2_Itg47cjlH0NXNtth0,6849
9
- assemblyline_v4_service/common/base.py,sha256=1wxzg_enESdqxloiAWCL0fUNzcKg0kAVfNNkGAfHX0U,14218
9
+ assemblyline_v4_service/common/base.py,sha256=4rnK_183qsSfkRkuVp_0wy-haW49umx4jJIC0OalGDM,14218
10
10
  assemblyline_v4_service/common/helper.py,sha256=xs9quuf-M1JOdKieBqOmWaOece0CtzXFhhe85xQYmuY,3289
11
11
  assemblyline_v4_service/common/ocr.py,sha256=3fV0PyY3oui_ucAM9dkolP0VRYKACKJuGY4M64DudIE,8841
12
12
  assemblyline_v4_service/common/ontology_helper.py,sha256=QpwerYoS5hXjWzpx3Pmwv6j2330PQVYqxYGamjcpW3I,7890
13
- assemblyline_v4_service/common/request.py,sha256=NxtWxp8-ttC72i3Vnchc3fZTRKqPQAoMC4KAVwEj8-4,11714
13
+ assemblyline_v4_service/common/request.py,sha256=ZP80rDWIyVotwVDN70L7ujN9RoxZRdmaeUN0DFIvrT4,11732
14
14
  assemblyline_v4_service/common/result.py,sha256=9AqM6qCYiia_Bpyn_fBFhzNQMcqJbtFSiGjp57fXW2E,32713
15
15
  assemblyline_v4_service/common/task.py,sha256=7yNvXk5B27QookJNp4-Y1iGhV8LfhLDaYWzF-uFGWgo,13576
16
16
  assemblyline_v4_service/common/utils.py,sha256=k2__d-V5LjB6o2IKbjVe7tJWKcKuUHto5TyT5oKhIa0,3890
@@ -38,8 +38,8 @@ test/test_common/test_request.py,sha256=VzWw-NZKTRIXKwCACIT2SSHE70HMZ3IeBk1AJiT-
38
38
  test/test_common/test_result.py,sha256=b96bCfyW0ukdTcCsl01jS_l5YhfzXFVYs_VPOwz7IEU,41982
39
39
  test/test_common/test_task.py,sha256=RWsGEN0L-xKoRAsGv2x4JZcSAySS9aBF4dwL9t7tepo,18668
40
40
  test/test_common/test_utils.py,sha256=TbnBxqpS_ZC5ptXR9XJX3xtbItD0mTbtiBxxdyP8J5k,5904
41
- assemblyline_v4_service-4.5.0.15.dist-info/LICENCE.md,sha256=NSkYo9EH8h5oOkzg4VhjAHF4339MqPP2cQ8msTPgl-c,1396
42
- assemblyline_v4_service-4.5.0.15.dist-info/METADATA,sha256=kzfd_BUJrBsRwUNt6RjQsDWY4kft1h-D_oQyrg2aWFQ,9495
43
- assemblyline_v4_service-4.5.0.15.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
44
- assemblyline_v4_service-4.5.0.15.dist-info/top_level.txt,sha256=LpTOEaVCatkrvbVq3EZseMSIa2PQZU-2rhuO_FTpZgY,29
45
- assemblyline_v4_service-4.5.0.15.dist-info/RECORD,,
41
+ assemblyline_v4_service-4.5.0.17.dist-info/LICENCE.md,sha256=NSkYo9EH8h5oOkzg4VhjAHF4339MqPP2cQ8msTPgl-c,1396
42
+ assemblyline_v4_service-4.5.0.17.dist-info/METADATA,sha256=WllzH7K3Lz-epI7rDGjPcqvFlKXe-bk-IduYIUMjy6U,9495
43
+ assemblyline_v4_service-4.5.0.17.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
44
+ assemblyline_v4_service-4.5.0.17.dist-info/top_level.txt,sha256=LpTOEaVCatkrvbVq3EZseMSIa2PQZU-2rhuO_FTpZgY,29
45
+ assemblyline_v4_service-4.5.0.17.dist-info/RECORD,,