mirror of
https://github.com/9001/copyparty.git
synced 2025-08-17 09:02:15 -06:00
404 rather than redirect home if 404 or 403
This commit is contained in:
parent
74635e0113
commit
0cf737b4ce
|
@ -261,12 +261,14 @@ class HttpCli(object):
|
|||
|
||||
self.absolute_urls = True
|
||||
|
||||
# go home if verboten
|
||||
self.readable, self.writable = self.conn.auth.vfs.can_access(
|
||||
self.vpath, self.uname
|
||||
)
|
||||
if not self.readable and not self.writable:
|
||||
self.log("inaccessible: [{}]".format(self.vpath))
|
||||
if self.vpath:
|
||||
self.log("inaccessible: [{}]".format(self.vpath))
|
||||
raise Pebkac(404)
|
||||
|
||||
self.uparam = {"h": False}
|
||||
|
||||
if "h" in self.uparam:
|
||||
|
|
Loading…
Reference in a new issue