NobGit
public nobgit read

NobMail

Based on mailcow: dockerized

Languages

Repository composition by tracked source files.

PHP
PHP 49% JavaScript 35% HTML 9% CSS 4% Shell 2% Python 1% Lua 0% Perl 0% Ruby 0% SCSS 0%
Create file Wiki Documentation
Clone
https://nobgit.com/orgs/nobgit/nobmail.git
ssh://[email protected]:2222/orgs/nobgit/nobmail.git

Trace

data/web/inc/ajax/container_ctrl.php

Trace helps you understand code history line by line. See who changed each line, when it changed, and which commit introduced it.

container_ctrl.php on main
Author Date Commit Line Code
andre.peters over 8 years ago adc23d8

Various...

Full commit hash
adc23d86f9b16c77cde48c609c492e4cbaa29335
Author
andre.peters <[email protected]>
Date
over 8 years ago
Selected line
1
<?php
Open commit View diff
1 <?php
FreddleSpl0it over 2 years ago b37caaf

[Web] secure container_ctrl.php

Full commit hash
b37caaf9e51d23fce11981a63d7355ccb2665584
Author
FreddleSpl0it <[email protected]>
Date
over 2 years ago
Selected line
2
Open commit View diff
2
same change b37caaf

[Web] secure container_ctrl.php

Full commit hash
b37caaf9e51d23fce11981a63d7355ccb2665584
Author
FreddleSpl0it <[email protected]>
Date
over 2 years ago
Selected line
3
// Block requests by checking the 'Sec-Fetch-Dest' header.
Open commit View diff
3 // Block requests by checking the 'Sec-Fetch-Dest' header.
same change b37caaf

[Web] secure container_ctrl.php

Full commit hash
b37caaf9e51d23fce11981a63d7355ccb2665584
Author
FreddleSpl0it <[email protected]>
Date
over 2 years ago
Selected line
4
if (isset($_SERVER['HTTP_SEC_FETCH_DEST']) && $_SERVER['HTTP_SEC_FETCH_DEST'] !== 'empty') {
Open commit View diff
4 if (isset($_SERVER['HTTP_SEC_FETCH_DEST']) && $_SERVER['HTTP_SEC_FETCH_DEST'] !== 'empty') {
same change b37caaf

[Web] secure container_ctrl.php

Full commit hash
b37caaf9e51d23fce11981a63d7355ccb2665584
Author
FreddleSpl0it <[email protected]>
Date
over 2 years ago
Selected line
5
  header('HTTP/1.1 403 Forbidden');
Open commit View diff
5 header('HTTP/1.1 403 Forbidden');
same change b37caaf

[Web] secure container_ctrl.php

Full commit hash
b37caaf9e51d23fce11981a63d7355ccb2665584
Author
FreddleSpl0it <[email protected]>
Date
over 2 years ago
Selected line
6
  exit;
Open commit View diff
6 exit;
same change b37caaf

[Web] secure container_ctrl.php

Full commit hash
b37caaf9e51d23fce11981a63d7355ccb2665584
Author
FreddleSpl0it <[email protected]>
Date
over 2 years ago
Selected line
7
}
Open commit View diff
7 }
same change b37caaf

[Web] secure container_ctrl.php

Full commit hash
b37caaf9e51d23fce11981a63d7355ccb2665584
Author
FreddleSpl0it <[email protected]>
Date
over 2 years ago
Selected line
8
Open commit View diff
8
andre.peters over 8 years ago adc23d8

Various...

Full commit hash
adc23d86f9b16c77cde48c609c492e4cbaa29335
Author
andre.peters <[email protected]>
Date
over 8 years ago
Selected line
9
require_once $_SERVER['DOCUMENT_ROOT'] . '/inc/prerequisites.inc.php';
Open commit View diff
9 require_once $_SERVER['DOCUMENT_ROOT'] . '/inc/prerequisites.inc.php';
same change adc23d8

Various...

Full commit hash
adc23d86f9b16c77cde48c609c492e4cbaa29335
Author
andre.peters <[email protected]>
Date
over 8 years ago
Selected line
10
if (!isset($_SESSION['mailcow_cc_role']) || $_SESSION['mailcow_cc_role'] != 'admin') {
Open commit View diff
10 if (!isset($_SESSION['mailcow_cc_role']) || $_SESSION['mailcow_cc_role'] != 'admin') {
same change adc23d8

Various...

Full commit hash
adc23d86f9b16c77cde48c609c492e4cbaa29335
Author
andre.peters <[email protected]>
Date
over 8 years ago
Selected line
11
	exit();
Open commit View diff
11 exit();
same change adc23d8

Various...

Full commit hash
adc23d86f9b16c77cde48c609c492e4cbaa29335
Author
andre.peters <[email protected]>
Date
over 8 years ago
Selected line
12
}
Open commit View diff
12 }
same change adc23d8

Various...

Full commit hash
adc23d86f9b16c77cde48c609c492e4cbaa29335
Author
andre.peters <[email protected]>
Date
over 8 years ago
Selected line
13
Open commit View diff
13
same change adc23d8

Various...

Full commit hash
adc23d86f9b16c77cde48c609c492e4cbaa29335
Author
andre.peters <[email protected]>
Date
over 8 years ago
Selected line
14
if (preg_match('/^[a-z\-]{0,}-mailcow/', $_GET['service'])) {
Open commit View diff
14 if (preg_match('/^[a-z\-]{0,}-mailcow/', $_GET['service'])) {
same change adc23d8

Various...

Full commit hash
adc23d86f9b16c77cde48c609c492e4cbaa29335
Author
andre.peters <[email protected]>
Date
over 8 years ago
Selected line
15
  if ($_GET['action'] == "start") {
Open commit View diff
15 if ($_GET['action'] == "start") {
same change adc23d8

Various...

Full commit hash
adc23d86f9b16c77cde48c609c492e4cbaa29335
Author
andre.peters <[email protected]>
Date
over 8 years ago
Selected line
16
    header('Content-Type: text/html; charset=utf-8');
Open commit View diff
16 header('Content-Type: text/html; charset=utf-8');
same change adc23d8

Various...

Full commit hash
adc23d86f9b16c77cde48c609c492e4cbaa29335
Author
andre.peters <[email protected]>
Date
over 8 years ago
Selected line
17
    $retry = 0;
Open commit View diff
17 $retry = 0;
André almost 8 years ago 8934a3a

[Web] Allow spam/ham "traps"

Full commit hash
8934a3a68b4f9d8bf2ecff8e25a3324fbb54944c
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
18
    while (docker('info', $_GET['service'])['State']['Running'] != 1 && $retry <= 3) {
Open commit View diff
18 while (docker('info', $_GET['service'])['State']['Running'] != 1 && $retry <= 3) {
same change 8934a3a

[Web] Allow spam/ham "traps"

Full commit hash
8934a3a68b4f9d8bf2ecff8e25a3324fbb54944c
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
19
      $response = docker('post', $_GET['service'], 'start');
Open commit View diff
19 $response = docker('post', $_GET['service'], 'start');
andre.peters over 8 years ago adc23d8

Various...

Full commit hash
adc23d86f9b16c77cde48c609c492e4cbaa29335
Author
andre.peters <[email protected]>
Date
over 8 years ago
Selected line
20
      $response = json_decode($response, true);
Open commit View diff
20 $response = json_decode($response, true);
same change adc23d8

Various...

Full commit hash
adc23d86f9b16c77cde48c609c492e4cbaa29335
Author
andre.peters <[email protected]>
Date
over 8 years ago
Selected line
21
      $last_response = ($response['type'] == "success") ? '<b><span class="pull-right text-success">OK</span></b>' : '<b><span class="pull-right text-danger">Error: ' . $response['msg'] . '</span></b>';
Open commit View diff
21 $last_response = ($response['type'] == "success") ? '<b><span class="pull-right text-success">OK</span></b>' : '<b><span class="pull-right text-danger">Error: ' . $response['msg'] . '</span></b>';
same change adc23d8

Various...

Full commit hash
adc23d86f9b16c77cde48c609c492e4cbaa29335
Author
andre.peters <[email protected]>
Date
over 8 years ago
Selected line
22
      if ($response['type'] == "success") {
Open commit View diff
22 if ($response['type'] == "success") {
same change adc23d8

Various...

Full commit hash
adc23d86f9b16c77cde48c609c492e4cbaa29335
Author
andre.peters <[email protected]>
Date
over 8 years ago
Selected line
23
        break;
Open commit View diff
23 break;
same change adc23d8

Various...

Full commit hash
adc23d86f9b16c77cde48c609c492e4cbaa29335
Author
andre.peters <[email protected]>
Date
over 8 years ago
Selected line
24
      }
Open commit View diff
24 }
same change adc23d8

Various...

Full commit hash
adc23d86f9b16c77cde48c609c492e4cbaa29335
Author
andre.peters <[email protected]>
Date
over 8 years ago
Selected line
25
      usleep(1500000);
Open commit View diff
25 usleep(1500000);
same change adc23d8

Various...

Full commit hash
adc23d86f9b16c77cde48c609c492e4cbaa29335
Author
andre.peters <[email protected]>
Date
over 8 years ago
Selected line
26
      $retry++;
Open commit View diff
26 $retry++;
same change adc23d8

Various...

Full commit hash
adc23d86f9b16c77cde48c609c492e4cbaa29335
Author
andre.peters <[email protected]>
Date
over 8 years ago
Selected line
27
    }
Open commit View diff
27 }
same change adc23d8

Various...

Full commit hash
adc23d86f9b16c77cde48c609c492e4cbaa29335
Author
andre.peters <[email protected]>
Date
over 8 years ago
Selected line
28
    echo (!isset($last_response)) ? '<b><span class="pull-right text-warning">Already running</span></b>' : $last_response;
Open commit View diff
28 echo (!isset($last_response)) ? '<b><span class="pull-right text-warning">Already running</span></b>' : $last_response;
same change adc23d8

Various...

Full commit hash
adc23d86f9b16c77cde48c609c492e4cbaa29335
Author
andre.peters <[email protected]>
Date
over 8 years ago
Selected line
29
  }
Open commit View diff
29 }
same change adc23d8

Various...

Full commit hash
adc23d86f9b16c77cde48c609c492e4cbaa29335
Author
andre.peters <[email protected]>
Date
over 8 years ago
Selected line
30
  if ($_GET['action'] == "stop") {
Open commit View diff
30 if ($_GET['action'] == "stop") {
same change adc23d8

Various...

Full commit hash
adc23d86f9b16c77cde48c609c492e4cbaa29335
Author
andre.peters <[email protected]>
Date
over 8 years ago
Selected line
31
    header('Content-Type: text/html; charset=utf-8');
Open commit View diff
31 header('Content-Type: text/html; charset=utf-8');
same change adc23d8

Various...

Full commit hash
adc23d86f9b16c77cde48c609c492e4cbaa29335
Author
andre.peters <[email protected]>
Date
over 8 years ago
Selected line
32
    $retry = 0;
Open commit View diff
32 $retry = 0;
André almost 8 years ago 8934a3a

[Web] Allow spam/ham "traps"

Full commit hash
8934a3a68b4f9d8bf2ecff8e25a3324fbb54944c
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
33
    while (docker('info', $_GET['service'])['State']['Running'] == 1 && $retry <= 3) {
Open commit View diff
33 while (docker('info', $_GET['service'])['State']['Running'] == 1 && $retry <= 3) {
same change 8934a3a

[Web] Allow spam/ham "traps"

Full commit hash
8934a3a68b4f9d8bf2ecff8e25a3324fbb54944c
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
34
      $response = docker('post', $_GET['service'], 'stop');
Open commit View diff
34 $response = docker('post', $_GET['service'], 'stop');
andre.peters over 8 years ago adc23d8

Various...

Full commit hash
adc23d86f9b16c77cde48c609c492e4cbaa29335
Author
andre.peters <[email protected]>
Date
over 8 years ago
Selected line
35
      $response = json_decode($response, true);
Open commit View diff
35 $response = json_decode($response, true);
same change adc23d8

Various...

Full commit hash
adc23d86f9b16c77cde48c609c492e4cbaa29335
Author
andre.peters <[email protected]>
Date
over 8 years ago
Selected line
36
      $last_response = ($response['type'] == "success") ? '<b><span class="pull-right text-success">OK</span></b>' : '<b><span class="pull-right text-danger">Error: ' . $response['msg'] . '</span></b>';
Open commit View diff
36 $last_response = ($response['type'] == "success") ? '<b><span class="pull-right text-success">OK</span></b>' : '<b><span class="pull-right text-danger">Error: ' . $response['msg'] . '</span></b>';
same change adc23d8

Various...

Full commit hash
adc23d86f9b16c77cde48c609c492e4cbaa29335
Author
andre.peters <[email protected]>
Date
over 8 years ago
Selected line
37
      if ($response['type'] == "success") {
Open commit View diff
37 if ($response['type'] == "success") {
same change adc23d8

Various...

Full commit hash
adc23d86f9b16c77cde48c609c492e4cbaa29335
Author
andre.peters <[email protected]>
Date
over 8 years ago
Selected line
38
        break;
Open commit View diff
38 break;
same change adc23d8

Various...

Full commit hash
adc23d86f9b16c77cde48c609c492e4cbaa29335
Author
andre.peters <[email protected]>
Date
over 8 years ago
Selected line
39
      }
Open commit View diff
39 }
same change adc23d8

Various...

Full commit hash
adc23d86f9b16c77cde48c609c492e4cbaa29335
Author
andre.peters <[email protected]>
Date
over 8 years ago
Selected line
40
      usleep(1500000);
Open commit View diff
40 usleep(1500000);
same change adc23d8

Various...

Full commit hash
adc23d86f9b16c77cde48c609c492e4cbaa29335
Author
andre.peters <[email protected]>
Date
over 8 years ago
Selected line
41
      $retry++;
Open commit View diff
41 $retry++;
same change adc23d8

Various...

Full commit hash
adc23d86f9b16c77cde48c609c492e4cbaa29335
Author
andre.peters <[email protected]>
Date
over 8 years ago
Selected line
42
    }
Open commit View diff
42 }
same change adc23d8

Various...

Full commit hash
adc23d86f9b16c77cde48c609c492e4cbaa29335
Author
andre.peters <[email protected]>
Date
over 8 years ago
Selected line
43
    echo (!isset($last_response)) ? '<b><span class="pull-right text-warning">Not running</span></b>' : $last_response;
Open commit View diff
43 echo (!isset($last_response)) ? '<b><span class="pull-right text-warning">Not running</span></b>' : $last_response;
same change adc23d8

Various...

Full commit hash
adc23d86f9b16c77cde48c609c492e4cbaa29335
Author
andre.peters <[email protected]>
Date
over 8 years ago
Selected line
44
  }
Open commit View diff
44 }
same change adc23d8

Various...

Full commit hash
adc23d86f9b16c77cde48c609c492e4cbaa29335
Author
andre.peters <[email protected]>
Date
over 8 years ago
Selected line
45
  if ($_GET['action'] == "restart") {
Open commit View diff
45 if ($_GET['action'] == "restart") {
same change adc23d8

Various...

Full commit hash
adc23d86f9b16c77cde48c609c492e4cbaa29335
Author
andre.peters <[email protected]>
Date
over 8 years ago
Selected line
46
    header('Content-Type: text/html; charset=utf-8');
Open commit View diff
46 header('Content-Type: text/html; charset=utf-8');
André almost 8 years ago 8934a3a

[Web] Allow spam/ham "traps"

Full commit hash
8934a3a68b4f9d8bf2ecff8e25a3324fbb54944c
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
47
    $response = docker('post', $_GET['service'], 'restart');
Open commit View diff
47 $response = docker('post', $_GET['service'], 'restart');
andre.peters over 8 years ago adc23d8

Various...

Full commit hash
adc23d86f9b16c77cde48c609c492e4cbaa29335
Author
andre.peters <[email protected]>
Date
over 8 years ago
Selected line
48
    $response = json_decode($response, true);
Open commit View diff
48 $response = json_decode($response, true);
same change adc23d8

Various...

Full commit hash
adc23d86f9b16c77cde48c609c492e4cbaa29335
Author
andre.peters <[email protected]>
Date
over 8 years ago
Selected line
49
    $last_response = ($response['type'] == "success") ? '<b><span class="pull-right text-success">OK</span></b>' : '<b><span class="pull-right text-danger">Error: ' . $response['msg'] . '</span></b>';
Open commit View diff
49 $last_response = ($response['type'] == "success") ? '<b><span class="pull-right text-success">OK</span></b>' : '<b><span class="pull-right text-danger">Error: ' . $response['msg'] . '</span></b>';
same change adc23d8

Various...

Full commit hash
adc23d86f9b16c77cde48c609c492e4cbaa29335
Author
andre.peters <[email protected]>
Date
over 8 years ago
Selected line
50
    echo (!isset($last_response)) ? '<b><span class="pull-right text-warning">Cannot restart container</span></b>' : $last_response;
Open commit View diff
50 echo (!isset($last_response)) ? '<b><span class="pull-right text-warning">Cannot restart container</span></b>' : $last_response;
same change adc23d8

Various...

Full commit hash
adc23d86f9b16c77cde48c609c492e4cbaa29335
Author
andre.peters <[email protected]>
Date
over 8 years ago
Selected line
51
  }
Open commit View diff
51 }
same change adc23d8

Various...

Full commit hash
adc23d86f9b16c77cde48c609c492e4cbaa29335
Author
andre.peters <[email protected]>
Date
over 8 years ago
Selected line
52
  if ($_GET['action'] == "logs") {
Open commit View diff
52 if ($_GET['action'] == "logs") {
same change adc23d8

Various...

Full commit hash
adc23d86f9b16c77cde48c609c492e4cbaa29335
Author
andre.peters <[email protected]>
Date
over 8 years ago
Selected line
53
    $lines = (empty($_GET['lines']) || !is_numeric($_GET['lines'])) ? 1000 : $_GET['lines'];
Open commit View diff
53 $lines = (empty($_GET['lines']) || !is_numeric($_GET['lines'])) ? 1000 : $_GET['lines'];
same change adc23d8

Various...

Full commit hash
adc23d86f9b16c77cde48c609c492e4cbaa29335
Author
andre.peters <[email protected]>
Date
over 8 years ago
Selected line
54
    header('Content-Type: text/plain; charset=utf-8');
Open commit View diff
54 header('Content-Type: text/plain; charset=utf-8');
André almost 8 years ago 8934a3a

[Web] Allow spam/ham "traps"

Full commit hash
8934a3a68b4f9d8bf2ecff8e25a3324fbb54944c
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
55
    print_r(preg_split('/\n/', docker('logs', $_GET['service'], $lines)));
Open commit View diff
55 print_r(preg_split('/\n/', docker('logs', $_GET['service'], $lines)));
andre.peters over 8 years ago adc23d8

Various...

Full commit hash
adc23d86f9b16c77cde48c609c492e4cbaa29335
Author
andre.peters <[email protected]>
Date
over 8 years ago
Selected line
56
  }
Open commit View diff
56 }
same change adc23d8

Various...

Full commit hash
adc23d86f9b16c77cde48c609c492e4cbaa29335
Author
andre.peters <[email protected]>
Date
over 8 years ago
Selected line
57
}
Open commit View diff
57 }
same change adc23d8

Various...

Full commit hash
adc23d86f9b16c77cde48c609c492e4cbaa29335
Author
andre.peters <[email protected]>
Date
over 8 years ago
Selected line
58
Open commit View diff
58
same change adc23d8

Various...

Full commit hash
adc23d86f9b16c77cde48c609c492e4cbaa29335
Author
andre.peters <[email protected]>
Date
over 8 years ago
Selected line
59
?>
Open commit View diff
59 ?>