From 6b04398bbb0a908210d6b412c7d9a316414c3a50 Mon Sep 17 00:00:00 2001
From: Axton
Date: Wed, 22 Jun 2022 02:09:05 +0100
Subject: [PATCH] =?UTF-8?q?=F0=9F=8C=8D=20v1.1.6=20Stable=20Release?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.github/workflows/codacy.yml | 60 +
.gitignore | 3 +-
.security-scan | 1818 +++++++++++--------------
.version | 2 +-
Modules/Functions.php | 71 +-
Public/Error/403.php | 6 +-
Public/Error/404.php | 8 +-
Public/Error/500.php | 8 +-
Public/Error/DatabaseConfig.php | 10 +-
Public/Error/DatabaseCredentials.php | 10 +-
Public/Error/ServerConfiguration.php | 10 +-
Public/assets/css/style.css | 52 +-
Public/assets/js/formContentUpdate.js | 31 +
Public/assets/js/globalFunctions.js | 11 +
Public/index.php | 54 +-
Public/processForm.php | 10 +-
Public/view.php | 56 +-
README.md | 2 +-
18 files changed, 1070 insertions(+), 1152 deletions(-)
create mode 100644 .github/workflows/codacy.yml
create mode 100644 Public/assets/js/formContentUpdate.js
create mode 100644 Public/assets/js/globalFunctions.js
diff --git a/.github/workflows/codacy.yml b/.github/workflows/codacy.yml
new file mode 100644
index 0000000..f6fc9b6
--- /dev/null
+++ b/.github/workflows/codacy.yml
@@ -0,0 +1,60 @@
+# This workflow uses actions that are not certified by GitHub.
+# They are provided by a third-party and are governed by
+# separate terms of service, privacy policy, and support
+# documentation.
+
+# This workflow checks out code, performs a Codacy security scan
+# and integrates the results with the
+# GitHub Advanced Security code scanning feature. For more information on
+# the Codacy security scan action usage and parameters, see
+# https://github.com/codacy/codacy-analysis-cli-action.
+# For more information on Codacy Analysis CLI in general, see
+# https://github.com/codacy/codacy-analysis-cli.
+
+name: Codacy Security Scan
+
+on:
+ push:
+ branches: [ "main" ]
+ pull_request:
+ # The branches below must be a subset of the branches above
+ branches: [ "main" ]
+ schedule:
+ - cron: '36 20 * * 2'
+
+permissions:
+ contents: read
+
+jobs:
+ codacy-security-scan:
+ permissions:
+ contents: read # for actions/checkout to fetch code
+ security-events: write # for github/codeql-action/upload-sarif to upload SARIF results
+ name: Codacy Security Scan
+ runs-on: ubuntu-latest
+ steps:
+ # Checkout the repository to the GitHub Actions runner
+ - name: Checkout code
+ uses: actions/checkout@v3
+
+ # Execute Codacy Analysis CLI and generate a SARIF output with the security issues identified during the analysis
+ - name: Run Codacy Analysis CLI
+ uses: codacy/codacy-analysis-cli-action@d840f886c4bd4edc059706d09c6a1586111c540b
+ with:
+ # Check https://github.com/codacy/codacy-analysis-cli#project-token to get your project token from your Codacy repository
+ # You can also omit the token and run the tools that support default configurations
+ project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
+ verbose: true
+ output: .codacy-scan
+ format: sarif
+ # Adjust severity of non-security issues
+ gh-code-scanning-compat: true
+ # Force 0 exit code to allow SARIF file generation
+ # This will handover control about PR rejection to the GitHub side
+ max-allowed-issues: 2147483647
+
+ # Upload the SARIF file generated in the previous step
+ - name: Upload SARIF results file
+ uses: github/codeql-action/upload-sarif@v2
+ with:
+ sarif_file: .codacy-scan
diff --git a/.gitignore b/.gitignore
index 2d9c828..2dfab79 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,12 +1,11 @@
# Quickblaze Files
.gitattributes
.dccache
-.dccache
# QuickBlaze Security
local-storage
Modules/Database.env
-Modules/InstallationStatus.json
+.config
# QuickBlaze Composer
vendor/
diff --git a/.security-scan b/.security-scan
index 30c0964..bb25304 100644
--- a/.security-scan
+++ b/.security-scan
@@ -9,150 +9,6 @@
"semanticVersion": "1.0.0",
"version": "1.0.0",
"rules": [
- {
- "id": "php/XSS",
- "name": "XSS",
- "shortDescription": {
- "text": "Cross-site Scripting (XSS)"
- },
- "defaultConfiguration": {
- "level": "error"
- },
- "help": {
- "markdown": "## Details\n\nA cross-site scripting attack occurs when the attacker tricks a legitimate web-based application or site to accept a request as originating from a trusted source.\n\nThis is done by escaping the context of the web application; the web application then delivers that data to its users along with other trusted dynamic content, without validating it. The browser unknowingly executes malicious script on the client side (through client-side languages; usually JavaScript or HTML) in order to perform actions that are otherwise typically blocked by the browser's Same Origin Policy.\n\nInjecting malicious code is the most prevalent manner by which XSS is exploited; for this reason, escaping characters in order to prevent this manipulation is the top method for securing code against this vulnerability.\n\nEscaping means that the application is coded to mark key characters, and particularly key characters included in user input, to prevent those characters from being interpreted in a dangerous context. For example, in HTML, `<` can be coded as `<`; and `>` can be coded as `>`; in order to be interpreted and displayed as themselves in text, while within the code itself, they are used for HTML tags. If malicious content is injected into an application that escapes special characters and that malicious content uses `<` and `>` as HTML tags, those characters are nonetheless not interpreted as HTML tags by the browser if they've been correctly escaped in the application code and in this way the attempted attack is diverted.\n\nThe most prominent use of XSS is to steal cookies (source: OWASP HttpOnly) and hijack user sessions, but XSS exploits have been used to expose sensitive information, enable access to privileged services and functionality and deliver malware.\n\n### Types of attacks\nThere are a few methods by which XSS can be manipulated:\n\n|Type|Origin|Description|\n|--|--|--|\n|**Stored**|Server|The malicious code is inserted in the application (usually as a link) by the attacker. The code is activated every time a user clicks the link.|\n|**Reflected**|Server|The attacker delivers a malicious link externally from the vulnerable web site application to a user. When clicked, malicious code is sent to the vulnerable web site, which reflects the attack back to the user's browser.|\n|**DOM-based**|Client|The attacker forces the user's browser to render a malicious page. The data in the page itself delivers the cross-site scripting data.|\n|**Mutated**| |The attacker injects code that appears safe, but is then rewritten and modified by the browser, while parsing the markup. An example is rebalancing unclosed quotation marks or even adding quotation marks to unquoted parameters.|\n\n### Affected environments\nThe following environments are susceptible to an XSS attack:\n\n* Web servers\n* Application servers\n* Web application environments\n\n### How to prevent\nThis section describes the top best practices designed to specifically protect your code:\n\n* Sanitize data input in an HTTP request before reflecting it back, ensuring all data is validated, filtered or escaped before echoing anything back to the user, such as the values of query parameters during searches.\n* Convert special characters such as `?`, `&`, `/`, `<`, `>` and spaces to their respective HTML or URL encoded equivalents.\n* Give users the option to disable client-side scripts.\n* Redirect invalid requests.\n* Detect simultaneous logins, including those from two separate IP addresses, and invalidate those sessions.\n* Use and enforce a Content Security Policy (source: Wikipedia) to disable any features that might be manipulated for an XSS attack.\n* Read the documentation for any of the libraries referenced in your code to understand which elements allow for embedded HTML.",
- "text": ""
- },
- "properties": {
- "tags": [
- "php"
- ],
- "categories": [
- "Security"
- ],
- "exampleCommitFixes": [
- {
- "commitURL": "https://github.com/minkphp/Mink/commit/232919c0c44a2b35d410373c12db404b709ec25c?diff=split#diff-b51e2215d4bd4e189c9360d91a412970L6",
- "lines": [
- {
- "line": " setcookie(\"tc\", $_POST['cookie_value'], null, '/');",
- "lineNumber": 3,
- "lineChange": "none"
- },
- {
- "line": "} elseif (isset($_GET[\"show_value\"])) {",
- "lineNumber": 4,
- "lineChange": "none"
- },
- {
- "line": " echo $_COOKIE[\"tc\"];",
- "lineNumber": 5,
- "lineChange": "removed"
- },
- {
- "line": " echo htmlspecialchars($_COOKIE[\"tc\"], ENT_QUOTES, 'UTF-8');",
- "lineNumber": 5,
- "lineChange": "added"
- },
- {
- "line": " die();",
- "lineNumber": 6,
- "lineChange": "none"
- },
- {
- "line": "}",
- "lineNumber": 7,
- "lineChange": "none"
- }
- ]
- },
- {
- "commitURL": "https://github.com/yunluo/Git/commit/1cb7eddf43f770c055cd685c7f73bb3dac713789?diff=split#diff-34390932035b5d4fd059e5e9a4c629b6L69",
- "lines": [
- {
- "line": " the_content(); ?>",
- "lineNumber": 66,
- "lineChange": "none"
- },
- {
- "line": "
-
-
✅ = translate("Message has been copied to clipboard!", "en") ?>
+
✅ = translate("Message has been copied to clipboard!") ?>