MCPcopy
hub / github.com/smittix/intercept / test_capture_pmkid_path_traversal_prevention

Function test_capture_pmkid_path_traversal_prevention

tests/test_wifi.py:175–182  ·  view source on GitHub ↗

Ensure the status check rejects invalid paths.

(client)

Source from the content-addressed store, hash-verified

173### --- PMKID TESTS --- ###
174
175def test_capture_pmkid_path_traversal_prevention(client):
176 """Ensure the status check rejects invalid paths."""
177 payload = {'file': '/etc/passwd'} # Malicious path
178 response = client.post('/wifi/pmkid/status', json=payload)
179
180 assert response.status_code == 400
181 assert response.get_json()['status'] == 'error'
182 assert 'Invalid capture file path' in response.get_json()['message']
183
184### --- CRACKING TESTS --- ###
185

Callers

nothing calls this directly

Calls 1

postMethod · 0.80

Tested by

no test coverage detected