diff options
| author | Maksymilian Jopek <maks@jopek.eu> | 2023-04-13 19:18:31 +0200 |
|---|---|---|
| committer | Maksymilian Jopek <maks@jopek.eu> | 2023-04-13 19:20:25 +0200 |
| commit | c0edb9e2a4a49bae24cbcae4b8e000d6813b3417 (patch) | |
| tree | 0b6de059b1fb2c3f28ff6c56dbadf8edb10d7498 | |
| parent | 911d2fc05833fb2095f3032c34063bfd6da113fa (diff) | |
| download | fia-c0edb9e2a4a49bae24cbcae4b8e000d6813b3417.tar.gz fia-c0edb9e2a4a49bae24cbcae4b8e000d6813b3417.tar.zst fia-c0edb9e2a4a49bae24cbcae4b8e000d6813b3417.zip | |
Secure dbCredentials
Add screenshot
| -rw-r--r-- | README.md | 2 | ||||
| -rw-r--r-- | backend/dbCredentials.php (renamed from public/php/dbCredentials.php) | 2 | ||||
| -rw-r--r-- | public/php/fia.php | 2 | ||||
| -rw-r--r-- | screenshot.png | bin | 0 -> 46473 bytes | |||
| -rwxr-xr-x | start-node | 2 |
5 files changed, 5 insertions, 3 deletions
@@ -15,3 +15,5 @@ To start: - set secure API_KEY in /public/php/dbCredentials.php - run `start-node` in / - and `start-php` in / simultaneously in another terminal + + diff --git a/public/php/dbCredentials.php b/backend/dbCredentials.php index b13e420..209cf79 100644 --- a/public/php/dbCredentials.php +++ b/backend/dbCredentials.php @@ -1,5 +1,5 @@ <?php $apiKey = "secureApiKey123(!*"; $dbUser = "admin"; - $dbPassword = "qwerty123"; + $dbPassword = "qwerty"; $dbName = "ClientApps"; diff --git a/public/php/fia.php b/public/php/fia.php index 94f307f..06caa86 100644 --- a/public/php/fia.php +++ b/public/php/fia.php @@ -3,7 +3,7 @@ error_reporting(E_ALL); ini_set('display_errors', 1); $req = json_decode(file_get_contents("php://input")); -require_once "dbCredentials.php"; +require_once "../../backend/dbCredentials.php"; if ($req->apiKey === $apiKey) { $http = isset($_SERVER["HTTPS"]) ? "https" : "http"; diff --git a/screenshot.png b/screenshot.png Binary files differnew file mode 100644 index 0000000..38c2ed1 --- /dev/null +++ b/screenshot.png @@ -1,7 +1,7 @@ #!/bin/sh export SESSION_KEY="zaq1@WSX" -api_key="$(awk '/api/ { print $3 }' public/php/dbCredentials.php)" +api_key="$(awk '/api/ { print $3 }' backend/dbCredentials.php)" api_key="${api_key#'"'}" api_key="${api_key%'";'}" |
