py-web-ssh 0.1.7__tar.gz → 0.1.8__tar.gz

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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: py-web-ssh
3
- Version: 0.1.7
3
+ Version: 0.1.8
4
4
  Summary: A Python web SSH client with xterm.js, reconnectable sessions, logs, and file transfer.
5
5
  License-Expression: MIT
6
6
  License-File: LICENSE
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "py-web-ssh"
3
- version = "0.1.7"
3
+ version = "0.1.8"
4
4
  description = "A Python web SSH client with xterm.js, reconnectable sessions, logs, and file transfer."
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.10"
@@ -2,4 +2,4 @@
2
2
 
3
3
  __all__ = ["__version__"]
4
4
 
5
- __version__ = "0.1.7"
5
+ __version__ = "0.1.8"
@@ -187,7 +187,12 @@ def upload(
187
187
 
188
188
  @app.post("/api/sessions/{session_id}/files/uploads")
189
189
  async def create_upload_task(session_id: str, request: Request) -> JSONResponse:
190
- _require_session(session_id)
190
+ session = _require_session(session_id)
191
+ if session.confirmed_host_key is None:
192
+ raise HTTPException(
193
+ status_code=409,
194
+ detail="SSH server host key has not been confirmed in the terminal yet.",
195
+ )
191
196
  payload = await request.json()
192
197
  remote_path = str(payload.get("remote_path", "")).strip()
193
198
  if not remote_path:
@@ -272,6 +272,8 @@ class TerminalSession:
272
272
  self._host_key_lock.wait(timeout=0.2)
273
273
  else:
274
274
  accepted = False
275
+ with self._host_key_lock:
276
+ self._awaiting_host_key_confirmation = False
275
277
 
276
278
  if accepted:
277
279
  self._append_output(b"Y\r\nContinuing SSH authentication...\r\n")
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes