From 9337aae8b1c87fad34884dacd5cd79d9591c60db Mon Sep 17 00:00:00 2001 From: RaindropsSys Date: Sat, 18 Nov 2023 11:34:36 +0100 Subject: Updated 39 files, added 86 files, deleted 40 files and renamed 2 files (automated) --- includes/backup.inc | 95 +++++ includes/components/2023ui.inc | 13 +- includes/components/explicit.php | 130 ------ includes/components/footer.inc | 40 +- includes/components/fullbanner.inc | 6 +- includes/components/header.inc | 326 +-------------- includes/components/mobilenav.inc | 89 ---- includes/components/navigation.inc | 448 -------------------- includes/components/pane.inc | 132 ------ includes/components/timeline.inc | 2 +- includes/external/pair/reference.js | 2 +- .../external/signal/node_modules/.bin/sdp-verify | 47 +++ includes/external/signal/node_modules/.bin/uuid | 2 + .../external/signal/node_modules/bs58/CHANGELOG.md | 65 +++ includes/external/signal/node_modules/bs58/LICENSE | 21 + .../external/signal/node_modules/bs58/README.md | 91 ++++ .../external/signal/node_modules/bs58/index.d.ts | 5 + .../external/signal/node_modules/bs58/index.js | 4 + .../external/signal/node_modules/bs58/package.json | 39 ++ .../external/signal/node_modules/uuid/CHANGELOG.md | 268 ++++++++++++ .../signal/node_modules/uuid/CONTRIBUTING.md | 18 + .../external/signal/node_modules/uuid/LICENSE.md | 9 + .../external/signal/node_modules/uuid/README.md | 462 +++++++++++++++++++++ .../signal/node_modules/uuid/dist/bin/uuid | 2 + .../uuid/dist/commonjs-browser/index.js | 79 ++++ .../node_modules/uuid/dist/commonjs-browser/md5.js | 223 ++++++++++ .../uuid/dist/commonjs-browser/native.js | 11 + .../node_modules/uuid/dist/commonjs-browser/nil.js | 8 + .../uuid/dist/commonjs-browser/parse.js | 45 ++ .../uuid/dist/commonjs-browser/regex.js | 8 + .../node_modules/uuid/dist/commonjs-browser/rng.js | 25 ++ .../uuid/dist/commonjs-browser/sha1.js | 104 +++++ .../uuid/dist/commonjs-browser/stringify.js | 44 ++ .../node_modules/uuid/dist/commonjs-browser/v1.js | 107 +++++ .../node_modules/uuid/dist/commonjs-browser/v3.js | 16 + .../node_modules/uuid/dist/commonjs-browser/v35.js | 80 ++++ .../node_modules/uuid/dist/commonjs-browser/v4.js | 43 ++ .../node_modules/uuid/dist/commonjs-browser/v5.js | 16 + .../uuid/dist/commonjs-browser/validate.js | 17 + .../uuid/dist/commonjs-browser/version.js | 21 + .../node_modules/uuid/dist/esm-browser/index.js | 9 + .../node_modules/uuid/dist/esm-browser/md5.js | 215 ++++++++++ .../node_modules/uuid/dist/esm-browser/native.js | 4 + .../node_modules/uuid/dist/esm-browser/nil.js | 1 + .../node_modules/uuid/dist/esm-browser/parse.js | 35 ++ .../node_modules/uuid/dist/esm-browser/regex.js | 1 + .../node_modules/uuid/dist/esm-browser/rng.js | 18 + .../node_modules/uuid/dist/esm-browser/sha1.js | 96 +++++ .../uuid/dist/esm-browser/stringify.js | 33 ++ .../node_modules/uuid/dist/esm-browser/v1.js | 95 +++++ .../node_modules/uuid/dist/esm-browser/v3.js | 4 + .../node_modules/uuid/dist/esm-browser/v35.js | 66 +++ .../node_modules/uuid/dist/esm-browser/v4.js | 29 ++ .../node_modules/uuid/dist/esm-browser/v5.js | 4 + .../node_modules/uuid/dist/esm-browser/validate.js | 7 + .../node_modules/uuid/dist/esm-browser/version.js | 11 + .../node_modules/uuid/dist/esm-node/index.js | 9 + .../signal/node_modules/uuid/dist/esm-node/md5.js | 13 + .../node_modules/uuid/dist/esm-node/native.js | 4 + .../signal/node_modules/uuid/dist/esm-node/nil.js | 1 + .../node_modules/uuid/dist/esm-node/parse.js | 35 ++ .../node_modules/uuid/dist/esm-node/regex.js | 1 + .../signal/node_modules/uuid/dist/esm-node/rng.js | 12 + .../signal/node_modules/uuid/dist/esm-node/sha1.js | 13 + .../node_modules/uuid/dist/esm-node/stringify.js | 33 ++ .../signal/node_modules/uuid/dist/esm-node/v1.js | 95 +++++ .../signal/node_modules/uuid/dist/esm-node/v3.js | 4 + .../signal/node_modules/uuid/dist/esm-node/v35.js | 66 +++ .../signal/node_modules/uuid/dist/esm-node/v4.js | 29 ++ .../signal/node_modules/uuid/dist/esm-node/v5.js | 4 + .../node_modules/uuid/dist/esm-node/validate.js | 7 + .../node_modules/uuid/dist/esm-node/version.js | 11 + .../signal/node_modules/uuid/dist/index.js | 79 ++++ .../signal/node_modules/uuid/dist/md5-browser.js | 223 ++++++++++ .../external/signal/node_modules/uuid/dist/md5.js | 23 + .../node_modules/uuid/dist/native-browser.js | 11 + .../signal/node_modules/uuid/dist/native.js | 15 + .../external/signal/node_modules/uuid/dist/nil.js | 8 + .../signal/node_modules/uuid/dist/parse.js | 45 ++ .../signal/node_modules/uuid/dist/regex.js | 8 + .../signal/node_modules/uuid/dist/rng-browser.js | 25 ++ .../external/signal/node_modules/uuid/dist/rng.js | 24 ++ .../signal/node_modules/uuid/dist/sha1-browser.js | 104 +++++ .../external/signal/node_modules/uuid/dist/sha1.js | 23 + .../signal/node_modules/uuid/dist/stringify.js | 44 ++ .../signal/node_modules/uuid/dist/uuid-bin.js | 85 ++++ .../external/signal/node_modules/uuid/dist/v1.js | 107 +++++ .../external/signal/node_modules/uuid/dist/v3.js | 16 + .../external/signal/node_modules/uuid/dist/v35.js | 80 ++++ .../external/signal/node_modules/uuid/dist/v4.js | 43 ++ .../external/signal/node_modules/uuid/dist/v5.js | 16 + .../signal/node_modules/uuid/dist/validate.js | 17 + .../signal/node_modules/uuid/dist/version.js | 21 + .../external/signal/node_modules/uuid/package.json | 131 ++++++ .../external/signal/node_modules/uuid/wrapper.mjs | 10 + includes/fragments/dashboard.inc | 267 ++++++++++++ includes/fragments/member.inc | 2 +- includes/fragments/metadata.inc | 2 +- includes/jobs/FrontersNotification.php | 6 +- ...965201c4ae811520681762e2a5c109396e057f82b2f5273 | 1 - ...f1387371671db63a0e989a7e16819b770cb16e137d08aa5 | 1 - ...2e908d8e89bf664ef046e481eb4ae0fef29d91e192c75ee | 1 - ...fb264fe879e7ca8161b0276691da279d184f29a6d8d86a4 | 1 - ...cc641bf792d9ab5983260b645be9e91ec74b0d1dd430e8a | 1 - ...3e01744ea1193debb6d0f8ac6c60271f51fa9d67ba677c9 | 1 - includes/refresh.php | 45 +- includes/refresh/assets.inc | 86 ---- includes/refresh/backup.inc | 95 ----- includes/refresh/cleanup.inc | 24 -- includes/util/agewarning.inc | 4 +- includes/util/banner.inc | 7 +- includes/util/bitset.inc | 25 -- includes/util/evening.inc | 68 --- includes/util/functions.inc | 102 +++-- includes/util/language.inc | 3 - includes/util/profiles.inc | 97 ----- includes/util/pronouns.inc | 16 - includes/util/rainbow.inc | 1 - includes/util/short.inc | 1 - includes/util/timezones.inc | 148 ------- 120 files changed, 4464 insertions(+), 1827 deletions(-) create mode 100644 includes/backup.inc delete mode 100644 includes/components/explicit.php delete mode 100644 includes/components/mobilenav.inc delete mode 100644 includes/components/navigation.inc delete mode 100644 includes/components/pane.inc create mode 100644 includes/external/signal/node_modules/.bin/sdp-verify create mode 100644 includes/external/signal/node_modules/.bin/uuid create mode 100644 includes/external/signal/node_modules/bs58/CHANGELOG.md create mode 100644 includes/external/signal/node_modules/bs58/LICENSE create mode 100644 includes/external/signal/node_modules/bs58/README.md create mode 100644 includes/external/signal/node_modules/bs58/index.d.ts create mode 100644 includes/external/signal/node_modules/bs58/index.js create mode 100644 includes/external/signal/node_modules/bs58/package.json create mode 100644 includes/external/signal/node_modules/uuid/CHANGELOG.md create mode 100644 includes/external/signal/node_modules/uuid/CONTRIBUTING.md create mode 100644 includes/external/signal/node_modules/uuid/LICENSE.md create mode 100644 includes/external/signal/node_modules/uuid/README.md create mode 100644 includes/external/signal/node_modules/uuid/dist/bin/uuid create mode 100644 includes/external/signal/node_modules/uuid/dist/commonjs-browser/index.js create mode 100644 includes/external/signal/node_modules/uuid/dist/commonjs-browser/md5.js create mode 100644 includes/external/signal/node_modules/uuid/dist/commonjs-browser/native.js create mode 100644 includes/external/signal/node_modules/uuid/dist/commonjs-browser/nil.js create mode 100644 includes/external/signal/node_modules/uuid/dist/commonjs-browser/parse.js create mode 100644 includes/external/signal/node_modules/uuid/dist/commonjs-browser/regex.js create mode 100644 includes/external/signal/node_modules/uuid/dist/commonjs-browser/rng.js create mode 100644 includes/external/signal/node_modules/uuid/dist/commonjs-browser/sha1.js create mode 100644 includes/external/signal/node_modules/uuid/dist/commonjs-browser/stringify.js create mode 100644 includes/external/signal/node_modules/uuid/dist/commonjs-browser/v1.js create mode 100644 includes/external/signal/node_modules/uuid/dist/commonjs-browser/v3.js create mode 100644 includes/external/signal/node_modules/uuid/dist/commonjs-browser/v35.js create mode 100644 includes/external/signal/node_modules/uuid/dist/commonjs-browser/v4.js create mode 100644 includes/external/signal/node_modules/uuid/dist/commonjs-browser/v5.js create mode 100644 includes/external/signal/node_modules/uuid/dist/commonjs-browser/validate.js create mode 100644 includes/external/signal/node_modules/uuid/dist/commonjs-browser/version.js create mode 100644 includes/external/signal/node_modules/uuid/dist/esm-browser/index.js create mode 100644 includes/external/signal/node_modules/uuid/dist/esm-browser/md5.js create mode 100644 includes/external/signal/node_modules/uuid/dist/esm-browser/native.js create mode 100644 includes/external/signal/node_modules/uuid/dist/esm-browser/nil.js create mode 100644 includes/external/signal/node_modules/uuid/dist/esm-browser/parse.js create mode 100644 includes/external/signal/node_modules/uuid/dist/esm-browser/regex.js create mode 100644 includes/external/signal/node_modules/uuid/dist/esm-browser/rng.js create mode 100644 includes/external/signal/node_modules/uuid/dist/esm-browser/sha1.js create mode 100644 includes/external/signal/node_modules/uuid/dist/esm-browser/stringify.js create mode 100644 includes/external/signal/node_modules/uuid/dist/esm-browser/v1.js create mode 100644 includes/external/signal/node_modules/uuid/dist/esm-browser/v3.js create mode 100644 includes/external/signal/node_modules/uuid/dist/esm-browser/v35.js create mode 100644 includes/external/signal/node_modules/uuid/dist/esm-browser/v4.js create mode 100644 includes/external/signal/node_modules/uuid/dist/esm-browser/v5.js create mode 100644 includes/external/signal/node_modules/uuid/dist/esm-browser/validate.js create mode 100644 includes/external/signal/node_modules/uuid/dist/esm-browser/version.js create mode 100644 includes/external/signal/node_modules/uuid/dist/esm-node/index.js create mode 100644 includes/external/signal/node_modules/uuid/dist/esm-node/md5.js create mode 100644 includes/external/signal/node_modules/uuid/dist/esm-node/native.js create mode 100644 includes/external/signal/node_modules/uuid/dist/esm-node/nil.js create mode 100644 includes/external/signal/node_modules/uuid/dist/esm-node/parse.js create mode 100644 includes/external/signal/node_modules/uuid/dist/esm-node/regex.js create mode 100644 includes/external/signal/node_modules/uuid/dist/esm-node/rng.js create mode 100644 includes/external/signal/node_modules/uuid/dist/esm-node/sha1.js create mode 100644 includes/external/signal/node_modules/uuid/dist/esm-node/stringify.js create mode 100644 includes/external/signal/node_modules/uuid/dist/esm-node/v1.js create mode 100644 includes/external/signal/node_modules/uuid/dist/esm-node/v3.js create mode 100644 includes/external/signal/node_modules/uuid/dist/esm-node/v35.js create mode 100644 includes/external/signal/node_modules/uuid/dist/esm-node/v4.js create mode 100644 includes/external/signal/node_modules/uuid/dist/esm-node/v5.js create mode 100644 includes/external/signal/node_modules/uuid/dist/esm-node/validate.js create mode 100644 includes/external/signal/node_modules/uuid/dist/esm-node/version.js create mode 100644 includes/external/signal/node_modules/uuid/dist/index.js create mode 100644 includes/external/signal/node_modules/uuid/dist/md5-browser.js create mode 100644 includes/external/signal/node_modules/uuid/dist/md5.js create mode 100644 includes/external/signal/node_modules/uuid/dist/native-browser.js create mode 100644 includes/external/signal/node_modules/uuid/dist/native.js create mode 100644 includes/external/signal/node_modules/uuid/dist/nil.js create mode 100644 includes/external/signal/node_modules/uuid/dist/parse.js create mode 100644 includes/external/signal/node_modules/uuid/dist/regex.js create mode 100644 includes/external/signal/node_modules/uuid/dist/rng-browser.js create mode 100644 includes/external/signal/node_modules/uuid/dist/rng.js create mode 100644 includes/external/signal/node_modules/uuid/dist/sha1-browser.js create mode 100644 includes/external/signal/node_modules/uuid/dist/sha1.js create mode 100644 includes/external/signal/node_modules/uuid/dist/stringify.js create mode 100644 includes/external/signal/node_modules/uuid/dist/uuid-bin.js create mode 100644 includes/external/signal/node_modules/uuid/dist/v1.js create mode 100644 includes/external/signal/node_modules/uuid/dist/v3.js create mode 100644 includes/external/signal/node_modules/uuid/dist/v35.js create mode 100644 includes/external/signal/node_modules/uuid/dist/v4.js create mode 100644 includes/external/signal/node_modules/uuid/dist/v5.js create mode 100644 includes/external/signal/node_modules/uuid/dist/validate.js create mode 100644 includes/external/signal/node_modules/uuid/dist/version.js create mode 100644 includes/external/signal/node_modules/uuid/package.json create mode 100644 includes/external/signal/node_modules/uuid/wrapper.mjs create mode 100644 includes/fragments/dashboard.inc delete mode 100644 includes/lowertokens/2d418045034cbc5a5965201c4ae811520681762e2a5c109396e057f82b2f5273 delete mode 100644 includes/lowertokens/42cd9b69c7ae246d8f1387371671db63a0e989a7e16819b770cb16e137d08aa5 delete mode 100644 includes/lowertokens/4603277f84413087b2e908d8e89bf664ef046e481eb4ae0fef29d91e192c75ee delete mode 100644 includes/lowertokens/78e12095fc9f96617fb264fe879e7ca8161b0276691da279d184f29a6d8d86a4 delete mode 100644 includes/lowertokens/ee685f047ea684468cc641bf792d9ab5983260b645be9e91ec74b0d1dd430e8a delete mode 100644 includes/lowertokens/fd6817b78ef51afad3e01744ea1193debb6d0f8ac6c60271f51fa9d67ba677c9 delete mode 100644 includes/refresh/assets.inc delete mode 100644 includes/refresh/backup.inc delete mode 100644 includes/refresh/cleanup.inc delete mode 100644 includes/util/bitset.inc delete mode 100644 includes/util/evening.inc delete mode 100644 includes/util/language.inc delete mode 100644 includes/util/profiles.inc delete mode 100644 includes/util/pronouns.inc delete mode 100644 includes/util/timezones.inc (limited to 'includes') diff --git a/includes/backup.inc b/includes/backup.inc new file mode 100644 index 0000000..bed4637 --- /dev/null +++ b/includes/backup.inc @@ -0,0 +1,95 @@ + date('c'), + "files" => [] +]; + +foreach ($root as $file) { + if ($file === "backup.poniesbackup" || $file === "backup.ponieskey" || $file === "encrypted" || str_ends_with($file, ".poniesbackup")) continue; + echo(" /$file\n"); + + if (is_dir("data/$file")) { + foreach (array_filter(scandir("data/$file"), function ($i) { + return !str_starts_with($i, "."); + }) as $dirfile) { + if ($dirfile === "backup.poniesbackup" || $dirfile === "backup.ponieskey" || $dirfile === "encrypted" || str_ends_with($dirfile, ".poniesbackup")) continue; + + echo(" /$dirfile/$file\n"); + $files[] = [ + "dir" => $file, + "file" => $dirfile + ]; + } + } else { + echo(" /$file\n"); + $files[] = [ + "dir" => "", + "file" => $file + ]; + } +} + +echo(" Reading files...\n"); +foreach ($files as $file) { + echo(" /$file[dir]/$file[file]\n"); + $file["mime"] = mime_content_type("data/$file[dir]/$file[file]"); + $file["checksum"] = [ + sha1_file("data/$file[dir]/$file[file]"), + md5_file("data/$file[dir]/$file[file]") + ]; + $file["content"] = base64_encode(file_get_contents("data/$file[dir]/$file[file]")); + + $data["files"][] = $file; +} + +function pkcs7_pad($data, $size) { + $length = $size - strlen($data) % $size; + return $data . str_repeat(chr($length), $length); +} + +if (!file_exists($_SERVER['DOCUMENT_ROOT'] . "/includes/data/backup.ponieskey")) { + echo(" Creating encryption key...\n"); + $key = openssl_random_pseudo_bytes(512); + $iv = openssl_random_pseudo_bytes(16); + file_put_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/backup.ponieskey", base64_encode(json_encode([ + "iv" => bin2hex($iv), + "key" => bin2hex($key) + ]))); +} else { + echo(" Reading encryption key...\n"); + $key_raw = json_decode(base64_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/backup.ponieskey")), true); + $key = hex2bin($key_raw["key"]); + $iv = hex2bin($key_raw["iv"]); +} + +echo(" Encrypting...\n"); +$payload = json_encode($data); +$encrypted = openssl_encrypt(pkcs7_pad($payload, 16), 'AES-256-CBC', $key, OPENSSL_RAW_DATA, $iv); + +echo(" Writing backup...\n"); +file_put_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/backup.poniesbackup", $encrypted); +@mkdir($_SERVER['DOCUMENT_ROOT'] . "/includes/data/encrypted"); + +$id = str_replace(":", "-", date('c')); +copy($_SERVER['DOCUMENT_ROOT'] . "/includes/data/backup.poniesbackup", $_SERVER['DOCUMENT_ROOT'] . "/includes/data/encrypted/" . $id . ".poniesbackup"); + +echo(" Uploading to servers...\n"); + +echo(" zephyrheights... upload\n"); +exec("scp -P 2222 " . $_SERVER['DOCUMENT_ROOT'] . "/includes/data/encrypted/" . $id . ".poniesbackup root@zephyrheights.equestria.dev:/opt/ponies"); + +if (file_exists("/opt/ponies")) { + echo(" bridlewood... copy\n"); + copy($_SERVER['DOCUMENT_ROOT'] . "/includes/data/encrypted/" . $id . ".poniesbackup", "/opt/ponies/" . $id . ".poniesbackup"); + echo(" bridlewood... cleaning up\n"); + exec('bash -c "cd /opt/ponies; ls -tp | grep -v \'/$\' | tail -n +20 | xargs -I {} rm -- {}"'); +} + +echo(" Cleaning up...\n"); +unlink($_SERVER['DOCUMENT_ROOT'] . "/includes/data/encrypted/" . $id . ".poniesbackup"); \ No newline at end of file diff --git a/includes/components/2023ui.inc b/includes/components/2023ui.inc index 8e9dc69..d0792ec 100644 --- a/includes/components/2023ui.inc +++ b/includes/components/2023ui.inc @@ -99,7 +99,7 @@
- Cold Haze + Ponycule
@@ -188,10 +188,10 @@