diff --git a/dns/views.py b/dns/views.py index cf749bc3c..c5be1afc6 100644 --- a/dns/views.py +++ b/dns/views.py @@ -530,15 +530,22 @@ def deleteDNSZone(request): try: val = request.session['userID'] - val = request.session['userID'] - admin = Administrator.objects.get(pk=val) domainsList = [] - domains = Domains.objects.all() + if admin.type == 1: + domains = Domains.objects.all() + for items in domains: + domainsList.append(items.name) + else: + websites = admin.websites_set.all() - for items in domains: - domainsList.append(items.name) + for web in websites: + try: + tempDomain = Domains.objects.get(name = web.domain) + domainsList.append(web.domain) + except: + pass return render(request, 'dns/deleteDNSZone.html',{"domainsList":domainsList}) diff --git a/filemanager/static/filemanager/js/fileManager.js b/filemanager/static/filemanager/js/fileManager.js index 9db45bcf1..74ef0675f 100755 --- a/filemanager/static/filemanager/js/fileManager.js +++ b/filemanager/static/filemanager/js/fileManager.js @@ -15,6 +15,7 @@ fileManager.controller('fileManagerCtrl', function($scope,$http,FileUploader) { var aceEditorMode = ''; var domainName = window.location.pathname.split("/")[2]; + var domainRandomSeed = ""; var homePathBack = "/home/"+domainName; $scope.currentPath = "/home/"+domainName; @@ -67,7 +68,9 @@ fileManager.controller('fileManagerCtrl', function($scope,$http,FileUploader) { var data = { completeStartingPath : completePath, - method : "list" + method : "list", + domainRandomSeed:domainRandomSeed, + domainName: domainName }; @@ -118,7 +121,6 @@ fileManager.controller('fileManagerCtrl', function($scope,$http,FileUploader) { parentNode.appendChild(prepareChildNodeLI(path,completePath,dropDown)); } - function prepareChildNodeLI(path,completePath,dropDown){ // text nodes are created @@ -364,6 +366,8 @@ fileManager.controller('fileManagerCtrl', function($scope,$http,FileUploader) { var permissionsNode = document.createTextNode(permissions); + + // @@ -598,6 +602,8 @@ fileManager.controller('fileManagerCtrl', function($scope,$http,FileUploader) { // table functions + + $scope.fetchForTableSecondary = function(node,functionName) { allFilesAndFolders = []; @@ -632,7 +638,9 @@ fileManager.controller('fileManagerCtrl', function($scope,$http,FileUploader) { var data = { completeStartingPath : completePathToFile, method : "listForTable", - home: homePathBack + home: homePathBack, + domainRandomSeed:domainRandomSeed, + domainName: domainName }; var tableBody = document.getElementById("tableBodyFiles"); @@ -666,6 +674,11 @@ fileManager.controller('fileManagerCtrl', function($scope,$http,FileUploader) { var fileSize = filesData[keys[i]][3]; var permissions = filesData[keys[i]][4]; var dirCheck = filesData[keys[i]][5]; + console.log(fileName); + if(fileName === "..filemanagerkey"){ + + continue; + } tableBody.appendChild(createTR(fileName,fileSize,lastModified,permissions,dirCheck)); } @@ -682,12 +695,51 @@ fileManager.controller('fileManagerCtrl', function($scope,$http,FileUploader) { } }; - $scope.fetchForTableSecondary(null,"startPoint"); function findFileExtension(fileName){ return (/[.]/.exec(fileName)) ? /[^.]+$/.exec(fileName) : undefined; } + // Create entry point for domain + + function createEntryPoint(){ + + url = "/filemanager/createTemporaryFile"; + + var data = { + domainName:domainName + }; + + var config = {}; + + $http.post(url, data,config).then(ListInitialDatas, cantLoadInitialDatas); + + + function ListInitialDatas(response) { + + if(response.data.createTemporaryFile === 1){ + domainRandomSeed = response.data.domainRandomSeed; + $scope.fetchForTableSecondary(null,"startPoint"); + } + else + { + var notification = alertify.notify(response.data.error_message, 'error', 10, function(){ console.log('dismissed'); }); + } + } + function cantLoadInitialDatas(response) { + var notification = alertify.notify("Could not connec to server, refresh page.", 'error', 10, function(){ console.log('dismissed'); }); + } + + + + + + + } + createEntryPoint(); + + + // html editor @@ -698,7 +750,9 @@ fileManager.controller('fileManagerCtrl', function($scope,$http,FileUploader) { var data = { fileName : completePathForFile, - method : "readFileContents" + method : "readFileContents", + domainRandomSeed:domainRandomSeed, + domainName: domainName }; @@ -738,7 +792,9 @@ fileManager.controller('fileManagerCtrl', function($scope,$http,FileUploader) { var data = { fileName : completePathForFile, method : "writeFileContents", - fileContent: editor.getValue() + fileContent: editor.getValue(), + domainRandomSeed:domainRandomSeed, + domainName: domainName }; @@ -790,7 +846,13 @@ fileManager.controller('fileManagerCtrl', function($scope,$http,FileUploader) { uploader.onAfterAddingFile = function(fileItem) { $scope.errorMessage = true; - fileItem.formData.push({"completePath":$scope.currentPath}); + fileItem.formData.push( + { + "completePath":$scope.currentPath, + domainRandomSeed:domainRandomSeed, + domainName: domainName + + }); }; // folder functions @@ -823,6 +885,8 @@ fileManager.controller('fileManagerCtrl', function($scope,$http,FileUploader) { var data = { folderName : completePathForFolder, method : "createNewFolder", + domainRandomSeed:domainRandomSeed, + domainName: domainName }; @@ -872,6 +936,8 @@ fileManager.controller('fileManagerCtrl', function($scope,$http,FileUploader) { var data = { fileName : completePathForFile, method : "createNewFile", + domainRandomSeed:domainRandomSeed, + domainName: domainName }; @@ -914,6 +980,8 @@ fileManager.controller('fileManagerCtrl', function($scope,$http,FileUploader) { path : $scope.currentPath, method : "deleteFolderOrFile", fileAndFolders: allFilesAndFolders, + domainRandomSeed:domainRandomSeed, + domainName: domainName }; @@ -962,7 +1030,9 @@ fileManager.controller('fileManagerCtrl', function($scope,$http,FileUploader) { listOfFiles : allFilesAndFolders, compressedFileName: $scope.compressedFileName, compressionType: $scope.compressionType, - method: 'compress' + method: 'compress', + domainRandomSeed:domainRandomSeed, + domainName: domainName }; @@ -1017,7 +1087,9 @@ fileManager.controller('fileManagerCtrl', function($scope,$http,FileUploader) { fileToExtract: completeFileToExtract, extractionType: extractionType, extractionLocation: $scope.extractionLocation, - method: 'extract' + method: 'extract', + domainRandomSeed:domainRandomSeed, + domainName: domainName }; @@ -1069,7 +1141,9 @@ fileManager.controller('fileManagerCtrl', function($scope,$http,FileUploader) { basePath : $scope.currentPath, newPath : $scope.pathToMoveTo, fileAndFolders:allFilesAndFolders, - method: 'move' + method: 'move', + domainRandomSeed:domainRandomSeed, + domainName: domainName }; @@ -1120,7 +1194,9 @@ fileManager.controller('fileManagerCtrl', function($scope,$http,FileUploader) { basePath : $scope.currentPath, newPath : $scope.pathToCopyTo, fileAndFolders:allFilesAndFolders, - method: 'copy' + method: 'copy', + domainRandomSeed:domainRandomSeed, + domainName: domainName }; @@ -1238,7 +1314,9 @@ fileManager.controller('fileManagerCtrl', function($scope,$http,FileUploader) { basePath : $scope.currentPath, existingName: $scope.fileToRename, newFileName : $scope.newFileName, - method: 'rename' + method: 'rename', + domainRandomSeed:domainRandomSeed, + domainName: domainName }; @@ -1274,6 +1352,8 @@ fileManager.controller('fileManagerCtrl', function($scope,$http,FileUploader) { var data = { domainName : domainName, + domainRandomSeed:domainRandomSeed, + domainName: domainName }; @@ -1305,7 +1385,9 @@ fileManager.controller('fileManagerCtrl', function($scope,$http,FileUploader) { url = "/filemanager/downloadFile"; var data = { - fileToDownload: $scope.currentPath + "/" + allFilesAndFolders[0] + fileToDownload: $scope.currentPath + "/" + allFilesAndFolders[0], + domainRandomSeed:domainRandomSeed, + domainName: domainName }; diff --git a/filemanager/urls.py b/filemanager/urls.py index 1df02d025..9a57803ae 100644 --- a/filemanager/urls.py +++ b/filemanager/urls.py @@ -5,6 +5,7 @@ urlpatterns = [ url(r'^(?P([\da-z\.-]+\.[a-z\.]{2,12}|[\d\.]+)([\/:?=&#]{1}[\da-z\.-]+)*[\/\?]?)$', views.loadFileManagerHome, name='loadFileManagerHome'), url(r'^changePermissions',views.changePermissions, name='changePermissions'), url(r'^downloadFile',views.downloadFile, name='downloadFile'), + url(r'^createTemporaryFile',views.createTemporaryFile, name='createTemporaryFile'), ] diff --git a/filemanager/views.py b/filemanager/views.py index b7ec18275..fe541610e 100644 --- a/filemanager/views.py +++ b/filemanager/views.py @@ -11,6 +11,8 @@ from websiteFunctions.models import Websites import subprocess import shlex import os +from plogical.virtualHostUtilities import virtualHostUtilities + # Create your views here. @@ -21,12 +23,28 @@ def loadFileManagerHome(request,domain): admin = Administrator.objects.get(pk=val) - viewStatus = 1 + if Websites.objects.filter(domain=domain).exists(): + if admin.type == 1: + viewStatus = 1 + if admin.type == 3: + viewStatus = 0 + + return render(request, 'filemanager/index.html', {"viewStatus": viewStatus}) + else: + website = Websites.objects.get(domain=domain) + if website.admin == admin: + viewStatus = 1 + + if admin.type == 3: + viewStatus = 0 + + return render(request, 'filemanager/index.html', {"viewStatus": viewStatus}) + else: + return HttpResponse("Domain ownership error.") + else: + return HttpResponse("Domain does not exists.") - if admin.type == 3: - viewStatus = 0 - return render(request,'filemanager/index.html',{"viewStatus":viewStatus}) except KeyError: return redirect(loadLoginPage) @@ -62,16 +80,80 @@ def changePermissions(request): return redirect(loadLoginPage) def downloadFile(request): - data = json.loads(request.body) - fileToDownload = data['fileToDownload'] + try: - response = '' - if os.path.isfile(fileToDownload): - try: - with open(fileToDownload, 'rb') as f: - response = HttpResponse(f.read(), content_type="application/octet-stream") - response['Content-Disposition'] = 'inline; filename=' + os.path.basename(fileToDownload) - except Exception as e: - raise Http404 + data = json.loads(request.body) + fileToDownload = data['fileToDownload'] - return response \ No newline at end of file + response = '' + if os.path.isfile(fileToDownload): + try: + with open(fileToDownload, 'rb') as f: + response = HttpResponse(f.read(), content_type="application/octet-stream") + response['Content-Disposition'] = 'inline; filename=' + os.path.basename(fileToDownload) + except Exception as e: + raise Http404 + return response + + except KeyError: + return redirect(loadLoginPage) + + + +def createTemporaryFile(request): + try: + val = request.session['userID'] + + data = json.loads(request.body) + domainName = data['domainName'] + + admin = Administrator.objects.get(pk=val) + + ## Create file manager entry + + if Websites.objects.filter(domain=domainName).exists(): + if admin.type == 1: + + execPath = "sudo python " + virtualHostUtilities.cyberPanel + "/plogical/filemanager.py" + + execPath = execPath + " createTemporaryFile --domainName " + domainName + + output = subprocess.check_output(shlex.split(execPath)) + + if output.find("0,") > -1: + data_ret = {'createTemporaryFile': 0, 'error_message': "None"} + json_data = json.dumps(data_ret) + return HttpResponse(json_data) + + else: + domainRandomSeed = output.rstrip('\n') + data_ret = {'createTemporaryFile': 1, 'error_message': "None", 'domainRandomSeed':domainRandomSeed} + json_data = json.dumps(data_ret) + return HttpResponse(json_data) + + else: + website = Websites.objects.get(domain=domainName) + if website.admin == admin: + execPath = "sudo python " + virtualHostUtilities.cyberPanel + "/plogical/filemanager.py" + + execPath = execPath + " createTemporaryFile --domainName " + domainName + + output = subprocess.check_output(shlex.split(execPath)) + + if output.find("0,") > -1: + data_ret = {'createTemporaryFile': 0, 'error_message': "None"} + json_data = json.dumps(data_ret) + return HttpResponse(json_data) + + else: + domainRandomSeed = output.rstrip('\n') + data_ret = {'createTemporaryFile': 1, 'error_message': "None", 'domainRandomSeed': domainRandomSeed} + json_data = json.dumps(data_ret) + return HttpResponse(json_data) + else: + data_ret = {'createTemporaryFile': 0, 'error_message': "Domain ownership error."} + json_data = json.dumps(data_ret) + return HttpResponse(json_data) + + except KeyError: + return redirect(loadLoginPage) diff --git a/install/FileManager/.idea/workspace.xml b/install/FileManager/.idea/workspace.xml index ef5f7fda4..253d35cfa 100644 --- a/install/FileManager/.idea/workspace.xml +++ b/install/FileManager/.idea/workspace.xml @@ -14,10 +14,9 @@ - - + + - @@ -29,11 +28,22 @@ + + + + + + + + + + + @@ -69,6 +79,7 @@ @@ -80,10 +91,10 @@ - @@ -100,7 +111,6 @@ - @@ -118,6 +128,7 @@ + @@ -152,26 +163,27 @@ + - - + - + - + @@ -199,7 +211,6 @@ - @@ -211,6 +222,28 @@ + + + + + + + + + + + + + + + + + + + + + + @@ -224,12 +257,19 @@ + + + + + + + + - - + + - @@ -241,6 +281,7 @@ + diff --git a/install/FileManager/php/caller.php b/install/FileManager/php/caller.php index b45785f5c..6a5d4cf17 100755 --- a/install/FileManager/php/caller.php +++ b/install/FileManager/php/caller.php @@ -13,6 +13,25 @@ class Caller{ { if ($_SERVER['REQUEST_METHOD'] === 'POST' and isset($_POST['method'])) { + $pathToSeed = '/home/' . $_POST['domainName'] . '/..filemanagerkey'; + $receivedSeed = $_POST['domainRandomSeed']; + + $myfile = fopen($pathToSeed, "r") or die("Unable to open file!"); + $seed = fread($myfile,filesize($pathToSeed)); + fclose($myfile); + + if ($seed != $receivedSeed){ + $answer = array( + 'uploadStatus' => 0, + 'answer' => 'Not allowed to upload in this path.', + 'error_message' => "None", + 'fileName' => $_FILES['file']['name'] + ); + $json = json_encode($answer); + echo $json; + return; + } + switch ($_POST['method']) { case 'upload': $this->uploadFile(); diff --git a/install/FileManager/php/fileManager.php b/install/FileManager/php/fileManager.php index f98b0510c..98154cb52 100755 --- a/install/FileManager/php/fileManager.php +++ b/install/FileManager/php/fileManager.php @@ -11,6 +11,25 @@ class fileManager $postdata = file_get_contents("php://input"); $request = json_decode($postdata); + $pathToSeed = '/home/' . $request->domainName . '/..filemanagerkey'; + $receivedSeed = $request->domainRandomSeed; + + $myfile = fopen($pathToSeed, "r") or die("Unable to open file!"); + $seed = fread($myfile,filesize($pathToSeed)); + fclose($myfile); + + if ($seed != $receivedSeed){ + + $json_data = array( + "error_message" => "You can not open filemanager for this domain.", + "copied" => 1, + ); + $json = json_encode($json_data); + echo $json; + return; + } + + if (isset($request->method)) { switch ($request->method) { @@ -84,7 +103,8 @@ class fileManager if (is_dir($completePath) == true) { array_push($tempDir, $dirFile); } else { - array_push($tempFiles, $dirFile); + array_push($tempFiles, $dirFile); + } } diff --git a/mailServer/static/mailServer/mailServer.js b/mailServer/static/mailServer/mailServer.js index 4002f50e1..879adb0df 100644 --- a/mailServer/static/mailServer/mailServer.js +++ b/mailServer/static/mailServer/mailServer.js @@ -249,7 +249,7 @@ app.controller('deleteEmailAccount', function($scope,$http) { function ListInitialDatas(response) { - if(response.data.deleteEmailStatus == 1){ + if(response.data.deleteEmailStatus === 1){ $scope.emailDetails = true; diff --git a/plogical/filemanager.py b/plogical/filemanager.py new file mode 100644 index 000000000..2c95c8ca8 --- /dev/null +++ b/plogical/filemanager.py @@ -0,0 +1,45 @@ +import os.path +import shutil +import CyberCPLogFileWriter as logging +import subprocess +import argparse +import shlex +from random import randint + + +class filemanager: + + @staticmethod + def createTemporaryFile(domainName): + try: + + path = "/home/" + domainName + "/..filemanagerkey" + + fileKey = str(randint(1000, 9999)) + + filemanager = open(path,'w') + filemanager.write(fileKey) + filemanager.close() + + print fileKey + + except BaseException,msg: + logging.CyberCPLogFileWriter.writeToFile( + str(msg) + " [createEmailAccount]") + print "0," + str(msg) + + +def main(): + + parser = argparse.ArgumentParser(description='CyberPanel Filemanager') + parser.add_argument('function', help='Specific a function to call!') + parser.add_argument('--domainName', help='Domain name!') + + + args = parser.parse_args() + + if args.function == "createTemporaryFile": + filemanager.createTemporaryFile(args.domainName) + +if __name__ == "__main__": + main() \ No newline at end of file diff --git a/plogical/mailUtilities.py b/plogical/mailUtilities.py index a66f6bb94..aa2968615 100644 --- a/plogical/mailUtilities.py +++ b/plogical/mailUtilities.py @@ -4,12 +4,6 @@ import CyberCPLogFileWriter as logging import subprocess import argparse import shlex -import installUtilities -from random import randint -import sslUtilities -from os.path import join -from os import listdir, rmdir -from shutil import move class mailUtilities: diff --git a/static/filemanager/js/fileManager.js b/static/filemanager/js/fileManager.js index 9db45bcf1..74ef0675f 100644 --- a/static/filemanager/js/fileManager.js +++ b/static/filemanager/js/fileManager.js @@ -15,6 +15,7 @@ fileManager.controller('fileManagerCtrl', function($scope,$http,FileUploader) { var aceEditorMode = ''; var domainName = window.location.pathname.split("/")[2]; + var domainRandomSeed = ""; var homePathBack = "/home/"+domainName; $scope.currentPath = "/home/"+domainName; @@ -67,7 +68,9 @@ fileManager.controller('fileManagerCtrl', function($scope,$http,FileUploader) { var data = { completeStartingPath : completePath, - method : "list" + method : "list", + domainRandomSeed:domainRandomSeed, + domainName: domainName }; @@ -118,7 +121,6 @@ fileManager.controller('fileManagerCtrl', function($scope,$http,FileUploader) { parentNode.appendChild(prepareChildNodeLI(path,completePath,dropDown)); } - function prepareChildNodeLI(path,completePath,dropDown){ // text nodes are created @@ -364,6 +366,8 @@ fileManager.controller('fileManagerCtrl', function($scope,$http,FileUploader) { var permissionsNode = document.createTextNode(permissions); + + // @@ -598,6 +602,8 @@ fileManager.controller('fileManagerCtrl', function($scope,$http,FileUploader) { // table functions + + $scope.fetchForTableSecondary = function(node,functionName) { allFilesAndFolders = []; @@ -632,7 +638,9 @@ fileManager.controller('fileManagerCtrl', function($scope,$http,FileUploader) { var data = { completeStartingPath : completePathToFile, method : "listForTable", - home: homePathBack + home: homePathBack, + domainRandomSeed:domainRandomSeed, + domainName: domainName }; var tableBody = document.getElementById("tableBodyFiles"); @@ -666,6 +674,11 @@ fileManager.controller('fileManagerCtrl', function($scope,$http,FileUploader) { var fileSize = filesData[keys[i]][3]; var permissions = filesData[keys[i]][4]; var dirCheck = filesData[keys[i]][5]; + console.log(fileName); + if(fileName === "..filemanagerkey"){ + + continue; + } tableBody.appendChild(createTR(fileName,fileSize,lastModified,permissions,dirCheck)); } @@ -682,12 +695,51 @@ fileManager.controller('fileManagerCtrl', function($scope,$http,FileUploader) { } }; - $scope.fetchForTableSecondary(null,"startPoint"); function findFileExtension(fileName){ return (/[.]/.exec(fileName)) ? /[^.]+$/.exec(fileName) : undefined; } + // Create entry point for domain + + function createEntryPoint(){ + + url = "/filemanager/createTemporaryFile"; + + var data = { + domainName:domainName + }; + + var config = {}; + + $http.post(url, data,config).then(ListInitialDatas, cantLoadInitialDatas); + + + function ListInitialDatas(response) { + + if(response.data.createTemporaryFile === 1){ + domainRandomSeed = response.data.domainRandomSeed; + $scope.fetchForTableSecondary(null,"startPoint"); + } + else + { + var notification = alertify.notify(response.data.error_message, 'error', 10, function(){ console.log('dismissed'); }); + } + } + function cantLoadInitialDatas(response) { + var notification = alertify.notify("Could not connec to server, refresh page.", 'error', 10, function(){ console.log('dismissed'); }); + } + + + + + + + } + createEntryPoint(); + + + // html editor @@ -698,7 +750,9 @@ fileManager.controller('fileManagerCtrl', function($scope,$http,FileUploader) { var data = { fileName : completePathForFile, - method : "readFileContents" + method : "readFileContents", + domainRandomSeed:domainRandomSeed, + domainName: domainName }; @@ -738,7 +792,9 @@ fileManager.controller('fileManagerCtrl', function($scope,$http,FileUploader) { var data = { fileName : completePathForFile, method : "writeFileContents", - fileContent: editor.getValue() + fileContent: editor.getValue(), + domainRandomSeed:domainRandomSeed, + domainName: domainName }; @@ -790,7 +846,13 @@ fileManager.controller('fileManagerCtrl', function($scope,$http,FileUploader) { uploader.onAfterAddingFile = function(fileItem) { $scope.errorMessage = true; - fileItem.formData.push({"completePath":$scope.currentPath}); + fileItem.formData.push( + { + "completePath":$scope.currentPath, + domainRandomSeed:domainRandomSeed, + domainName: domainName + + }); }; // folder functions @@ -823,6 +885,8 @@ fileManager.controller('fileManagerCtrl', function($scope,$http,FileUploader) { var data = { folderName : completePathForFolder, method : "createNewFolder", + domainRandomSeed:domainRandomSeed, + domainName: domainName }; @@ -872,6 +936,8 @@ fileManager.controller('fileManagerCtrl', function($scope,$http,FileUploader) { var data = { fileName : completePathForFile, method : "createNewFile", + domainRandomSeed:domainRandomSeed, + domainName: domainName }; @@ -914,6 +980,8 @@ fileManager.controller('fileManagerCtrl', function($scope,$http,FileUploader) { path : $scope.currentPath, method : "deleteFolderOrFile", fileAndFolders: allFilesAndFolders, + domainRandomSeed:domainRandomSeed, + domainName: domainName }; @@ -962,7 +1030,9 @@ fileManager.controller('fileManagerCtrl', function($scope,$http,FileUploader) { listOfFiles : allFilesAndFolders, compressedFileName: $scope.compressedFileName, compressionType: $scope.compressionType, - method: 'compress' + method: 'compress', + domainRandomSeed:domainRandomSeed, + domainName: domainName }; @@ -1017,7 +1087,9 @@ fileManager.controller('fileManagerCtrl', function($scope,$http,FileUploader) { fileToExtract: completeFileToExtract, extractionType: extractionType, extractionLocation: $scope.extractionLocation, - method: 'extract' + method: 'extract', + domainRandomSeed:domainRandomSeed, + domainName: domainName }; @@ -1069,7 +1141,9 @@ fileManager.controller('fileManagerCtrl', function($scope,$http,FileUploader) { basePath : $scope.currentPath, newPath : $scope.pathToMoveTo, fileAndFolders:allFilesAndFolders, - method: 'move' + method: 'move', + domainRandomSeed:domainRandomSeed, + domainName: domainName }; @@ -1120,7 +1194,9 @@ fileManager.controller('fileManagerCtrl', function($scope,$http,FileUploader) { basePath : $scope.currentPath, newPath : $scope.pathToCopyTo, fileAndFolders:allFilesAndFolders, - method: 'copy' + method: 'copy', + domainRandomSeed:domainRandomSeed, + domainName: domainName }; @@ -1238,7 +1314,9 @@ fileManager.controller('fileManagerCtrl', function($scope,$http,FileUploader) { basePath : $scope.currentPath, existingName: $scope.fileToRename, newFileName : $scope.newFileName, - method: 'rename' + method: 'rename', + domainRandomSeed:domainRandomSeed, + domainName: domainName }; @@ -1274,6 +1352,8 @@ fileManager.controller('fileManagerCtrl', function($scope,$http,FileUploader) { var data = { domainName : domainName, + domainRandomSeed:domainRandomSeed, + domainName: domainName }; @@ -1305,7 +1385,9 @@ fileManager.controller('fileManagerCtrl', function($scope,$http,FileUploader) { url = "/filemanager/downloadFile"; var data = { - fileToDownload: $scope.currentPath + "/" + allFilesAndFolders[0] + fileToDownload: $scope.currentPath + "/" + allFilesAndFolders[0], + domainRandomSeed:domainRandomSeed, + domainName: domainName }; diff --git a/static/mailServer/mailServer.js b/static/mailServer/mailServer.js index 4002f50e1..879adb0df 100644 --- a/static/mailServer/mailServer.js +++ b/static/mailServer/mailServer.js @@ -249,7 +249,7 @@ app.controller('deleteEmailAccount', function($scope,$http) { function ListInitialDatas(response) { - if(response.data.deleteEmailStatus == 1){ + if(response.data.deleteEmailStatus === 1){ $scope.emailDetails = true;