Only send 200 OK when activation had no internal error v0.5.1
authorChristian Weiske <cweiske@cweiske.de>
Sun, 10 Nov 2024 16:21:00 +0000 (17:21 +0100)
committerChristian Weiske <cweiske@cweiske.de>
Sun, 10 Nov 2024 16:21:00 +0000 (17:21 +0100)
www/activate.php

index d52d2c5334604178a01134cda8dcce49b8bff020..68f34b941e563a33a077ecb522b22580d7e85a9a 100644 (file)
@@ -1,4 +1,6 @@
 <?php
+header('HTTP/1.0 500 Internal Server Error');
+
 $rootDir = dirname(__FILE__, 2);
 $tplDir = $rootDir . '/templates';
 
@@ -18,12 +20,14 @@ if (isset($_REQUEST['code']) && trim($_REQUEST['code']) !== '') {
     }
 
     if ($code === 'success') {
+        header('HTTP/1.0 200 OK');
         require $tplDir . '/activate-success.phtml';
         exit();
     }
 }
 
 if ($gamestick === null) {
+    header('HTTP/1.0 200 OK');
     require $tplDir . '/activate-code.phtml';
     exit();
 }
@@ -69,6 +73,7 @@ if (!in_array($input['avatar'], array_keys($avatars))) {
 }
 
 if (!$input['submit'] || count($errors)) {
+    header('HTTP/1.0 200 OK');
     require $tplDir . '/activate-profile.phtml';
     exit();
 }
@@ -78,4 +83,5 @@ if (!$input['submit'] || count($errors)) {
 unset($input['submit']);
 $user = $user->update($input);
 
+header('HTTP/1.0 200 OK');
 require $tplDir . '/activate-success.phtml';