Passed
Push — master ( 16e6d7...bfa795 )
by Elia
01:15
created
user/logout/index.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -4,5 +4,5 @@
 block discarded – undo
4 4
 include_once '../../_config/core.php';
5 5
 
6 6
 
7
-setcookie("token", false, time()-1000, "/", "localhost", 0, 1);
7
+setcookie("token", false, time() - 1000, "/", "localhost", 0, 1);
8 8
 returnSuccess($jwt);
Please login to merge, or discard this patch.
_config/headers.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@
 block discarded – undo
1 1
 <?php
2 2
 
3 3
 $http_origin = $_SERVER['HTTP_ORIGIN'];
4
-if ($http_origin == "http://localhost:8080" || $http_origin == "https://minska.eliareutlinger.ch"){
4
+if ($http_origin == "http://localhost:8080" || $http_origin == "https://minska.eliareutlinger.ch") {
5 5
     header("Access-Control-Allow-Origin: $http_origin");
6 6
 }
7 7
 
Please login to merge, or discard this patch.
_config/core.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@
 block discarded – undo
19 19
 
20 20
         list($type, $data) = explode(" ", getallheaders()['Authorization'], 2);
21 21
         if (strcasecmp($type, "Bearer") == 0) {
22
-            if($_COOKIE["appToken"] === $data){
22
+            if ($_COOKIE["appToken"] === $data) {
23 23
                 return $_COOKIE["appToken"];
24 24
             }
25 25
         }
Please login to merge, or discard this patch.
user/login/index.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -49,12 +49,12 @@
 block discarded – undo
49 49
 
50 50
         $secure = "";
51 51
         $expire = $token_conf['expireAt'];
52
-        if(isset($_SERVER['https'])){
52
+        if (isset($_SERVER['https'])) {
53 53
             $secure = "Secure";
54 54
         }
55 55
 
56
-        header ("Set-Cookie: secureToken=$jwt; expires=$expire; path=/; samesite=strict; httpOnly; $secure");
57
-        header ("Set-Cookie: appToken=$jwt; expires=$expire; path=/; samesite=strict; $secure");
56
+        header("Set-Cookie: secureToken=$jwt; expires=$expire; path=/; samesite=strict; httpOnly; $secure");
57
+        header("Set-Cookie: appToken=$jwt; expires=$expire; path=/; samesite=strict; $secure");
58 58
 
59 59
         returnSuccess();
60 60
 
Please login to merge, or discard this patch.