diff --git a/filemanager/static/filemanager/css/fileManager.css b/filemanager/static/filemanager/css/fileManager.css index 520ce5cdd..cec137291 100755 --- a/filemanager/static/filemanager/css/fileManager.css +++ b/filemanager/static/filemanager/css/fileManager.css @@ -29,15 +29,10 @@ border-radius: 8px 8px 0 0; } -.header-logo:hover { - transform: translateY(-2px); - box-shadow: var(--card-shadow-hover); -} - -.header-logo img { - height: 32px; - width: auto; - filter: brightness(0.8) contrast(1.2); +#uploadBoxLabel,#htmlEditorLable{ + background: -moz-linear-gradient(#a4dbf5, #8cc5e0); + background: -webkit-linear-gradient(#a4dbf5, #8cc5e0); + background: -o-linear-gradient(#a4dbf5, #8cc5e0); } .my-drop-zone { @@ -60,220 +55,59 @@ border-radius: 3px; } -.header-logo span { - font-size: 1.125rem; - font-weight: 500; - color: var(--text-primary); +#htmlEditorContent{ + width: 100%; + height: 500px; } -/* Top Actions Bar */ +#htmlEditorStyles{ + margin-bottom: 2%; + margin-top: 2%; +} .flex-wrap { - padding: 0.5rem; - background: var(--background-lighter); - border-radius: 0.5rem; - box-shadow: var(--card-shadow); - margin: 0.5rem 0; -} - -.nav { display: flex; flex-wrap: wrap; - gap: 0.5rem; - padding: 0.5rem; +} +.mt-5 { + margin-top: 5px !important; +} +.mt-10 { + margin-top: 10px; +} +.mt-20 { + margin-top: 20px; +} +.mt-30 { + margin-top: 30px; +} +.mr-10 { + margin-right: 10px; +} +.mb-10 { + margin-bottom: 10px; +} +.ml-10 { + margin-left: 10px; +} +.my-10 { + margin-top: 10px; + margin-bottom: 10px; } -/* Enhanced Action Buttons */ -.nav-item .nav-link { - display: inline-flex; - align-items: center; - padding: 0.75rem 1.25rem; - color: var(--text-secondary); - background: var(--background-lighter); - border: 1.5px solid var(--border-color); - border-radius: 0.75rem; - transition: var(--transition-bounce); - font-size: 0.875rem; - font-weight: 600; - text-decoration: none; - box-shadow: var(--button-shadow); +.mx-5 { + margin-left: 5px; + margin-right: 5px; } - -.nav-item .nav-link:hover { - color: var(--primary-color); - border-color: var(--primary-color); - background: var(--background-lighter); - transform: translateY(-2px); - box-shadow: var(--button-shadow-hover); +.mx-10 { + margin-left: 10px; + margin-right: 10px; } - -.nav-item .nav-link i { - margin-right: 0.5rem; - font-size: 1rem; -} - -/* File Manager Layout */ -.row { - margin: 0; - background: var(--background-lighter); -} - -/* Modern File List Section */ -.table { - background: var(--background-lighter); - border-radius: 1.25rem; - box-shadow: var(--card-shadow); - overflow: hidden; - border: 1.5px solid var(--border-color); - margin-top: 1.5rem; -} - -#tableHead th { - background: var(--background-light); - padding: 1.25rem 1.5rem; - font-size: 0.75rem; - font-weight: 600; - text-transform: uppercase; - letter-spacing: 0.1em; - color: var(--text-secondary); - border-bottom: 1.5px solid var(--border-color); -} - -.table tbody tr { - transition: var(--transition-smooth); -} - -.table tbody tr:hover { - background: var(--hover-bg); - transform: translateY(-1px); - box-shadow: var(--button-shadow); -} - -.table td { - padding: 1.25rem 1.5rem; - vertical-align: middle; - color: var(--text-secondary); - font-size: 0.875rem; - border-bottom: 1px solid var(--border-color); -} - -/* Enhanced File Actions */ -.file-actions { - display: flex; - gap: 0.75rem; - opacity: 0; - transition: var(--transition-smooth); -} - -.file-action-btn { - padding: 0.625rem; - border-radius: 0.75rem; - border: 1.5px solid var(--border-color); - background: var(--background-lighter); - color: var(--text-secondary); - transition: var(--transition-bounce); - box-shadow: var(--button-shadow); -} - -.file-action-btn:hover { - color: var(--primary-color); - border-color: var(--primary-color); - background: var(--background-lighter); - transform: translateY(-2px); - box-shadow: var(--button-shadow-hover); -} - -/* Modern Tree View */ -.tree-item { - display: flex; - align-items: center; - padding: 0.75rem 1rem; - border-radius: 0.75rem; - cursor: pointer; - transition: var(--transition-smooth); - margin: 0.25rem 0; -} - -.tree-item:hover { - background: var(--hover-bg); - transform: translateX(4px); -} - -.tree-item i { - margin-right: 0.5rem; - font-size: 1rem; -} - -/* File List */ -.file-list { - background: var(--background-lighter); - border-radius: 0.5rem; - margin: 1rem; -} - -.file-list-header { - display: flex; - align-items: center; - padding: 0.75rem 1rem; - background: var(--background-light); - border-bottom: 1px solid var(--border-color); - border-top-left-radius: 0.5rem; - border-top-right-radius: 0.5rem; -} - -.file-item { - display: flex; - align-items: center; - padding: 0.5rem 1rem; - border-bottom: 1px solid var(--border-color); - transition: all 0.15s ease; -} - -.file-item:hover { - background: var(--hover-bg); -} - -.file-item-icon { - margin-right: 0.75rem; - color: var(--secondary-color); -} - -.file-item-name { - flex: 1; - font-size: 0.875rem; - color: var(--text-primary); -} - -.file-item-size { - width: 100px; - text-align: right; - font-size: 0.875rem; - color: var(--text-secondary); -} - -.file-item-date { - width: 150px; - text-align: right; - font-size: 0.875rem; - color: var(--text-secondary); -} - -.file-item-permissions { - width: 100px; - text-align: right; - font-family: monospace; - font-size: 0.875rem; - color: var(--text-secondary); -} - -/* Enhanced Path Navigation */ -.path-nav { - display: flex; - align-items: center; - gap: 0.75rem; - padding: 1rem 1.5rem; - background: var(--background-light); - border-bottom: 1.5px solid var(--border-color); - border-radius: 1rem 1rem 0 0; +.header-logo { + width: 315px; +/* text-align: center;*/ + font-size: 16px; + float: left; + position: relative; } a.nav-link { @@ -287,41 +121,15 @@ a.nav-link:hover { transform: translateY(-1px); } -.path-nav-separator { - color: var(--border-color); +.point-events { + pointer-events: all; } -/* Selection Styles */ -.selected { - background: var(--hover-bg); - border-color: var(--primary-color); -} - -/* Modern Current Path Display */ -#currentRPath { - font-size: 0.875rem; - color: var(--text-secondary); - background-color: var(--background-light); - border: 1.5px solid var(--border-color); - padding: 1rem 1.25rem; - border-radius: 1rem; - margin-bottom: 1.5rem; - transition: var(--transition-bounce); - box-shadow: var(--button-shadow); -} - -#currentRPath:hover { - border-color: var(--primary-color); - transform: translateY(-1px); - box-shadow: var(--button-shadow-hover); -} - -/* Enhanced File Icons */ -i.fa.fa-folder { - color: var(--warning-color) !important; - margin-right: 0.75rem; - font-size: 1.25rem; - transition: var(--transition-smooth); +.card-header { + padding: .75rem 1.25rem; + margin-bottom: 0; + background-color: transparent; + border-bottom: none; } .form-control { padding: 0.5rem 1rem; @@ -461,4 +269,4 @@ a.nav-link:hover { .btn-primary:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(65, 88, 208, 0.15); -} +} \ No newline at end of file diff --git a/plogical/sslUtilities.py b/plogical/sslUtilities.py index 11f616202..4667e5426 100755 --- a/plogical/sslUtilities.py +++ b/plogical/sslUtilities.py @@ -6,7 +6,6 @@ import shlex import subprocess import socket from plogical.processUtilities import ProcessUtilities - try: from websiteFunctions.models import ChildDomains, Websites except: @@ -15,6 +14,7 @@ from plogical.acl import ACLManager class sslUtilities: + Server_root = "/usr/local/lsws" redisConf = '/usr/local/lsws/conf/dvhost_redis.conf' @@ -48,6 +48,7 @@ class sslUtilities: except BaseException as msg: return 0, str(msg) + @staticmethod def CheckIfSSLNeedsToBeIssued(virtualHostName): #### if website already have an SSL, better not issue again - need to check for wild-card @@ -60,6 +61,7 @@ class sslUtilities: if os.path.exists(ProcessUtilities.debugPath): logging.CyberCPLogFileWriter.writeToFile(f'SSL provider for {virtualHostName} is {SSLProvider}.') + #### totally seprate check to see if both non-www and www are covered if SSLProvider == "(STAGING) Let's Encrypt": @@ -71,8 +73,7 @@ class sslUtilities: if len(domains) > 1: ### need further checks here to see if ssl is valid for less then 15 days etc logging.CyberCPLogFileWriter.writeToFile( - '[CheckIfSSLNeedsToBeIssued] SSL exists for %s and both versions are covered, just need to ensure if SSL is valid for less then 15 days.' % ( - virtualHostName), 0) + '[CheckIfSSLNeedsToBeIssued] SSL exists for %s and both versions are covered, just need to ensure if SSL is valid for less then 15 days.' % (virtualHostName), 0) pass else: return sslUtilities.ISSUE_SSL @@ -85,7 +86,7 @@ class sslUtilities: now = datetime.now() diff = finalDate - now - if int(diff.days) >= 15 and SSLProvider != 'Denial': + if int(diff.days) >= 15 and SSLProvider!='Denial': logging.CyberCPLogFileWriter.writeToFile( '[CheckIfSSLNeedsToBeIssued] SSL exists for %s and is not ready to fetch new SSL., skipping..' % ( virtualHostName), 0) @@ -143,7 +144,8 @@ class sslUtilities: logging.CyberCPLogFileWriter.writeToFile(str(msg) + " [IO Error with main config file [checkSSLListener]]") return str(msg) return 0 - + + @staticmethod def checkSSLIPv6Listener(): try: @@ -153,8 +155,7 @@ class sslUtilities: return 1 except BaseException as msg: - logging.CyberCPLogFileWriter.writeToFile( - str(msg) + " [IO Error with main config file [checkSSLIPv6Listener]]") + logging.CyberCPLogFileWriter.writeToFile(str(msg) + " [IO Error with main config file [checkSSLIPv6Listener]]") return str(msg) return 0 @@ -344,7 +345,7 @@ context /.well-known/acme-challenge { writeDataToFile.writelines(certFile) writeDataToFile.writelines(certChain) writeDataToFile.writelines(sslProtocol) - writeDataToFile.writelines(enableECDHE) + writeDataToFile.writelines(enableECDHE) writeDataToFile.writelines(renegProtection) writeDataToFile.writelines(sslSessionCache) writeDataToFile.writelines(enableSpdy) @@ -383,7 +384,7 @@ context /.well-known/acme-challenge { writeDataToFile.writelines(certFile) writeDataToFile.writelines(certChain) writeDataToFile.writelines(sslProtocol) - writeDataToFile.writelines(enableECDHE) + writeDataToFile.writelines(enableECDHE) writeDataToFile.writelines(renegProtection) writeDataToFile.writelines(sslSessionCache) writeDataToFile.writelines(enableSpdy) @@ -664,7 +665,7 @@ context /.well-known/acme-challenge { try: command = acmePath + " --issue -d " + virtualHostName + " -d www." + virtualHostName \ - + ' -d ' + aliasDomain + ' -d www.' + aliasDomain \ + + ' -d ' + aliasDomain + ' -d www.' + aliasDomain\ + ' --cert-file ' + existingCertPath + '/cert.pem' + ' --key-file ' + existingCertPath + '/privkey.pem' \ + ' --fullchain-file ' + existingCertPath + '/fullchain.pem' + ' -w /usr/local/lsws/Example/html -k ec-256 --force --server letsencrypt' @@ -698,16 +699,13 @@ def issueSSLForDomain(domain, adminEmail, sslpath, aliasDomain=None): if os.path.exists(pathToStoreSSLFullChain): import OpenSSL - x509 = OpenSSL.crypto.load_certificate(OpenSSL.crypto.FILETYPE_PEM, - open(pathToStoreSSLFullChain, 'r').read()) + x509 = OpenSSL.crypto.load_certificate(OpenSSL.crypto.FILETYPE_PEM, open(pathToStoreSSLFullChain, 'r').read()) SSLProvider = x509.get_issuer().get_components()[1][1].decode('utf-8') if SSLProvider != 'Denial': if sslUtilities.installSSLForDomain(domain) == 1: - logging.CyberCPLogFileWriter.writeToFile( - "We are not able to get new SSL for " + domain + ". But there is an existing SSL, it might only be for the main domain (excluding www).") - return [1, - "We are not able to get new SSL for " + domain + ". But there is an existing SSL, it might only be for the main domain (excluding www)." + " [issueSSLForDomain]"] + logging.CyberCPLogFileWriter.writeToFile("We are not able to get new SSL for " + domain + ". But there is an existing SSL, it might only be for the main domain (excluding www).") + return [1, "We are not able to get new SSL for " + domain + ". But there is an existing SSL, it might only be for the main domain (excluding www)." + " [issueSSLForDomain]"] command = 'openssl req -newkey rsa:2048 -new -nodes -x509 -days 3650 -subj "/C=US/ST=Denial/L=Springfield/O=Dis/CN=' + domain + '" -keyout ' + pathToStoreSSLPrivKey + ' -out ' + pathToStoreSSLFullChain cmd = shlex.split(command) @@ -720,4 +718,4 @@ def issueSSLForDomain(domain, adminEmail, sslpath, aliasDomain=None): return [0, "210 Failed to install SSL for domain. [issueSSLForDomain]"] except BaseException as msg: - return [0, "347 " + str(msg) + " [issueSSLForDomain]"] + return [0, "347 " + str(msg) + " [issueSSLForDomain]"] \ No newline at end of file diff --git a/websiteFunctions/website.py b/websiteFunctions/website.py index e28c7b50f..89605423b 100755 --- a/websiteFunctions/website.py +++ b/websiteFunctions/website.py @@ -4185,13 +4185,7 @@ Require valid-user port = ProcessUtilities.fetchCurrentPort() webhookURL = 'https://' + ipAddress + ':%s/websites/' % (port) + self.domain + '/gitNotify' - webhookURL = webhookURL.replace(' ', '%20') - if website.externalApp == 'github': - command = "ssh-keygen -f /home/%s/.ssh/%s -t rsa -N ''" % (self.domain, website.externalApp) - ProcessUtilities.executioner(command, website.externalApp) - - configContent = """Host github.com proc = httpProc(request, 'websiteFunctions/setupGit.html', {'domainName': self.domain, 'installed': 1, 'webhookURL': webhookURL}) return proc.render()