bug fix: security

This commit is contained in:
Usman Nasir
2022-01-26 12:49:07 +05:00
parent c40c452a7f
commit c10c3b7861
4 changed files with 34 additions and 16 deletions

View File

@@ -595,19 +595,7 @@ class FileManager:
finalData['uploadStatus'] = 1
finalData['answer'] = 'File transfer completed.'
### Check if upload path tmp dir is not available
UploadPath = '/usr/local/CyberCP/tmp/'
if not os.path.exists(UploadPath):
command = 'mkdir %s' % (UploadPath)
ProcessUtilities.executioner(command)
command = 'chown cyberpanel:cyberpanel %s' % (UploadPath)
ProcessUtilities.executioner(command)
command = 'chmod 711 %s' % (UploadPath)
ProcessUtilities.executioner(command)
ACLManager.CreateSecureDir()
## Random file name