mirror of https://git.sr.ht/~sircmpwn/hub.sr.ht
hubsrht: Expect valid canonical name in URLs
This commit is contained in:
parent
2f890ff9d3
commit
638a05c8df
|
@ -10,6 +10,8 @@ class ProjectAccess(Enum):
|
|||
def get_project(owner, project_name, access, user=current_user):
|
||||
if owner.startswith("~"):
|
||||
owner = owner[1:]
|
||||
else:
|
||||
abort(404)
|
||||
project = (Project.query
|
||||
.join(User, Project.owner_id == User.id)
|
||||
.filter(User.username == owner)
|
||||
|
|
Loading…
Reference in New Issue