Skip to content

Commit

Permalink
Fix CVE-2018-1002150 - distRepoMove missing access check
Browse files Browse the repository at this point in the history
Fixes: #850
https://pagure.io/koji/issue/850
fix access check in host.distRepoMove
  • Loading branch information
mikem23 committed Apr 4, 2018
2 parents 67e82f5 + daf0764 commit ab1ade7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 2 additions & 0 deletions hub/kojihub.py
Original file line number Diff line number Diff line change
Expand Up @@ -12517,6 +12517,8 @@ def distRepoMove(self, repo_id, uploadpath, files, arch, sigmap):
In sigmap, use sig=None to use the primary copy of the rpm instead of a
signed copy.
"""
host = Host()
host.verify()
workdir = koji.pathinfo.work()
rinfo = repo_info(repo_id, strict=True)
repodir = koji.pathinfo.distrepo(repo_id, rinfo['tag_name'])
Expand Down
8 changes: 4 additions & 4 deletions koji/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,10 @@ def __init__(self, args=None, hostip=None):
self.exclusive = False
self.lockerror = None
self.callnum = None
# we look up perms, groups, and host_id on demand, see __getattr__
self._perms = None
self._groups = None
self._host_id = ''
#get session data from request
if args is None:
environ = getattr(context, 'environ', {})
Expand Down Expand Up @@ -204,10 +208,6 @@ def __init__(self, args=None, hostip=None):
self.master = session_data['master']
self.session_data = session_data
self.user_data = user_data
# we look up perms, groups, and host_id on demand, see __getattr__
self._perms = None
self._groups = None
self._host_id = ''
self.logged_in = True

def __getattr__(self, name):
Expand Down

0 comments on commit ab1ade7

Please sign in to comment.