diff --git a/baseTemplate/static/baseTemplate/custom-js/system-status.js b/baseTemplate/static/baseTemplate/custom-js/system-status.js
index 58b2c634e..0200129db 100644
--- a/baseTemplate/static/baseTemplate/custom-js/system-status.js
+++ b/baseTemplate/static/baseTemplate/custom-js/system-status.js
@@ -22,6 +22,16 @@ function getCookie(name) {
return cookieValue;
}
+function randomPassword(length) {
+ var chars = "abcdefghijklmnopqrstuvwxyz!@#$%^*()-+<>ABCDEFGHIJKLMNOP1234567890";
+ var pass = "";
+ for (var x = 0; x < length; x++) {
+ var i = Math.floor(Math.random() * chars.length);
+ pass += chars.charAt(i);
+ }
+ return pass;
+}
+
/* Utilities ends here */
diff --git a/databases/static/databases/databases.js b/databases/static/databases/databases.js
index 15095effa..22f246d91 100644
--- a/databases/static/databases/databases.js
+++ b/databases/static/databases/databases.js
@@ -11,13 +11,13 @@ app.controller('createDatabase', function($scope,$http) {
$scope.databaseCreationFailed = true;
$scope.databaseCreated = true;
$scope.couldNotConnect = true;
+ $scope.generatedPasswordView = true;
$scope.showDetailsBoxes = function(){
$scope.dbDetails = false;
};
-
$scope.createDatabase = function(){
$scope.createDatabaseLoading = false;
@@ -106,6 +106,15 @@ app.controller('createDatabase', function($scope,$http) {
+ };
+
+ $scope.generatePassword = function () {
+ $scope.generatedPasswordView = false;
+ $scope.dbPassword = randomPassword(12);
+ };
+
+ $scope.usePassword = function () {
+ $scope.generatedPasswordView = true;
};
});
@@ -365,8 +374,6 @@ app.controller('listDBs', function($scope,$http) {
};
-
-
function populateCurrentRecords(){
$scope.recordsFetched = true;
$scope.passwordChanged = true;
@@ -442,7 +449,20 @@ app.controller('listDBs', function($scope,$http) {
}
- };
+ }
+
+ ////
+
+ $scope.generatedPasswordView = true;
+
+ $scope.generatePassword = function () {
+ $scope.generatedPasswordView = false;
+ $scope.dbPassword = randomPassword(12);
+ };
+
+ $scope.usePassword = function () {
+ $scope.generatedPasswordView = true;
+ };
});
diff --git a/databases/templates/databases/createDatabase.html b/databases/templates/databases/createDatabase.html
index 65586485b..ab809bba2 100644
--- a/databases/templates/databases/createDatabase.html
+++ b/databases/templates/databases/createDatabase.html
@@ -57,6 +57,19 @@
-
-
{% trans "List Databases" %}
-
{% trans "List Databases or change their passwords." %}
-
-
-
-
-
-
-
-
-
+ {% load static %}
+ {% get_current_language as LANGUAGE_CODE %}
+
+
+
+
{% trans "List Databases" %}
+
{% trans "List Databases or change their passwords." %}
+
+
+
-
-
-
-
{% endblock %}
diff --git a/filemanager/filemanager.py b/filemanager/filemanager.py
index afb122ece..7609d314d 100644
--- a/filemanager/filemanager.py
+++ b/filemanager/filemanager.py
@@ -24,6 +24,10 @@ class FileManager:
def changeOwner(self, path):
domainName = self.data['domainName']
website = Websites.objects.get(domain=domainName)
+
+ if path.find('..') > -1:
+ return self.ajaxPre(0, 'Not allowed to move in this path, please choose location inside home!')
+
command = "sudo chown -R " + website.externalApp + ':' + website.externalApp + ' ' + self.returnPathEnclosed(path)
ProcessUtilities.executioner(command)
@@ -99,6 +103,9 @@ class FileManager:
finalData = {}
finalData['status'] = 1
+ if self.data['fileName'].find('..') > -1:
+ return self.ajaxPre(0, 'Not allowed to move in this path, please choose location inside home!')
+
command = "sudo touch " + self.returnPathEnclosed(self.data['fileName'])
ProcessUtilities.executioner(command)
@@ -195,6 +202,9 @@ class FileManager:
finalData = {}
finalData['status'] = 1
+ if self.data['newFileName'].find('..') > -1:
+ return self.ajaxPre(0, 'Not allowed to move in this path, please choose location inside home!')
+
command = 'sudo mv ' + self.returnPathEnclosed(self.data['basePath'] + '/' + self.data['existingName']) + ' ' + self.returnPathEnclosed(self.data['basePath'] + '/' + self.data['newFileName'])
ProcessUtilities.executioner(command)
diff --git a/ftp/static/ftp/ftp.js b/ftp/static/ftp/ftp.js
index 27b0e7c88..88a7c3806 100644
--- a/ftp/static/ftp/ftp.js
+++ b/ftp/static/ftp/ftp.js
@@ -23,8 +23,6 @@ app.controller('createFTPAccount', function($scope,$http) {
};
-
-
$scope.createFTPAccount = function(){
$scope.ftpLoading = false;
@@ -116,6 +114,19 @@ app.controller('createFTPAccount', function($scope,$http) {
};
+ ///
+
+ $scope.generatedPasswordView = true;
+
+ $scope.generatePassword = function () {
+ $scope.generatedPasswordView = false;
+ $scope.ftpPassword = randomPassword(12);
+ };
+
+ $scope.usePassword = function () {
+ $scope.generatedPasswordView = true;
+ };
+
});
/* Java script code to create account ends here */
@@ -142,8 +153,6 @@ app.controller('deleteFTPAccount', function($scope,$http) {
$scope.deleteFTPButtonInit = true;
-
-
var url = "/ftp/fetchFTPAccounts";
@@ -382,8 +391,6 @@ app.controller('listFTPAccounts', function($scope,$http) {
};
-
-
function populateCurrentRecords(){
$scope.recordsFetched = true;
$scope.passwordChanged = true;
@@ -459,6 +466,19 @@ app.controller('listFTPAccounts', function($scope,$http) {
}
- };
+ }
+
+ ////
+
+ $scope.generatedPasswordView = true;
+
+ $scope.generatePassword = function () {
+ $scope.generatedPasswordView = false;
+ $scope.ftpPassword = randomPassword(12);
+ };
+
+ $scope.usePassword = function () {
+ $scope.generatedPasswordView = true;
+ };
});
\ No newline at end of file
diff --git a/ftp/templates/ftp/createFTPAccount.html b/ftp/templates/ftp/createFTPAccount.html
index 78927cf7f..d82425c7b 100644
--- a/ftp/templates/ftp/createFTPAccount.html
+++ b/ftp/templates/ftp/createFTPAccount.html
@@ -68,6 +68,22 @@
+
+
+
+
+
+
diff --git a/ftp/templates/ftp/listFTPAccounts.html b/ftp/templates/ftp/listFTPAccounts.html
index 7c72a9604..dae50eb87 100644
--- a/ftp/templates/ftp/listFTPAccounts.html
+++ b/ftp/templates/ftp/listFTPAccounts.html
@@ -87,6 +87,22 @@
required>
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/loginSystem/static/loginSystem/login-systen.js b/loginSystem/static/loginSystem/login-systen.js
index 30a56f0fe..6aad70b6f 100644
--- a/loginSystem/static/loginSystem/login-systen.js
+++ b/loginSystem/static/loginSystem/login-systen.js
@@ -39,9 +39,6 @@ application.config(['$interpolateProvider',
}
]);
-
-
-
application.controller('loginSystem', function($scope,$http,$window) {
@@ -98,4 +95,3 @@ application.controller('loginSystem', function($scope,$http,$window) {
/* Java script code to to Check Login status ends here */
-
diff --git a/mailServer/static/mailServer/mailServer.js b/mailServer/static/mailServer/mailServer.js
index eabb4acf5..c5d8e512d 100644
--- a/mailServer/static/mailServer/mailServer.js
+++ b/mailServer/static/mailServer/mailServer.js
@@ -26,8 +26,6 @@ app.controller('createEmailAccount', function($scope,$http) {
};
-
-
$scope.createEmailAccount = function(){
$scope.emailDetails = false;
@@ -117,11 +115,21 @@ app.controller('createEmailAccount', function($scope,$http) {
};
+ $scope.generatedPasswordView = true;
+
+ $scope.generatePassword = function () {
+ $scope.generatedPasswordView = false;
+ $scope.emailPassword = randomPassword(12);
+ };
+
+ $scope.usePassword = function () {
+ $scope.generatedPasswordView = true;
+ };
+
});
/* Java script code to create account ends here */
-
/* Java script code to create account */
app.controller('deleteEmailAccount', function($scope,$http) {
@@ -318,7 +326,6 @@ app.controller('deleteEmailAccount', function($scope,$http) {
/* Java script code to create account ends here */
-
/* Java script code to create account */
app.controller('changeEmailPassword', function($scope,$http) {
@@ -408,7 +415,6 @@ app.controller('changeEmailPassword', function($scope,$http) {
};
-
$scope.changePassword = function(){
$scope.emailLoading = false;
@@ -493,8 +499,6 @@ app.controller('changeEmailPassword', function($scope,$http) {
};
-
-
$scope.deleteEmailAccount = function(){
var domain = $scope.selectedEmail;
@@ -505,6 +509,21 @@ app.controller('changeEmailPassword', function($scope,$http) {
};
+ ///
+
+ $scope.generatedPasswordView = true;
+
+ $scope.generatePassword = function () {
+ $scope.generatedPasswordView = false;
+ $scope.emailPassword = randomPassword(12);
+ };
+
+ $scope.usePassword = function () {
+ $scope.generatedPasswordView = true;
+ };
+
+
+
});
/* Java script code to create account ends here */
diff --git a/mailServer/templates/mailServer/changeEmailPassword.html b/mailServer/templates/mailServer/changeEmailPassword.html
index d2edebb3b..dc7eb3bb6 100644
--- a/mailServer/templates/mailServer/changeEmailPassword.html
+++ b/mailServer/templates/mailServer/changeEmailPassword.html
@@ -69,6 +69,22 @@
+
+
+
+
+
+
diff --git a/mailServer/templates/mailServer/createEmailAccount.html b/mailServer/templates/mailServer/createEmailAccount.html
index 7884ea363..36aa26162 100644
--- a/mailServer/templates/mailServer/createEmailAccount.html
+++ b/mailServer/templates/mailServer/createEmailAccount.html
@@ -69,6 +69,22 @@
+
+
+
+
+
+