Explorar el Código

Merge remote-tracking branch 'origin/main' into 0.2.4.6

maziggy hace 2 meses
padre
commit
e7574fa67c

La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 0 - 2
CHANGELOG.md


+ 2 - 2
backend/tests/integration/test_archives_api.py

@@ -1651,7 +1651,7 @@ class TestUploadSourceThreeMF:
         archive = await archive_factory(
         archive = await archive_factory(
             printer.id,
             printer.id,
             print_name="Corrupt Path",
             print_name="Corrupt Path",
-            file_path="/tmp/totally_outside.gcode.3mf",
+            file_path="/tmp/totally_outside.gcode.3mf",  # nosec B108
             filename="totally_outside.gcode.3mf",
             filename="totally_outside.gcode.3mf",
         )
         )
 
 
@@ -1661,4 +1661,4 @@ class TestUploadSourceThreeMF:
         assert response.status_code == 500
         assert response.status_code == 500
         assert "outside the data directory" in response.json()["detail"]
         assert "outside the data directory" in response.json()["detail"]
         # Did not write anything under the bogus /tmp/source/ either.
         # Did not write anything under the bogus /tmp/source/ either.
-        assert not (Path("/tmp") / "source").exists() or not (Path("/tmp") / "source" / "totally_outside.3mf").exists()
+        assert not (Path("/tmp") / "source").exists() or not (Path("/tmp") / "source" / "totally_outside.3mf").exists()  # nosec B108

+ 2 - 2
backend/tests/unit/services/test_attach_timelapse_safe_path.py

@@ -78,11 +78,11 @@ async def test_attach_timelapse_rejects_absolute_filename(tmp_path: Path, monkey
     result = await service.attach_timelapse(
     result = await service.attach_timelapse(
         archive_id=1,
         archive_id=1,
         timelapse_data=b"x",
         timelapse_data=b"x",
-        filename="/tmp/owned_via_absolute",
+        filename="/tmp/owned_via_absolute",  # nosec B108
     )
     )
 
 
     assert result is False
     assert result is False
-    assert not Path("/tmp/owned_via_absolute").exists()
+    assert not Path("/tmp/owned_via_absolute").exists()  # nosec B108
 
 
 
 
 @pytest.mark.asyncio
 @pytest.mark.asyncio

+ 1 - 1
backend/tests/unit/test_vp_mqtt_bridge.py

@@ -1162,7 +1162,7 @@ class TestBindAddressAutoResolve:
     async def test_rewrite_arms_via_auto_resolved_host_ip(self):
     async def test_rewrite_arms_via_auto_resolved_host_ip(self):
         """When bind_address is 0.0.0.0, fall back to the host interface in
         """When bind_address is 0.0.0.0, fall back to the host interface in
         the target printer's subnet and rewrite to that IP."""
         the target printer's subnet and rewrite to that IP."""
-        server = _make_server(bind_address="0.0.0.0")
+        server = _make_server(bind_address="0.0.0.0")  # nosec B104
         bridge = _make_bridge(server)
         bridge = _make_bridge(server)
         with patch(
         with patch(
             "backend.app.services.virtual_printer.mqtt_bridge._resolve_host_interface_for_target",
             "backend.app.services.virtual_printer.mqtt_bridge._resolve_host_interface_for_target",

Algunos archivos no se mostraron porque demasiados archivos cambiaron en este cambio