sshcatch 0.1.0__tar.gz → 0.1.1__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: sshcatch
3
- Version: 0.1.0
3
+ Version: 0.1.1
4
4
  Summary: Quick-deploy SSH server for tunneling and simple SCP transfers - never opens a shell.
5
5
  Project-URL: Homepage, https://github.com/LorenzMap/sshcatch
6
6
  Project-URL: Repository, https://github.com/LorenzMap/sshcatch
@@ -15,7 +15,7 @@ from itertools import count
15
15
 
16
16
  import asyncssh
17
17
 
18
- __version__ = "0.1.0"
18
+ __version__ = "0.1.1"
19
19
 
20
20
  # ── Logging ─--────────────────────────────────────────────────────────
21
21
 
@@ -100,7 +100,8 @@ class SFTPCatchServer(asyncssh.SFTPServer):
100
100
 
101
101
  def _require_flat(self, path):
102
102
  # Simple check if subdirectories are used - full 'name' must be equal to basename
103
- name = path.lstrip(b"/")
103
+ # after unecessary ./ are collapsed
104
+ name = posixpath.normpath(path).lstrip(b"/")
104
105
  if name in (b"", b".", b"..") or name != posixpath.basename(name):
105
106
  self._log_scp(f"DENIED ACCESS {path.decode(errors='replace')}")
106
107
  raise DENY("Access restricted to root directory")
File without changes
File without changes
File without changes
File without changes