Browse code

Changed majority of files.

DoubleBastionAdmin authored on 30/11/2024 06:56:40
Showing 1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,33 @@
1
+<?php
2
+/**
3
+ *  Copyright (C) 2021  Double Bastion LLC
4
+ *
5
+ *  This file is part of Roundpin, which is licensed under the
6
+ *  GNU Affero General Public License Version 3.0. The license terms
7
+ *  are detailed in the "LICENSE.txt" file located in the root directory.
8
+ */
9
+
10
+session_start();
11
+ // header('Set-Cookie: PHPSESSID= ' . session_id() . '; SameSite=strict; Secure=true; HttpOnly=true;');
12
+
13
+if (isset($_POST['s_ajax_call']) && ($_POST['s_ajax_call'] == $_SESSION['validate_s_access']) && isset($_POST['recsendsipuser']) && $_POST['recsendsipuser'] != '') {
14
+
15
+    $recsendsipuser = $_POST['recsendsipuser'];
16
+
17
+    if (is_file('../textchat/' . $recsendsipuser . '/rsa_1024_pub.pem')) {
18
+
19
+        $chatKey = file('../textchat/' . $recsendsipuser . '/rsa_1024_pub.pem');
20
+
21
+        if (!empty($chatKey)) { $message = 'success'; } else { $message = 'error'; }
22
+
23
+    } else { $chatKey = ''; $message = 'error'; }
24
+
25
+    $result = ['chatkey' => $chatKey, 'resmessage' => $message];
26
+
27
+    echo json_encode($result);
28
+
29
+} else {
30
+    header("Location: ../login.php");
31
+}
32
+
33
+?>