Skip to content

Commit

Permalink
security fix: CP-12: CP-12: Admin Packages Modify Package
Browse files Browse the repository at this point in the history
  • Loading branch information
usmannasir committed Aug 7, 2021
1 parent 276ebdc commit 3aa9deb
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/packagesManager.py
Expand Up @@ -148,6 +148,11 @@ def submitModify(self):

modifyPack = Package.objects.get(packageName=packageName)

## Check package ownership
admin = Administrator.objects.get(pk=userID)
if ACLManager.CheckPackageOwnership(modifyPack, admin, currentACL) == 0:
return ACLManager.loadErrorJson('deleteStatus', 0)

diskSpace = modifyPack.diskSpace
bandwidth = modifyPack.bandwidth
ftpAccounts = modifyPack.ftpAccounts
Expand Down

0 comments on commit 3aa9deb

Please sign in to comment.