assemblyline-v4-service 4.5.1.dev92__py3-none-any.whl → 4.5.1.dev93__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.1.dev92
1
+ 4.5.1.dev93
@@ -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.1.dev92
3
+ Version: 4.5.1.dev93
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=IQFQHR8oxRt7ecJ17ZA70nyaEbUx3tEgflhXtE-1Gps,12
1
+ assemblyline_v4_service/VERSION,sha256=G9pBMQfRxZ-eeKDX_TxdkLhDvwbvQLuRw3bfiEq6Zo8,12
2
2
  assemblyline_v4_service/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
3
3
  assemblyline_v4_service/healthz.py,sha256=sS1cFkDLw8hUPMpj7tbHXFv8ZmHcazrwZ0l6oQDwwkQ,1575
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=XXBafAQCV43_OBLXOSHxYoDHmqwERBkNul8fb_X6Ves,11774
13
+ assemblyline_v4_service/common/request.py,sha256=W7fqC2xQE3i5i2jlCDyUDp3ZqJQQqSshNW0mQfJMkFg,11792
14
14
  assemblyline_v4_service/common/result.py,sha256=9AqM6qCYiia_Bpyn_fBFhzNQMcqJbtFSiGjp57fXW2E,32713
15
15
  assemblyline_v4_service/common/task.py,sha256=-AhtT6qSMLndBB3IOqOF-MV5K8Xp_67yvcgMuzr1IT0,13720
16
16
  assemblyline_v4_service/common/utils.py,sha256=k2__d-V5LjB6o2IKbjVe7tJWKcKuUHto5TyT5oKhIa0,3890
@@ -38,8 +38,8 @@ test/test_common/test_request.py,sha256=PPhHfrwpwMdNZ33P1Z_0h1Zaz9ao9VFiDr_MJrBS
38
38
  test/test_common/test_result.py,sha256=b96bCfyW0ukdTcCsl01jS_l5YhfzXFVYs_VPOwz7IEU,41982
39
39
  test/test_common/test_task.py,sha256=jnfF68EgJIu30Pz_4jiJHkncfI-3XpGaut5r79KIXOA,18718
40
40
  test/test_common/test_utils.py,sha256=TbnBxqpS_ZC5ptXR9XJX3xtbItD0mTbtiBxxdyP8J5k,5904
41
- assemblyline_v4_service-4.5.1.dev92.dist-info/LICENCE.md,sha256=NSkYo9EH8h5oOkzg4VhjAHF4339MqPP2cQ8msTPgl-c,1396
42
- assemblyline_v4_service-4.5.1.dev92.dist-info/METADATA,sha256=REMm_bUq5ucd3RiVPeHLVmvTX-rttVcvXoO7uu4ZdLM,9498
43
- assemblyline_v4_service-4.5.1.dev92.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
44
- assemblyline_v4_service-4.5.1.dev92.dist-info/top_level.txt,sha256=LpTOEaVCatkrvbVq3EZseMSIa2PQZU-2rhuO_FTpZgY,29
45
- assemblyline_v4_service-4.5.1.dev92.dist-info/RECORD,,
41
+ assemblyline_v4_service-4.5.1.dev93.dist-info/LICENCE.md,sha256=NSkYo9EH8h5oOkzg4VhjAHF4339MqPP2cQ8msTPgl-c,1396
42
+ assemblyline_v4_service-4.5.1.dev93.dist-info/METADATA,sha256=hkquLz3YRfOmXdcQtBr92NTA6GAley5l-9UOmEVbTvA,9498
43
+ assemblyline_v4_service-4.5.1.dev93.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
44
+ assemblyline_v4_service-4.5.1.dev93.dist-info/top_level.txt,sha256=LpTOEaVCatkrvbVq3EZseMSIa2PQZU-2rhuO_FTpZgY,29
45
+ assemblyline_v4_service-4.5.1.dev93.dist-info/RECORD,,