From 21ed7d0e837d74c1ebd8ada4396f96ce42c14fb1 Mon Sep 17 00:00:00 2001
From: RaindropsSys
Date: Sat, 13 May 2023 19:25:44 +0200
Subject: Updated 14 files and added 6 files (automated)
---
pages/api.inc | 1 +
pages/api/browser.php | 4 +
pages/api/computer.php | 6 +-
pages/api/disconnect.php | 26 +++++++
pages/api/reauthenticate.php | 8 +-
pages/api/rename.php | 17 ++++
pages/api/session.php | 24 ++++++
pages/home.inc | 7 ++
pages/logout.inc | 2 +
pages/pair.inc | 32 +++++++-
pages/sessions.inc | 182 +++++++++++++++++++++++++++++++++++++++++++
11 files changed, 304 insertions(+), 5 deletions(-)
create mode 100644 pages/api/browser.php
create mode 100644 pages/api/disconnect.php
create mode 100644 pages/api/rename.php
create mode 100644 pages/api/session.php
create mode 100644 pages/sessions.inc
(limited to 'pages')
diff --git a/pages/api.inc b/pages/api.inc
index f71ac10..5c13bac 100644
--- a/pages/api.inc
+++ b/pages/api.inc
@@ -12,6 +12,7 @@ if (file_exists($_SERVER['DOCUMENT_ROOT'] . "/pages/api/" . $toplevel . ".php"))
require_once $_SERVER['DOCUMENT_ROOT'] . "/pages/api/" . $toplevel . ".php";
} else {
header("HTTP/1.1 500 Internal Server Error");
+ header("Content-Type: text/plain");
echo("Endpoint not found");
die();
}
\ No newline at end of file
diff --git a/pages/api/browser.php b/pages/api/browser.php
new file mode 100644
index 0000000..657b2a7
--- /dev/null
+++ b/pages/api/browser.php
@@ -0,0 +1,4 @@
+ null,
+ "created" => null,
+ "last_seen" => null,
+ "seen_at" => null
+ ], JSON_PRETTY_PRINT));
+}
+
+$data = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/tokens/" . str_replace("/", "", $_COOKIE['PEH2_SESSION_TOKEN'])), true);
+
+die(json_encode([
+ "name" => $data["name"],
+ "created" => date('c', $data["created"]),
+ "last_seen" => date('c', $data["last"]),
+ "seen_at" => array_keys($data["addresses"])
+], JSON_PRETTY_PRINT));
\ No newline at end of file
diff --git a/pages/home.inc b/pages/home.inc
index 9686f7f..48c26da 100644
--- a/pages/home.inc
+++ b/pages/home.inc
@@ -77,6 +77,7 @@ function members() { global $isLoggedIn; global $isLowerLoggedIn; global $app; ?
+
Notice: The administrators are currently trying a new optimisation technique based on a virtual file system (chvfs). Data loss, corruption or inconsistency may happen and should be reported on bugs.equestria.dev.
-->
+
+
+ You were previously logged in to Cold Haze, however you have been logged out due to inactivity, due to your device being removed, or due to switching to a new authentication system. Please log in again. Learn more.
+
+
+
Pairing allows a connected device that cannot normally use Cold Haze to gather data. This device will get full access to your account as if they were acting on your behalf, so make sure you trust the device and/or application you are using.
+
Equestria.dev may not have verified the application you use, always check for a signature. Enter the pairing code displayed on your device below:
+
+
+ Error: You cannot use the pairing feature because your current session is using the old authentication system. Please log out and log in again to continue.
+
Here are all the currently open sessions for your account. Clicking on a session will delete it, meaning the device using this session will be logged out.
+ Error: You cannot use the session manager because your current session is using the old authentication system. Please log out and log in again to continue.
+
+
+
+
+
+
+
+
+
+
Log out this device?
+
+
+
+
+
You are about to log out the following device from your Cold Haze account:
+
+
+ Name:-
+ Last address:-
+ Last activity:-
+
+
+
This is the device you are currently using, which means you will get logged out as soon as you click on confirm.