feat(ai): services partages A2 + SSE streaming B4 + confirmations UI B5 (#79)
CI / lint (push) Successful in 58s
CI / security (push) Successful in 40s
CI / test (push) Successful in 1m15s
CI / build (push) Successful in 37s
CI / e2e (push) Successful in 10m15s
Desktop Build / build-windows (push) Canceled after 0s
Desktop Build / build-linux (push) Canceled after 0s
CI / lint (push) Successful in 58s
CI / security (push) Successful in 40s
CI / test (push) Successful in 1m15s
CI / build (push) Successful in 37s
CI / e2e (push) Successful in 10m15s
Desktop Build / build-windows (push) Canceled after 0s
Desktop Build / build-linux (push) Canceled after 0s
This commit is contained in:
@@ -621,13 +621,15 @@ class TestResolveSafePath:
|
||||
|
||||
def test_resolve_traversal_attempt(self):
|
||||
from backend.main import _resolve_safe_path
|
||||
from backend.services.errors import ServiceError
|
||||
from pathlib import Path
|
||||
root = Path("/vaults/TestVault")
|
||||
try:
|
||||
_resolve_safe_path(root, "../../etc/passwd")
|
||||
assert False, "Should have raised"
|
||||
except Exception as e:
|
||||
assert "traversal" in str(e).lower() or "403" in str(e)
|
||||
except ServiceError as e:
|
||||
assert e.status == 403
|
||||
assert e.code == "path_outside_vault"
|
||||
|
||||
|
||||
class TestBackupFile:
|
||||
|
||||
Reference in New Issue
Block a user