Browse Source

Show a warning to users when database is encrypted

spaghetti 1 year ago
parent
commit
23fe809fe6
3 changed files with 25 additions and 3 deletions
  1. 5
    2
      design/privateheader.php
  2. 1
    1
      sections/inbox/conversation.php
  3. 19
    0
      static/styles/global.css

+ 5
- 2
design/privateheader.php View File

@@ -292,7 +292,7 @@ if (check_perms('site_send_unlimited_invites')) {
292 292
 
293 293
   if (G::$LoggedUser['FLTokens'] > 0) { ?>
294 294
           <li id="fl_tokens">
295
-            <a href="wiki.php?action=article&amp;id=7">Tokens</a>:
295
+            <a href="wiki.php?action=article&amp;name=tokens">Tokens</a>:
296 296
             <span class="stat">
297 297
               <a href="userhistory.php?action=token_history&amp;userid=<?=G::$LoggedUser['ID']?>"><?=G::$LoggedUser['FLTokens']?></a>
298 298
             </span>
@@ -300,7 +300,7 @@ if (check_perms('site_send_unlimited_invites')) {
300 300
 <?  }
301 301
 ?>
302 302
           <li id="bonus_points">
303
-            <a href="wiki.php?action=article&amp;id=8"><?=BONUS_POINTS?></a>:
303
+            <a href="wiki.php?action=article&amp;name=bonuspoints"><?=BONUS_POINTS?></a>:
304 304
             <span class="stat">
305 305
               <a href="store.php"><?=number_format(G::$LoggedUser['BonusPoints'])?></a>
306 306
             </span>
@@ -316,6 +316,9 @@ if (check_perms('site_send_unlimited_invites')) {
316 316
 ?>
317 317
         </ul>
318 318
       </div>
319
+<? if (!apcu_exists('DBKEY')) { ?>
320
+      <a id="dbcrypt" class="tooltip" href="wiki.php?action=article&amp;name=databaseencryption" title="Database is not fully decrypted. Site functionality will be reduced until staff can provide the decryption key. Click to learn more."></a>
321
+<? } ?>
319 322
     </div>
320 323
 <?
321 324
 //Start handling alert bars

+ 1
- 1
sections/inbox/conversation.php View File

@@ -83,7 +83,7 @@ $DB->query("
83 83
 <?
84 84
 
85 85
 while (list($SentDate, $SenderID, $Body, $MessageID) = $DB->next_record()) {
86
-  $Body = apcu_exists('DBKEY') ? Crypto::decrypt($Body) : '[Encrypted]';
86
+  $Body = apcu_exists('DBKEY') ? Crypto::decrypt($Body) : '[url=https://'.SITE_DOMAIN.'/wiki.php?action=article&name=databaseencryption][Encrypted][/url]';
87 87
 ?>
88 88
   <div class="box vertical_space">
89 89
     <div class="head" style="overflow: hidden;">

+ 19
- 0
static/styles/global.css View File

@@ -934,3 +934,22 @@ input[type="search"] {
934 934
 form.edit_form[name=screenshots_form] input[type=text], form.edit_form[name=screenshots_form] img {
935 935
   width: 400px;
936 936
 }
937
+
938
+#dbcrypt {
939
+  position: fixed;
940
+  top: 10px;
941
+  right: 10px;
942
+}
943
+#dbcrypt:after {
944
+  content: "!";
945
+  display: block;
946
+  width: 20px;
947
+  height: 20px;
948
+  text-align: center;
949
+  line-height: 20px;
950
+  font-size: 20px;
951
+  font-weight: 600;
952
+  color: black;
953
+  background: red;
954
+  border-radius: 100px;
955
+}

Loading…
Cancel
Save