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/functions.admin.inc.php

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

functions.admin.inc.php on main
Author Date Commit Line Code
André almost 8 years ago 9f0be1d

[Web] Fix require_once to always include document root

Full commit hash
9f0be1d8a84b3077e23ec96921b1bea5815adb0a
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
1
<?php
Open commit View diff
1 <?php
same change 9f0be1d

[Web] Fix require_once to always include document root

Full commit hash
9f0be1d8a84b3077e23ec96921b1bea5815adb0a
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
2
function admin($_action, $_data = null) {
Open commit View diff
2 function admin($_action, $_data = null) {
same change 9f0be1d

[Web] Fix require_once to always include document root

Full commit hash
9f0be1d8a84b3077e23ec96921b1bea5815adb0a
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
3
  if ($_SESSION['mailcow_cc_role'] != "admin") {
Open commit View diff
3 if ($_SESSION['mailcow_cc_role'] != "admin") {
same change 9f0be1d

[Web] Fix require_once to always include document root

Full commit hash
9f0be1d8a84b3077e23ec96921b1bea5815adb0a
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
4
    $_SESSION['return'][] = array(
Open commit View diff
4 $_SESSION['return'][] = array(
same change 9f0be1d

[Web] Fix require_once to always include document root

Full commit hash
9f0be1d8a84b3077e23ec96921b1bea5815adb0a
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
5
      'type' => 'danger',
Open commit View diff
5 'type' => 'danger',
same change 9f0be1d

[Web] Fix require_once to always include document root

Full commit hash
9f0be1d8a84b3077e23ec96921b1bea5815adb0a
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
6
      'log' => array(__FUNCTION__, $_action, $_data_log),
Open commit View diff
6 'log' => array(__FUNCTION__, $_action, $_data_log),
same change 9f0be1d

[Web] Fix require_once to always include document root

Full commit hash
9f0be1d8a84b3077e23ec96921b1bea5815adb0a
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
7
      'msg' => 'access_denied'
Open commit View diff
7 'msg' => 'access_denied'
same change 9f0be1d

[Web] Fix require_once to always include document root

Full commit hash
9f0be1d8a84b3077e23ec96921b1bea5815adb0a
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
8
    );
Open commit View diff
8 );
same change 9f0be1d

[Web] Fix require_once to always include document root

Full commit hash
9f0be1d8a84b3077e23ec96921b1bea5815adb0a
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
9
    return false;
Open commit View diff
9 return false;
same change 9f0be1d

[Web] Fix require_once to always include document root

Full commit hash
9f0be1d8a84b3077e23ec96921b1bea5815adb0a
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
10
  }
Open commit View diff
10 }
same change 9f0be1d

[Web] Fix require_once to always include document root

Full commit hash
9f0be1d8a84b3077e23ec96921b1bea5815adb0a
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
11
  global $pdo;
Open commit View diff
11 global $pdo;
same change 9f0be1d

[Web] Fix require_once to always include document root

Full commit hash
9f0be1d8a84b3077e23ec96921b1bea5815adb0a
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
12
  global $lang;
Open commit View diff
12 global $lang;
same change 9f0be1d

[Web] Fix require_once to always include document root

Full commit hash
9f0be1d8a84b3077e23ec96921b1bea5815adb0a
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
13
  $_data_log = $_data;
Open commit View diff
13 $_data_log = $_data;
same change 9f0be1d

[Web] Fix require_once to always include document root

Full commit hash
9f0be1d8a84b3077e23ec96921b1bea5815adb0a
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
14
  !isset($_data_log['password']) ?: $_data_log['password'] = '*';
Open commit View diff
14 !isset($_data_log['password']) ?: $_data_log['password'] = '*';
same change 9f0be1d

[Web] Fix require_once to always include document root

Full commit hash
9f0be1d8a84b3077e23ec96921b1bea5815adb0a
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
15
  !isset($_data_log['password2']) ?: $_data_log['password2'] = '*';
Open commit View diff
15 !isset($_data_log['password2']) ?: $_data_log['password2'] = '*';
same change 9f0be1d

[Web] Fix require_once to always include document root

Full commit hash
9f0be1d8a84b3077e23ec96921b1bea5815adb0a
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
16
  switch ($_action) {
Open commit View diff
16 switch ($_action) {
same change 9f0be1d

[Web] Fix require_once to always include document root

Full commit hash
9f0be1d8a84b3077e23ec96921b1bea5815adb0a
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
17
    case 'add':
Open commit View diff
17 case 'add':
andryyy almost 5 years ago 4d5ebaf

[Web] Fix password issue on first login when adding new admin

Full commit hash
4d5ebafc1a3572d3abdfb73753b6444b4152ae5a
Author
andryyy <[email protected]>
Date
almost 5 years ago
Selected line
18
      $username   = strtolower(trim($_data['username']));
Open commit View diff
18 $username = strtolower(trim($_data['username']));
same change 4d5ebaf

[Web] Fix password issue on first login when adding new admin

Full commit hash
4d5ebafc1a3572d3abdfb73753b6444b4152ae5a
Author
andryyy <[email protected]>
Date
almost 5 years ago
Selected line
19
      $password   = $_data['password'];
Open commit View diff
19 $password = $_data['password'];
André almost 8 years ago 9f0be1d

[Web] Fix require_once to always include document root

Full commit hash
9f0be1d8a84b3077e23ec96921b1bea5815adb0a
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
20
      $password2  = $_data['password2'];
Open commit View diff
20 $password2 = $_data['password2'];
same change 9f0be1d

[Web] Fix require_once to always include document root

Full commit hash
9f0be1d8a84b3077e23ec96921b1bea5815adb0a
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
21
      $active     = intval($_data['active']);
Open commit View diff
21 $active = intval($_data['active']);
andryyy almost 7 years ago d03e90d

[Web] Disable API as username

Full commit hash
d03e90d3c006bde29d30e1a4b2b8e5d38939f669
Author
andryyy <[email protected]>
Date
almost 7 years ago
Selected line
22
      if (!ctype_alnum(str_replace(array('_', '.', '-'), '', $username)) || empty ($username) || $username == 'API') {
Open commit View diff
22 if (!ctype_alnum(str_replace(array('_', '.', '-'), '', $username)) || empty ($username) || $username == 'API') {
André almost 8 years ago 9f0be1d

[Web] Fix require_once to always include document root

Full commit hash
9f0be1d8a84b3077e23ec96921b1bea5815adb0a
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
23
        $_SESSION['return'][] = array(
Open commit View diff
23 $_SESSION['return'][] = array(
same change 9f0be1d

[Web] Fix require_once to always include document root

Full commit hash
9f0be1d8a84b3077e23ec96921b1bea5815adb0a
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
24
          'type' => 'danger',
Open commit View diff
24 'type' => 'danger',
same change 9f0be1d

[Web] Fix require_once to always include document root

Full commit hash
9f0be1d8a84b3077e23ec96921b1bea5815adb0a
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
25
          'log' => array(__FUNCTION__, $_action, $_data_log),
Open commit View diff
25 'log' => array(__FUNCTION__, $_action, $_data_log),
Max over 6 years ago 852392f

Fix missing username in username_invalid message (#3135)

Full commit hash
852392fd150819f1e99f364fa47c82e3012b1710
Author
Max <[email protected]>
Date
over 6 years ago
Selected line
26
          'msg' => array('username_invalid', $username)
Open commit View diff
26 'msg' => array('username_invalid', $username)
André almost 8 years ago 9f0be1d

[Web] Fix require_once to always include document root

Full commit hash
9f0be1d8a84b3077e23ec96921b1bea5815adb0a
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
27
        );
Open commit View diff
27 );
same change 9f0be1d

[Web] Fix require_once to always include document root

Full commit hash
9f0be1d8a84b3077e23ec96921b1bea5815adb0a
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
28
        return false;
Open commit View diff
28 return false;
same change 9f0be1d

[Web] Fix require_once to always include document root

Full commit hash
9f0be1d8a84b3077e23ec96921b1bea5815adb0a
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
29
      }
Open commit View diff
29 }
same change 9f0be1d

[Web] Fix require_once to always include document root

Full commit hash
9f0be1d8a84b3077e23ec96921b1bea5815adb0a
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
30
Open commit View diff
30
same change 9f0be1d

[Web] Fix require_once to always include document root

Full commit hash
9f0be1d8a84b3077e23ec96921b1bea5815adb0a
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
31
      $stmt = $pdo->prepare("SELECT `username` FROM `admin`
Open commit View diff
31 $stmt = $pdo->prepare("SELECT `username` FROM `admin`
same change 9f0be1d

[Web] Fix require_once to always include document root

Full commit hash
9f0be1d8a84b3077e23ec96921b1bea5815adb0a
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
32
        WHERE `username` = :username");
Open commit View diff
32 WHERE `username` = :username");
same change 9f0be1d

[Web] Fix require_once to always include document root

Full commit hash
9f0be1d8a84b3077e23ec96921b1bea5815adb0a
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
33
      $stmt->execute(array(':username' => $username));
Open commit View diff
33 $stmt->execute(array(':username' => $username));
same change 9f0be1d

[Web] Fix require_once to always include document root

Full commit hash
9f0be1d8a84b3077e23ec96921b1bea5815adb0a
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
34
      $num_results[] = count($stmt->fetchAll(PDO::FETCH_ASSOC));
Open commit View diff
34 $num_results[] = count($stmt->fetchAll(PDO::FETCH_ASSOC));
same change 9f0be1d

[Web] Fix require_once to always include document root

Full commit hash
9f0be1d8a84b3077e23ec96921b1bea5815adb0a
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
35
Open commit View diff
35
same change 9f0be1d

[Web] Fix require_once to always include document root

Full commit hash
9f0be1d8a84b3077e23ec96921b1bea5815adb0a
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
36
      $stmt = $pdo->prepare("SELECT `username` FROM `domain_admins`
Open commit View diff
36 $stmt = $pdo->prepare("SELECT `username` FROM `domain_admins`
same change 9f0be1d

[Web] Fix require_once to always include document root

Full commit hash
9f0be1d8a84b3077e23ec96921b1bea5815adb0a
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
37
        WHERE `username` = :username");
Open commit View diff
37 WHERE `username` = :username");
same change 9f0be1d

[Web] Fix require_once to always include document root

Full commit hash
9f0be1d8a84b3077e23ec96921b1bea5815adb0a
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
38
      $stmt->execute(array(':username' => $username));
Open commit View diff
38 $stmt->execute(array(':username' => $username));
same change 9f0be1d

[Web] Fix require_once to always include document root

Full commit hash
9f0be1d8a84b3077e23ec96921b1bea5815adb0a
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
39
      $num_results[] = count($stmt->fetchAll(PDO::FETCH_ASSOC));
Open commit View diff
39 $num_results[] = count($stmt->fetchAll(PDO::FETCH_ASSOC));
same change 9f0be1d

[Web] Fix require_once to always include document root

Full commit hash
9f0be1d8a84b3077e23ec96921b1bea5815adb0a
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
40
Open commit View diff
40
same change 9f0be1d

[Web] Fix require_once to always include document root

Full commit hash
9f0be1d8a84b3077e23ec96921b1bea5815adb0a
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
41
      foreach ($num_results as $num_results_each) {
Open commit View diff
41 foreach ($num_results as $num_results_each) {
same change 9f0be1d

[Web] Fix require_once to always include document root

Full commit hash
9f0be1d8a84b3077e23ec96921b1bea5815adb0a
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
42
        if ($num_results_each != 0) {
Open commit View diff
42 if ($num_results_each != 0) {
same change 9f0be1d

[Web] Fix require_once to always include document root

Full commit hash
9f0be1d8a84b3077e23ec96921b1bea5815adb0a
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
43
          $_SESSION['return'][] = array(
Open commit View diff
43 $_SESSION['return'][] = array(
same change 9f0be1d

[Web] Fix require_once to always include document root

Full commit hash
9f0be1d8a84b3077e23ec96921b1bea5815adb0a
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
44
            'type' => 'danger',
Open commit View diff
44 'type' => 'danger',
same change 9f0be1d

[Web] Fix require_once to always include document root

Full commit hash
9f0be1d8a84b3077e23ec96921b1bea5815adb0a
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
45
            'log' => array(__FUNCTION__, $_action, $_data_log),
Open commit View diff
45 'log' => array(__FUNCTION__, $_action, $_data_log),
same change 9f0be1d

[Web] Fix require_once to always include document root

Full commit hash
9f0be1d8a84b3077e23ec96921b1bea5815adb0a
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
46
            'msg' => array('object_exists', htmlspecialchars($username))
Open commit View diff
46 'msg' => array('object_exists', htmlspecialchars($username))
same change 9f0be1d

[Web] Fix require_once to always include document root

Full commit hash
9f0be1d8a84b3077e23ec96921b1bea5815adb0a
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
47
          );
Open commit View diff
47 );
same change 9f0be1d

[Web] Fix require_once to always include document root

Full commit hash
9f0be1d8a84b3077e23ec96921b1bea5815adb0a
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
48
          return false;
Open commit View diff
48 return false;
same change 9f0be1d

[Web] Fix require_once to always include document root

Full commit hash
9f0be1d8a84b3077e23ec96921b1bea5815adb0a
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
49
        }
Open commit View diff
49 }
same change 9f0be1d

[Web] Fix require_once to always include document root

Full commit hash
9f0be1d8a84b3077e23ec96921b1bea5815adb0a
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
50
      }
Open commit View diff
50 }
Loïc Beurlet over 5 years ago 995f135

[Web] Fix password check typo from 19843cc (#4056)

Full commit hash
995f135ff12b699f50a1658f870a2fd9c7a36847
Author
Loïc Beurlet <[email protected]>
Date
over 5 years ago
Selected line
51
      if (password_check($password, $password2) !== true) {
Open commit View diff
51 if (password_check($password, $password2) !== true) {
andryyy over 5 years ago 5ea649b

[Web] Feature: Add password policy

Full commit hash
5ea649b292a54fd6e0188a5e90abce7981f4bd88
Author
andryyy <[email protected]>
Date
over 5 years ago
Selected line
52
        return false;
Open commit View diff
52 return false;
same change 5ea649b

[Web] Feature: Add password policy

Full commit hash
5ea649b292a54fd6e0188a5e90abce7981f4bd88
Author
andryyy <[email protected]>
Date
over 5 years ago
Selected line
53
      }
Open commit View diff
53 }
andryyy almost 5 years ago 4d5ebaf

[Web] Fix password issue on first login when adding new admin

Full commit hash
4d5ebafc1a3572d3abdfb73753b6444b4152ae5a
Author
andryyy <[email protected]>
Date
almost 5 years ago
Selected line
54
      $password_hashed = hash_password($password);
Open commit View diff
54 $password_hashed = hash_password($password);
andryyy over 5 years ago 5ea649b

[Web] Feature: Add password policy

Full commit hash
5ea649b292a54fd6e0188a5e90abce7981f4bd88
Author
andryyy <[email protected]>
Date
over 5 years ago
Selected line
55
      $stmt = $pdo->prepare("INSERT INTO `admin` (`username`, `password`, `superadmin`, `active`)
Open commit View diff
55 $stmt = $pdo->prepare("INSERT INTO `admin` (`username`, `password`, `superadmin`, `active`)
same change 5ea649b

[Web] Feature: Add password policy

Full commit hash
5ea649b292a54fd6e0188a5e90abce7981f4bd88
Author
andryyy <[email protected]>
Date
over 5 years ago
Selected line
56
        VALUES (:username, :password_hashed, '1', :active)");
Open commit View diff
56 VALUES (:username, :password_hashed, '1', :active)");
same change 5ea649b

[Web] Feature: Add password policy

Full commit hash
5ea649b292a54fd6e0188a5e90abce7981f4bd88
Author
andryyy <[email protected]>
Date
over 5 years ago
Selected line
57
      $stmt->execute(array(
Open commit View diff
57 $stmt->execute(array(
same change 5ea649b

[Web] Feature: Add password policy

Full commit hash
5ea649b292a54fd6e0188a5e90abce7981f4bd88
Author
andryyy <[email protected]>
Date
over 5 years ago
Selected line
58
        ':username' => $username,
Open commit View diff
58 ':username' => $username,
same change 5ea649b

[Web] Feature: Add password policy

Full commit hash
5ea649b292a54fd6e0188a5e90abce7981f4bd88
Author
andryyy <[email protected]>
Date
over 5 years ago
Selected line
59
        ':password_hashed' => $password_hashed,
Open commit View diff
59 ':password_hashed' => $password_hashed,
same change 5ea649b

[Web] Feature: Add password policy

Full commit hash
5ea649b292a54fd6e0188a5e90abce7981f4bd88
Author
andryyy <[email protected]>
Date
over 5 years ago
Selected line
60
        ':active' => $active
Open commit View diff
60 ':active' => $active
same change 5ea649b

[Web] Feature: Add password policy

Full commit hash
5ea649b292a54fd6e0188a5e90abce7981f4bd88
Author
andryyy <[email protected]>
Date
over 5 years ago
Selected line
61
      ));
Open commit View diff
61 ));
André almost 8 years ago 9f0be1d

[Web] Fix require_once to always include document root

Full commit hash
9f0be1d8a84b3077e23ec96921b1bea5815adb0a
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
62
      $_SESSION['return'][] = array(
Open commit View diff
62 $_SESSION['return'][] = array(
same change 9f0be1d

[Web] Fix require_once to always include document root

Full commit hash
9f0be1d8a84b3077e23ec96921b1bea5815adb0a
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
63
        'type' => 'success',
Open commit View diff
63 'type' => 'success',
same change 9f0be1d

[Web] Fix require_once to always include document root

Full commit hash
9f0be1d8a84b3077e23ec96921b1bea5815adb0a
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
64
        'log' => array(__FUNCTION__, $_action, $_data_log),
Open commit View diff
64 'log' => array(__FUNCTION__, $_action, $_data_log),
same change 9f0be1d

[Web] Fix require_once to always include document root

Full commit hash
9f0be1d8a84b3077e23ec96921b1bea5815adb0a
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
65
        'msg' => array('admin_added', htmlspecialchars($username))
Open commit View diff
65 'msg' => array('admin_added', htmlspecialchars($username))
same change 9f0be1d

[Web] Fix require_once to always include document root

Full commit hash
9f0be1d8a84b3077e23ec96921b1bea5815adb0a
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
66
      );
Open commit View diff
66 );
same change 9f0be1d

[Web] Fix require_once to always include document root

Full commit hash
9f0be1d8a84b3077e23ec96921b1bea5815adb0a
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
67
    break;
Open commit View diff
67 break;
same change 9f0be1d

[Web] Fix require_once to always include document root

Full commit hash
9f0be1d8a84b3077e23ec96921b1bea5815adb0a
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
68
    case 'edit':
Open commit View diff
68 case 'edit':
same change 9f0be1d

[Web] Fix require_once to always include document root

Full commit hash
9f0be1d8a84b3077e23ec96921b1bea5815adb0a
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
69
      if (!is_array($_data['username'])) {
Open commit View diff
69 if (!is_array($_data['username'])) {
same change 9f0be1d

[Web] Fix require_once to always include document root

Full commit hash
9f0be1d8a84b3077e23ec96921b1bea5815adb0a
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
70
        $usernames = array();
Open commit View diff
70 $usernames = array();
same change 9f0be1d

[Web] Fix require_once to always include document root

Full commit hash
9f0be1d8a84b3077e23ec96921b1bea5815adb0a
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
71
        $usernames[] = $_data['username'];
Open commit View diff
71 $usernames[] = $_data['username'];
same change 9f0be1d

[Web] Fix require_once to always include document root

Full commit hash
9f0be1d8a84b3077e23ec96921b1bea5815adb0a
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
72
      }
Open commit View diff
72 }
same change 9f0be1d

[Web] Fix require_once to always include document root

Full commit hash
9f0be1d8a84b3077e23ec96921b1bea5815adb0a
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
73
      else {
Open commit View diff
73 else {
same change 9f0be1d

[Web] Fix require_once to always include document root

Full commit hash
9f0be1d8a84b3077e23ec96921b1bea5815adb0a
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
74
        $usernames = $_data['username'];
Open commit View diff
74 $usernames = $_data['username'];
same change 9f0be1d

[Web] Fix require_once to always include document root

Full commit hash
9f0be1d8a84b3077e23ec96921b1bea5815adb0a
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
75
      }
Open commit View diff
75 }
same change 9f0be1d

[Web] Fix require_once to always include document root

Full commit hash
9f0be1d8a84b3077e23ec96921b1bea5815adb0a
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
76
      foreach ($usernames as $username) {
Open commit View diff
76 foreach ($usernames as $username) {
same change 9f0be1d

[Web] Fix require_once to always include document root

Full commit hash
9f0be1d8a84b3077e23ec96921b1bea5815adb0a
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
77
        $is_now = admin('details', $username);
Open commit View diff
77 $is_now = admin('details', $username);
same change 9f0be1d

[Web] Fix require_once to always include document root

Full commit hash
9f0be1d8a84b3077e23ec96921b1bea5815adb0a
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
78
        if (!empty($is_now)) {
Open commit View diff
78 if (!empty($is_now)) {
andryyy almost 6 years ago d9b91fc

[Web] Important: Removed unnecessary *_int attributes from GET elements, _only_ returning int values now (same for all attributes which were provided as html char and int)

Full commit hash
d9b91fc04f286eaba4266ca60254a02dc5e91867
Author
andryyy <[email protected]>
Date
almost 6 years ago
Selected line
79
          $active = (isset($_data['active'])) ? intval($_data['active']) : $is_now['active'];
Open commit View diff
79 $active = (isset($_data['active'])) ? intval($_data['active']) : $is_now['active'];
André almost 8 years ago 9f0be1d

[Web] Fix require_once to always include document root

Full commit hash
9f0be1d8a84b3077e23ec96921b1bea5815adb0a
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
80
          $username_new = (!empty($_data['username_new'])) ? $_data['username_new'] : $is_now['username'];
Open commit View diff
80 $username_new = (!empty($_data['username_new'])) ? $_data['username_new'] : $is_now['username'];
same change 9f0be1d

[Web] Fix require_once to always include document root

Full commit hash
9f0be1d8a84b3077e23ec96921b1bea5815adb0a
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
81
        }
Open commit View diff
81 }
same change 9f0be1d

[Web] Fix require_once to always include document root

Full commit hash
9f0be1d8a84b3077e23ec96921b1bea5815adb0a
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
82
        else {
Open commit View diff
82 else {
same change 9f0be1d

[Web] Fix require_once to always include document root

Full commit hash
9f0be1d8a84b3077e23ec96921b1bea5815adb0a
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
83
          $_SESSION['return'][] = array(
Open commit View diff
83 $_SESSION['return'][] = array(
same change 9f0be1d

[Web] Fix require_once to always include document root

Full commit hash
9f0be1d8a84b3077e23ec96921b1bea5815adb0a
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
84
            'type' => 'danger',
Open commit View diff
84 'type' => 'danger',
same change 9f0be1d

[Web] Fix require_once to always include document root

Full commit hash
9f0be1d8a84b3077e23ec96921b1bea5815adb0a
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
85
            'log' => array(__FUNCTION__, $_action, $_data_log),
Open commit View diff
85 'log' => array(__FUNCTION__, $_action, $_data_log),
same change 9f0be1d

[Web] Fix require_once to always include document root

Full commit hash
9f0be1d8a84b3077e23ec96921b1bea5815adb0a
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
86
            'msg' => 'access_denied'
Open commit View diff
86 'msg' => 'access_denied'
same change 9f0be1d

[Web] Fix require_once to always include document root

Full commit hash
9f0be1d8a84b3077e23ec96921b1bea5815adb0a
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
87
          );
Open commit View diff
87 );
same change 9f0be1d

[Web] Fix require_once to always include document root

Full commit hash
9f0be1d8a84b3077e23ec96921b1bea5815adb0a
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
88
          continue;
Open commit View diff
88 continue;
same change 9f0be1d

[Web] Fix require_once to always include document root

Full commit hash
9f0be1d8a84b3077e23ec96921b1bea5815adb0a
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
89
        }
Open commit View diff
89 }
same change 9f0be1d

[Web] Fix require_once to always include document root

Full commit hash
9f0be1d8a84b3077e23ec96921b1bea5815adb0a
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
90
        $password     = $_data['password'];
Open commit View diff
90 $password = $_data['password'];
same change 9f0be1d

[Web] Fix require_once to always include document root

Full commit hash
9f0be1d8a84b3077e23ec96921b1bea5815adb0a
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
91
        $password2    = $_data['password2'];
Open commit View diff
91 $password2 = $_data['password2'];
same change 9f0be1d

[Web] Fix require_once to always include document root

Full commit hash
9f0be1d8a84b3077e23ec96921b1bea5815adb0a
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
92
        if ($active == 0) {
Open commit View diff
92 if ($active == 0) {
same change 9f0be1d

[Web] Fix require_once to always include document root

Full commit hash
9f0be1d8a84b3077e23ec96921b1bea5815adb0a
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
93
          $left_active = 0;
Open commit View diff
93 $left_active = 0;
same change 9f0be1d

[Web] Fix require_once to always include document root

Full commit hash
9f0be1d8a84b3077e23ec96921b1bea5815adb0a
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
94
          foreach (admin('get') as $admin) {
Open commit View diff
94 foreach (admin('get') as $admin) {
andryyy almost 6 years ago d9b91fc

[Web] Important: Removed unnecessary *_int attributes from GET elements, _only_ returning int values now (same for all attributes which were provided as html char and int)

Full commit hash
d9b91fc04f286eaba4266ca60254a02dc5e91867
Author
andryyy <[email protected]>
Date
almost 6 years ago
Selected line
95
            $left_active = $left_active + admin('details', $admin)['active'];
Open commit View diff
95 $left_active = $left_active + admin('details', $admin)['active'];
André almost 8 years ago 9f0be1d

[Web] Fix require_once to always include document root

Full commit hash
9f0be1d8a84b3077e23ec96921b1bea5815adb0a
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
96
          }
Open commit View diff
96 }
same change 9f0be1d

[Web] Fix require_once to always include document root

Full commit hash
9f0be1d8a84b3077e23ec96921b1bea5815adb0a
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
97
          if ($left_active == 1) {
Open commit View diff
97 if ($left_active == 1) {
same change 9f0be1d

[Web] Fix require_once to always include document root

Full commit hash
9f0be1d8a84b3077e23ec96921b1bea5815adb0a
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
98
            $_SESSION['return'][] = array(
Open commit View diff
98 $_SESSION['return'][] = array(
same change 9f0be1d

[Web] Fix require_once to always include document root

Full commit hash
9f0be1d8a84b3077e23ec96921b1bea5815adb0a
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
99
              'type' => 'warning',
Open commit View diff
99 'type' => 'warning',
same change 9f0be1d

[Web] Fix require_once to always include document root

Full commit hash
9f0be1d8a84b3077e23ec96921b1bea5815adb0a
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
100
              'log' => array(__FUNCTION__, $_action, $_data_log),
Open commit View diff
100 'log' => array(__FUNCTION__, $_action, $_data_log),
same change 9f0be1d

[Web] Fix require_once to always include document root

Full commit hash
9f0be1d8a84b3077e23ec96921b1bea5815adb0a
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
101
              'msg' => 'no_active_admin'
Open commit View diff
101 'msg' => 'no_active_admin'
same change 9f0be1d

[Web] Fix require_once to always include document root

Full commit hash
9f0be1d8a84b3077e23ec96921b1bea5815adb0a
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
102
            );
Open commit View diff
102 );
same change 9f0be1d

[Web] Fix require_once to always include document root

Full commit hash
9f0be1d8a84b3077e23ec96921b1bea5815adb0a
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
103
            continue;
Open commit View diff
103 continue;
same change 9f0be1d

[Web] Fix require_once to always include document root

Full commit hash
9f0be1d8a84b3077e23ec96921b1bea5815adb0a
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
104
          }
Open commit View diff
104 }
same change 9f0be1d

[Web] Fix require_once to always include document root

Full commit hash
9f0be1d8a84b3077e23ec96921b1bea5815adb0a
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
105
        }
Open commit View diff
105 }
same change 9f0be1d

[Web] Fix require_once to always include document root

Full commit hash
9f0be1d8a84b3077e23ec96921b1bea5815adb0a
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
106
        if (!ctype_alnum(str_replace(array('_', '.', '-'), '', $username_new))) {
Open commit View diff
106 if (!ctype_alnum(str_replace(array('_', '.', '-'), '', $username_new))) {
same change 9f0be1d

[Web] Fix require_once to always include document root

Full commit hash
9f0be1d8a84b3077e23ec96921b1bea5815adb0a
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
107
          $_SESSION['return'][] = array(
Open commit View diff
107 $_SESSION['return'][] = array(
same change 9f0be1d

[Web] Fix require_once to always include document root

Full commit hash
9f0be1d8a84b3077e23ec96921b1bea5815adb0a
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
108
            'type' => 'danger',
Open commit View diff
108 'type' => 'danger',
same change 9f0be1d

[Web] Fix require_once to always include document root

Full commit hash
9f0be1d8a84b3077e23ec96921b1bea5815adb0a
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
109
            'log' => array(__FUNCTION__, $_action, $_data_log),
Open commit View diff
109 'log' => array(__FUNCTION__, $_action, $_data_log),
same change 9f0be1d

[Web] Fix require_once to always include document root

Full commit hash
9f0be1d8a84b3077e23ec96921b1bea5815adb0a
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
110
            'msg' => array('username_invalid', $username_new)
Open commit View diff
110 'msg' => array('username_invalid', $username_new)
same change 9f0be1d

[Web] Fix require_once to always include document root

Full commit hash
9f0be1d8a84b3077e23ec96921b1bea5815adb0a
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
111
          );
Open commit View diff
111 );
same change 9f0be1d

[Web] Fix require_once to always include document root

Full commit hash
9f0be1d8a84b3077e23ec96921b1bea5815adb0a
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
112
          continue;
Open commit View diff
112 continue;
same change 9f0be1d

[Web] Fix require_once to always include document root

Full commit hash
9f0be1d8a84b3077e23ec96921b1bea5815adb0a
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
113
        }
Open commit View diff
113 }
same change 9f0be1d

[Web] Fix require_once to always include document root

Full commit hash
9f0be1d8a84b3077e23ec96921b1bea5815adb0a
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
114
        if ($username_new != $username) {
Open commit View diff
114 if ($username_new != $username) {
same change 9f0be1d

[Web] Fix require_once to always include document root

Full commit hash
9f0be1d8a84b3077e23ec96921b1bea5815adb0a
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
115
          if (!empty(admin('details', $username_new)['username'])) {
Open commit View diff
115 if (!empty(admin('details', $username_new)['username'])) {
same change 9f0be1d

[Web] Fix require_once to always include document root

Full commit hash
9f0be1d8a84b3077e23ec96921b1bea5815adb0a
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
116
            $_SESSION['return'][] = array(
Open commit View diff
116 $_SESSION['return'][] = array(
same change 9f0be1d

[Web] Fix require_once to always include document root

Full commit hash
9f0be1d8a84b3077e23ec96921b1bea5815adb0a
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
117
              'type' => 'danger',
Open commit View diff
117 'type' => 'danger',
same change 9f0be1d

[Web] Fix require_once to always include document root

Full commit hash
9f0be1d8a84b3077e23ec96921b1bea5815adb0a
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
118
              'log' => array(__FUNCTION__, $_action, $_data_log),
Open commit View diff
118 'log' => array(__FUNCTION__, $_action, $_data_log),
same change 9f0be1d

[Web] Fix require_once to always include document root

Full commit hash
9f0be1d8a84b3077e23ec96921b1bea5815adb0a
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
119
              'msg' => array('username_invalid', $username_new)
Open commit View diff
119 'msg' => array('username_invalid', $username_new)
same change 9f0be1d

[Web] Fix require_once to always include document root

Full commit hash
9f0be1d8a84b3077e23ec96921b1bea5815adb0a
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
120
            );
Open commit View diff
120 );
same change 9f0be1d

[Web] Fix require_once to always include document root

Full commit hash
9f0be1d8a84b3077e23ec96921b1bea5815adb0a
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
121
            continue;
Open commit View diff
121 continue;
same change 9f0be1d

[Web] Fix require_once to always include document root

Full commit hash
9f0be1d8a84b3077e23ec96921b1bea5815adb0a
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
122
          }
Open commit View diff
122 }
same change 9f0be1d

[Web] Fix require_once to always include document root

Full commit hash
9f0be1d8a84b3077e23ec96921b1bea5815adb0a
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
123
        }
Open commit View diff
123 }
FreddleSpl0it 5 months ago ad5b94a

[Web] Add forced 2FA setup and password update enforcement

Full commit hash
ad5b94af5e48297631629c2a118e7f163a044a07
Author
FreddleSpl0it <[email protected]>
Date
5 months ago
Selected line
124
        // Check if this is a self password change via forced update
Open commit View diff
124 // Check if this is a self password change via forced update
same change ad5b94a

[Web] Add forced 2FA setup and password update enforcement

Full commit hash
ad5b94af5e48297631629c2a118e7f163a044a07
Author
FreddleSpl0it <[email protected]>
Date
5 months ago
Selected line
125
        if ($username == $_SESSION['mailcow_cc_username'] && !empty($_SESSION['pending_pw_update'])) {
Open commit View diff
125 if ($username == $_SESSION['mailcow_cc_username'] && !empty($_SESSION['pending_pw_update'])) {
same change ad5b94a

[Web] Add forced 2FA setup and password update enforcement

Full commit hash
ad5b94af5e48297631629c2a118e7f163a044a07
Author
FreddleSpl0it <[email protected]>
Date
5 months ago
Selected line
126
          // Forced password update: only change password and clear force_pw_update flag
Open commit View diff
126 // Forced password update: only change password and clear force_pw_update flag
same change ad5b94a

[Web] Add forced 2FA setup and password update enforcement

Full commit hash
ad5b94af5e48297631629c2a118e7f163a044a07
Author
FreddleSpl0it <[email protected]>
Date
5 months ago
Selected line
127
          if (!empty($password)) {
Open commit View diff
127 if (!empty($password)) {
same change ad5b94a

[Web] Add forced 2FA setup and password update enforcement

Full commit hash
ad5b94af5e48297631629c2a118e7f163a044a07
Author
FreddleSpl0it <[email protected]>
Date
5 months ago
Selected line
128
            if (password_check($password, $_data['password2']) !== true) {
Open commit View diff
128 if (password_check($password, $_data['password2']) !== true) {
same change ad5b94a

[Web] Add forced 2FA setup and password update enforcement

Full commit hash
ad5b94af5e48297631629c2a118e7f163a044a07
Author
FreddleSpl0it <[email protected]>
Date
5 months ago
Selected line
129
              return false;
Open commit View diff
129 return false;
same change ad5b94a

[Web] Add forced 2FA setup and password update enforcement

Full commit hash
ad5b94af5e48297631629c2a118e7f163a044a07
Author
FreddleSpl0it <[email protected]>
Date
5 months ago
Selected line
130
            }
Open commit View diff
130 }
same change ad5b94a

[Web] Add forced 2FA setup and password update enforcement

Full commit hash
ad5b94af5e48297631629c2a118e7f163a044a07
Author
FreddleSpl0it <[email protected]>
Date
5 months ago
Selected line
131
            $password_hashed = hash_password($password);
Open commit View diff
131 $password_hashed = hash_password($password);
same change ad5b94a

[Web] Add forced 2FA setup and password update enforcement

Full commit hash
ad5b94af5e48297631629c2a118e7f163a044a07
Author
FreddleSpl0it <[email protected]>
Date
5 months ago
Selected line
132
            $stmt = $pdo->prepare("UPDATE `admin` SET `password` = :password_hashed,
Open commit View diff
132 $stmt = $pdo->prepare("UPDATE `admin` SET `password` = :password_hashed,
same change ad5b94a

[Web] Add forced 2FA setup and password update enforcement

Full commit hash
ad5b94af5e48297631629c2a118e7f163a044a07
Author
FreddleSpl0it <[email protected]>
Date
5 months ago
Selected line
133
              `attributes` = JSON_SET(COALESCE(`attributes`, '{}'), '$.force_pw_update', '0')
Open commit View diff
133 `attributes` = JSON_SET(COALESCE(`attributes`, '{}'), '$.force_pw_update', '0')
same change ad5b94a

[Web] Add forced 2FA setup and password update enforcement

Full commit hash
ad5b94af5e48297631629c2a118e7f163a044a07
Author
FreddleSpl0it <[email protected]>
Date
5 months ago
Selected line
134
              WHERE `username` = :username");
Open commit View diff
134 WHERE `username` = :username");
same change ad5b94a

[Web] Add forced 2FA setup and password update enforcement

Full commit hash
ad5b94af5e48297631629c2a118e7f163a044a07
Author
FreddleSpl0it <[email protected]>
Date
5 months ago
Selected line
135
            $stmt->execute(array(
Open commit View diff
135 $stmt->execute(array(
same change ad5b94a

[Web] Add forced 2FA setup and password update enforcement

Full commit hash
ad5b94af5e48297631629c2a118e7f163a044a07
Author
FreddleSpl0it <[email protected]>
Date
5 months ago
Selected line
136
              ':password_hashed' => $password_hashed,
Open commit View diff
136 ':password_hashed' => $password_hashed,
same change ad5b94a

[Web] Add forced 2FA setup and password update enforcement

Full commit hash
ad5b94af5e48297631629c2a118e7f163a044a07
Author
FreddleSpl0it <[email protected]>
Date
5 months ago
Selected line
137
              ':username' => $username
Open commit View diff
137 ':username' => $username
same change ad5b94a

[Web] Add forced 2FA setup and password update enforcement

Full commit hash
ad5b94af5e48297631629c2a118e7f163a044a07
Author
FreddleSpl0it <[email protected]>
Date
5 months ago
Selected line
138
            ));
Open commit View diff
138 ));
same change ad5b94a

[Web] Add forced 2FA setup and password update enforcement

Full commit hash
ad5b94af5e48297631629c2a118e7f163a044a07
Author
FreddleSpl0it <[email protected]>
Date
5 months ago
Selected line
139
            unset($_SESSION['pending_pw_update']);
Open commit View diff
139 unset($_SESSION['pending_pw_update']);
André almost 8 years ago 9f0be1d

[Web] Fix require_once to always include document root

Full commit hash
9f0be1d8a84b3077e23ec96921b1bea5815adb0a
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
140
          }
Open commit View diff
140 }
FreddleSpl0it 5 months ago ad5b94a

[Web] Add forced 2FA setup and password update enforcement

Full commit hash
ad5b94af5e48297631629c2a118e7f163a044a07
Author
FreddleSpl0it <[email protected]>
Date
5 months ago
Selected line
141
        } else {
Open commit View diff
141 } else {
same change ad5b94a

[Web] Add forced 2FA setup and password update enforcement

Full commit hash
ad5b94af5e48297631629c2a118e7f163a044a07
Author
FreddleSpl0it <[email protected]>
Date
5 months ago
Selected line
142
          // Normal admin edit: update all attributes
Open commit View diff
142 // Normal admin edit: update all attributes
same change ad5b94a

[Web] Add forced 2FA setup and password update enforcement

Full commit hash
ad5b94af5e48297631629c2a118e7f163a044a07
Author
FreddleSpl0it <[email protected]>
Date
5 months ago
Selected line
143
          $force_tfa = intval($_data['force_tfa'] ?? 0) ? 1 : 0;
Open commit View diff
143 $force_tfa = intval($_data['force_tfa'] ?? 0) ? 1 : 0;
same change ad5b94a

[Web] Add forced 2FA setup and password update enforcement

Full commit hash
ad5b94af5e48297631629c2a118e7f163a044a07
Author
FreddleSpl0it <[email protected]>
Date
5 months ago
Selected line
144
          $force_pw_update = intval($_data['force_pw_update'] ?? 0) ? 1 : 0;
Open commit View diff
144 $force_pw_update = intval($_data['force_pw_update'] ?? 0) ? 1 : 0;
same change ad5b94a

[Web] Add forced 2FA setup and password update enforcement

Full commit hash
ad5b94af5e48297631629c2a118e7f163a044a07
Author
FreddleSpl0it <[email protected]>
Date
5 months ago
Selected line
145
          if (!empty($password)) {
Open commit View diff
145 if (!empty($password)) {
same change ad5b94a

[Web] Add forced 2FA setup and password update enforcement

Full commit hash
ad5b94af5e48297631629c2a118e7f163a044a07
Author
FreddleSpl0it <[email protected]>
Date
5 months ago
Selected line
146
            if (password_check($password, $password2) !== true) {
Open commit View diff
146 if (password_check($password, $password2) !== true) {
same change ad5b94a

[Web] Add forced 2FA setup and password update enforcement

Full commit hash
ad5b94af5e48297631629c2a118e7f163a044a07
Author
FreddleSpl0it <[email protected]>
Date
5 months ago
Selected line
147
              return false;
Open commit View diff
147 return false;
same change ad5b94a

[Web] Add forced 2FA setup and password update enforcement

Full commit hash
ad5b94af5e48297631629c2a118e7f163a044a07
Author
FreddleSpl0it <[email protected]>
Date
5 months ago
Selected line
148
            }
Open commit View diff
148 }
same change ad5b94a

[Web] Add forced 2FA setup and password update enforcement

Full commit hash
ad5b94af5e48297631629c2a118e7f163a044a07
Author
FreddleSpl0it <[email protected]>
Date
5 months ago
Selected line
149
            $password_hashed = hash_password($password);
Open commit View diff
149 $password_hashed = hash_password($password);
same change ad5b94a

[Web] Add forced 2FA setup and password update enforcement

Full commit hash
ad5b94af5e48297631629c2a118e7f163a044a07
Author
FreddleSpl0it <[email protected]>
Date
5 months ago
Selected line
150
            $stmt = $pdo->prepare("UPDATE `admin` SET `username` = :username_new, `active` = :active, `password` = :password_hashed,
Open commit View diff
150 $stmt = $pdo->prepare("UPDATE `admin` SET `username` = :username_new, `active` = :active, `password` = :password_hashed,
same change ad5b94a

[Web] Add forced 2FA setup and password update enforcement

Full commit hash
ad5b94af5e48297631629c2a118e7f163a044a07
Author
FreddleSpl0it <[email protected]>
Date
5 months ago
Selected line
151
              `attributes` = JSON_SET(COALESCE(`attributes`, '{}'), '$.force_tfa', :force_tfa, '$.force_pw_update', :force_pw_update)
Open commit View diff
151 `attributes` = JSON_SET(COALESCE(`attributes`, '{}'), '$.force_tfa', :force_tfa, '$.force_pw_update', :force_pw_update)
same change ad5b94a

[Web] Add forced 2FA setup and password update enforcement

Full commit hash
ad5b94af5e48297631629c2a118e7f163a044a07
Author
FreddleSpl0it <[email protected]>
Date
5 months ago
Selected line
152
              WHERE `username` = :username");
Open commit View diff
152 WHERE `username` = :username");
same change ad5b94a

[Web] Add forced 2FA setup and password update enforcement

Full commit hash
ad5b94af5e48297631629c2a118e7f163a044a07
Author
FreddleSpl0it <[email protected]>
Date
5 months ago
Selected line
153
            $stmt->execute(array(
Open commit View diff
153 $stmt->execute(array(
same change ad5b94a

[Web] Add forced 2FA setup and password update enforcement

Full commit hash
ad5b94af5e48297631629c2a118e7f163a044a07
Author
FreddleSpl0it <[email protected]>
Date
5 months ago
Selected line
154
              ':password_hashed' => $password_hashed,
Open commit View diff
154 ':password_hashed' => $password_hashed,
same change ad5b94a

[Web] Add forced 2FA setup and password update enforcement

Full commit hash
ad5b94af5e48297631629c2a118e7f163a044a07
Author
FreddleSpl0it <[email protected]>
Date
5 months ago
Selected line
155
              ':username_new' => $username_new,
Open commit View diff
155 ':username_new' => $username_new,
same change ad5b94a

[Web] Add forced 2FA setup and password update enforcement

Full commit hash
ad5b94af5e48297631629c2a118e7f163a044a07
Author
FreddleSpl0it <[email protected]>
Date
5 months ago
Selected line
156
              ':username' => $username,
Open commit View diff
156 ':username' => $username,
same change ad5b94a

[Web] Add forced 2FA setup and password update enforcement

Full commit hash
ad5b94af5e48297631629c2a118e7f163a044a07
Author
FreddleSpl0it <[email protected]>
Date
5 months ago
Selected line
157
              ':active' => $active,
Open commit View diff
157 ':active' => $active,
same change ad5b94a

[Web] Add forced 2FA setup and password update enforcement

Full commit hash
ad5b94af5e48297631629c2a118e7f163a044a07
Author
FreddleSpl0it <[email protected]>
Date
5 months ago
Selected line
158
              ':force_tfa' => strval($force_tfa),
Open commit View diff
158 ':force_tfa' => strval($force_tfa),
same change ad5b94a

[Web] Add forced 2FA setup and password update enforcement

Full commit hash
ad5b94af5e48297631629c2a118e7f163a044a07
Author
FreddleSpl0it <[email protected]>
Date
5 months ago
Selected line
159
              ':force_pw_update' => strval($force_pw_update)
Open commit View diff
159 ':force_pw_update' => strval($force_pw_update)
same change ad5b94a

[Web] Add forced 2FA setup and password update enforcement

Full commit hash
ad5b94af5e48297631629c2a118e7f163a044a07
Author
FreddleSpl0it <[email protected]>
Date
5 months ago
Selected line
160
            ));
Open commit View diff
160 ));
André almost 8 years ago 9f0be1d

[Web] Fix require_once to always include document root

Full commit hash
9f0be1d8a84b3077e23ec96921b1bea5815adb0a
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
161
          }
Open commit View diff
161 }
same change 9f0be1d

[Web] Fix require_once to always include document root

Full commit hash
9f0be1d8a84b3077e23ec96921b1bea5815adb0a
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
162
          else {
Open commit View diff
162 else {
FreddleSpl0it 5 months ago ad5b94a

[Web] Add forced 2FA setup and password update enforcement

Full commit hash
ad5b94af5e48297631629c2a118e7f163a044a07
Author
FreddleSpl0it <[email protected]>
Date
5 months ago
Selected line
163
            $stmt = $pdo->prepare("UPDATE `admin` SET `username` = :username_new, `active` = :active,
Open commit View diff
163 $stmt = $pdo->prepare("UPDATE `admin` SET `username` = :username_new, `active` = :active,
same change ad5b94a

[Web] Add forced 2FA setup and password update enforcement

Full commit hash
ad5b94af5e48297631629c2a118e7f163a044a07
Author
FreddleSpl0it <[email protected]>
Date
5 months ago
Selected line
164
              `attributes` = JSON_SET(COALESCE(`attributes`, '{}'), '$.force_tfa', :force_tfa, '$.force_pw_update', :force_pw_update)
Open commit View diff
164 `attributes` = JSON_SET(COALESCE(`attributes`, '{}'), '$.force_tfa', :force_tfa, '$.force_pw_update', :force_pw_update)
same change ad5b94a

[Web] Add forced 2FA setup and password update enforcement

Full commit hash
ad5b94af5e48297631629c2a118e7f163a044a07
Author
FreddleSpl0it <[email protected]>
Date
5 months ago
Selected line
165
              WHERE `username` = :username");
Open commit View diff
165 WHERE `username` = :username");
same change ad5b94a

[Web] Add forced 2FA setup and password update enforcement

Full commit hash
ad5b94af5e48297631629c2a118e7f163a044a07
Author
FreddleSpl0it <[email protected]>
Date
5 months ago
Selected line
166
            $stmt->execute(array(
Open commit View diff
166 $stmt->execute(array(
same change ad5b94a

[Web] Add forced 2FA setup and password update enforcement

Full commit hash
ad5b94af5e48297631629c2a118e7f163a044a07
Author
FreddleSpl0it <[email protected]>
Date
5 months ago
Selected line
167
              ':username_new' => $username_new,
Open commit View diff
167 ':username_new' => $username_new,
same change ad5b94a

[Web] Add forced 2FA setup and password update enforcement

Full commit hash
ad5b94af5e48297631629c2a118e7f163a044a07
Author
FreddleSpl0it <[email protected]>
Date
5 months ago
Selected line
168
              ':username' => $username,
Open commit View diff
168 ':username' => $username,
same change ad5b94a

[Web] Add forced 2FA setup and password update enforcement

Full commit hash
ad5b94af5e48297631629c2a118e7f163a044a07
Author
FreddleSpl0it <[email protected]>
Date
5 months ago
Selected line
169
              ':active' => $active,
Open commit View diff
169 ':active' => $active,
same change ad5b94a

[Web] Add forced 2FA setup and password update enforcement

Full commit hash
ad5b94af5e48297631629c2a118e7f163a044a07
Author
FreddleSpl0it <[email protected]>
Date
5 months ago
Selected line
170
              ':force_tfa' => strval($force_tfa),
Open commit View diff
170 ':force_tfa' => strval($force_tfa),
same change ad5b94a

[Web] Add forced 2FA setup and password update enforcement

Full commit hash
ad5b94af5e48297631629c2a118e7f163a044a07
Author
FreddleSpl0it <[email protected]>
Date
5 months ago
Selected line
171
              ':force_pw_update' => strval($force_pw_update)
Open commit View diff
171 ':force_pw_update' => strval($force_pw_update)
same change ad5b94a

[Web] Add forced 2FA setup and password update enforcement

Full commit hash
ad5b94af5e48297631629c2a118e7f163a044a07
Author
FreddleSpl0it <[email protected]>
Date
5 months ago
Selected line
172
            ));
Open commit View diff
172 ));
André almost 8 years ago 9f0be1d

[Web] Fix require_once to always include document root

Full commit hash
9f0be1d8a84b3077e23ec96921b1bea5815adb0a
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
173
          }
Open commit View diff
173 }
same change 9f0be1d

[Web] Fix require_once to always include document root

Full commit hash
9f0be1d8a84b3077e23ec96921b1bea5815adb0a
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
174
          if (isset($_data['disable_tfa'])) {
Open commit View diff
174 if (isset($_data['disable_tfa'])) {
same change 9f0be1d

[Web] Fix require_once to always include document root

Full commit hash
9f0be1d8a84b3077e23ec96921b1bea5815adb0a
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
175
            $stmt = $pdo->prepare("UPDATE `tfa` SET `active` = '0' WHERE `username` = :username");
Open commit View diff
175 $stmt = $pdo->prepare("UPDATE `tfa` SET `active` = '0' WHERE `username` = :username");
same change 9f0be1d

[Web] Fix require_once to always include document root

Full commit hash
9f0be1d8a84b3077e23ec96921b1bea5815adb0a
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
176
            $stmt->execute(array(':username' => $username));
Open commit View diff
176 $stmt->execute(array(':username' => $username));
same change 9f0be1d

[Web] Fix require_once to always include document root

Full commit hash
9f0be1d8a84b3077e23ec96921b1bea5815adb0a
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
177
          }
Open commit View diff
177 }
same change 9f0be1d

[Web] Fix require_once to always include document root

Full commit hash
9f0be1d8a84b3077e23ec96921b1bea5815adb0a
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
178
          else {
Open commit View diff
178 else {
same change 9f0be1d

[Web] Fix require_once to always include document root

Full commit hash
9f0be1d8a84b3077e23ec96921b1bea5815adb0a
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
179
            $stmt = $pdo->prepare("UPDATE `tfa` SET `username` = :username_new WHERE `username` = :username");
Open commit View diff
179 $stmt = $pdo->prepare("UPDATE `tfa` SET `username` = :username_new WHERE `username` = :username");
same change 9f0be1d

[Web] Fix require_once to always include document root

Full commit hash
9f0be1d8a84b3077e23ec96921b1bea5815adb0a
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
180
            $stmt->execute(array(':username_new' => $username_new, ':username' => $username));
Open commit View diff
180 $stmt->execute(array(':username_new' => $username_new, ':username' => $username));
same change 9f0be1d

[Web] Fix require_once to always include document root

Full commit hash
9f0be1d8a84b3077e23ec96921b1bea5815adb0a
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
181
          }
Open commit View diff
181 }
same change 9f0be1d

[Web] Fix require_once to always include document root

Full commit hash
9f0be1d8a84b3077e23ec96921b1bea5815adb0a
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
182
        }
Open commit View diff
182 }
same change 9f0be1d

[Web] Fix require_once to always include document root

Full commit hash
9f0be1d8a84b3077e23ec96921b1bea5815adb0a
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
183
        $_SESSION['return'][] = array(
Open commit View diff
183 $_SESSION['return'][] = array(
same change 9f0be1d

[Web] Fix require_once to always include document root

Full commit hash
9f0be1d8a84b3077e23ec96921b1bea5815adb0a
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
184
          'type' => 'success',
Open commit View diff
184 'type' => 'success',
same change 9f0be1d

[Web] Fix require_once to always include document root

Full commit hash
9f0be1d8a84b3077e23ec96921b1bea5815adb0a
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
185
          'log' => array(__FUNCTION__, $_action, $_data_log),
Open commit View diff
185 'log' => array(__FUNCTION__, $_action, $_data_log),
same change 9f0be1d

[Web] Fix require_once to always include document root

Full commit hash
9f0be1d8a84b3077e23ec96921b1bea5815adb0a
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
186
          'msg' => array('admin_modified', htmlspecialchars($username))
Open commit View diff
186 'msg' => array('admin_modified', htmlspecialchars($username))
same change 9f0be1d

[Web] Fix require_once to always include document root

Full commit hash
9f0be1d8a84b3077e23ec96921b1bea5815adb0a
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
187
        );
Open commit View diff
187 );
same change 9f0be1d

[Web] Fix require_once to always include document root

Full commit hash
9f0be1d8a84b3077e23ec96921b1bea5815adb0a
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
188
      }
Open commit View diff
188 }
same change 9f0be1d

[Web] Fix require_once to always include document root

Full commit hash
9f0be1d8a84b3077e23ec96921b1bea5815adb0a
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
189
      return true;
Open commit View diff
189 return true;
same change 9f0be1d

[Web] Fix require_once to always include document root

Full commit hash
9f0be1d8a84b3077e23ec96921b1bea5815adb0a
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
190
    break;
Open commit View diff
190 break;
same change 9f0be1d

[Web] Fix require_once to always include document root

Full commit hash
9f0be1d8a84b3077e23ec96921b1bea5815adb0a
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
191
    case 'delete':
Open commit View diff
191 case 'delete':
same change 9f0be1d

[Web] Fix require_once to always include document root

Full commit hash
9f0be1d8a84b3077e23ec96921b1bea5815adb0a
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
192
      $usernames = (array)$_data['username'];
Open commit View diff
192 $usernames = (array)$_data['username'];
same change 9f0be1d

[Web] Fix require_once to always include document root

Full commit hash
9f0be1d8a84b3077e23ec96921b1bea5815adb0a
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
193
      foreach ($usernames as $username) {
Open commit View diff
193 foreach ($usernames as $username) {
andryyy over 7 years ago d60c6a4

[Web] Fix shared alias displain in user view, fixes #2274

Full commit hash
d60c6a4e56a447bfa9e0592df41e0a3ce550f4f3
Author
andryyy <[email protected]>
Date
over 7 years ago
Selected line
194
        if ($_SESSION['mailcow_cc_username'] == $username) {
Open commit View diff
194 if ($_SESSION['mailcow_cc_username'] == $username) {
André almost 8 years ago 9f0be1d

[Web] Fix require_once to always include document root

Full commit hash
9f0be1d8a84b3077e23ec96921b1bea5815adb0a
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
195
          $_SESSION['return'][] = array(
Open commit View diff
195 $_SESSION['return'][] = array(
same change 9f0be1d

[Web] Fix require_once to always include document root

Full commit hash
9f0be1d8a84b3077e23ec96921b1bea5815adb0a
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
196
            'type' => 'warning',
Open commit View diff
196 'type' => 'warning',
same change 9f0be1d

[Web] Fix require_once to always include document root

Full commit hash
9f0be1d8a84b3077e23ec96921b1bea5815adb0a
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
197
            'log' => array(__FUNCTION__, $_action, $_data_log),
Open commit View diff
197 'log' => array(__FUNCTION__, $_action, $_data_log),
same change 9f0be1d

[Web] Fix require_once to always include document root

Full commit hash
9f0be1d8a84b3077e23ec96921b1bea5815adb0a
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
198
            'msg' => 'cannot_delete_self'
Open commit View diff
198 'msg' => 'cannot_delete_self'
same change 9f0be1d

[Web] Fix require_once to always include document root

Full commit hash
9f0be1d8a84b3077e23ec96921b1bea5815adb0a
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
199
          );
Open commit View diff
199 );
same change 9f0be1d

[Web] Fix require_once to always include document root

Full commit hash
9f0be1d8a84b3077e23ec96921b1bea5815adb0a
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
200
          continue;
Open commit View diff
200 continue;
same change 9f0be1d

[Web] Fix require_once to always include document root

Full commit hash
9f0be1d8a84b3077e23ec96921b1bea5815adb0a
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
201
        }
Open commit View diff
201 }
same change 9f0be1d

[Web] Fix require_once to always include document root

Full commit hash
9f0be1d8a84b3077e23ec96921b1bea5815adb0a
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
202
        if (empty(admin('details', $username))) {
Open commit View diff
202 if (empty(admin('details', $username))) {
same change 9f0be1d

[Web] Fix require_once to always include document root

Full commit hash
9f0be1d8a84b3077e23ec96921b1bea5815adb0a
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
203
          $_SESSION['return'][] = array(
Open commit View diff
203 $_SESSION['return'][] = array(
same change 9f0be1d

[Web] Fix require_once to always include document root

Full commit hash
9f0be1d8a84b3077e23ec96921b1bea5815adb0a
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
204
            'type' => 'danger',
Open commit View diff
204 'type' => 'danger',
same change 9f0be1d

[Web] Fix require_once to always include document root

Full commit hash
9f0be1d8a84b3077e23ec96921b1bea5815adb0a
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
205
            'log' => array(__FUNCTION__, $_action, $_data_log),
Open commit View diff
205 'log' => array(__FUNCTION__, $_action, $_data_log),
same change 9f0be1d

[Web] Fix require_once to always include document root

Full commit hash
9f0be1d8a84b3077e23ec96921b1bea5815adb0a
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
206
            'msg' => array('username_invalid', $username)
Open commit View diff
206 'msg' => array('username_invalid', $username)
same change 9f0be1d

[Web] Fix require_once to always include document root

Full commit hash
9f0be1d8a84b3077e23ec96921b1bea5815adb0a
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
207
          );
Open commit View diff
207 );
same change 9f0be1d

[Web] Fix require_once to always include document root

Full commit hash
9f0be1d8a84b3077e23ec96921b1bea5815adb0a
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
208
          continue;
Open commit View diff
208 continue;
same change 9f0be1d

[Web] Fix require_once to always include document root

Full commit hash
9f0be1d8a84b3077e23ec96921b1bea5815adb0a
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
209
        }
Open commit View diff
209 }
same change 9f0be1d

[Web] Fix require_once to always include document root

Full commit hash
9f0be1d8a84b3077e23ec96921b1bea5815adb0a
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
210
        $stmt = $pdo->prepare("DELETE FROM `admin` WHERE `username` = :username");
Open commit View diff
210 $stmt = $pdo->prepare("DELETE FROM `admin` WHERE `username` = :username");
same change 9f0be1d

[Web] Fix require_once to always include document root

Full commit hash
9f0be1d8a84b3077e23ec96921b1bea5815adb0a
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
211
        $stmt->execute(array(
Open commit View diff
211 $stmt->execute(array(
same change 9f0be1d

[Web] Fix require_once to always include document root

Full commit hash
9f0be1d8a84b3077e23ec96921b1bea5815adb0a
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
212
          ':username' => $username,
Open commit View diff
212 ':username' => $username,
same change 9f0be1d

[Web] Fix require_once to always include document root

Full commit hash
9f0be1d8a84b3077e23ec96921b1bea5815adb0a
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
213
        ));
Open commit View diff
213 ));
same change 9f0be1d

[Web] Fix require_once to always include document root

Full commit hash
9f0be1d8a84b3077e23ec96921b1bea5815adb0a
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
214
        $stmt = $pdo->prepare("DELETE FROM `domain_admins` WHERE `username` = :username");
Open commit View diff
214 $stmt = $pdo->prepare("DELETE FROM `domain_admins` WHERE `username` = :username");
same change 9f0be1d

[Web] Fix require_once to always include document root

Full commit hash
9f0be1d8a84b3077e23ec96921b1bea5815adb0a
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
215
        $stmt->execute(array(
Open commit View diff
215 $stmt->execute(array(
same change 9f0be1d

[Web] Fix require_once to always include document root

Full commit hash
9f0be1d8a84b3077e23ec96921b1bea5815adb0a
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
216
          ':username' => $username,
Open commit View diff
216 ':username' => $username,
same change 9f0be1d

[Web] Fix require_once to always include document root

Full commit hash
9f0be1d8a84b3077e23ec96921b1bea5815adb0a
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
217
        ));
Open commit View diff
217 ));
andryyy over 5 years ago ff071e5

[Web] Different UV flag for auth and register, remove unique key from fido2, delete tfa/fido2 when removing user object

Full commit hash
ff071e5120e6ce5ec5a0d6fbc5393d1ed6fd6465
Author
andryyy <[email protected]>
Date
over 5 years ago
Selected line
218
        $stmt = $pdo->prepare("DELETE FROM `tfa` WHERE `username` = :username");
Open commit View diff
218 $stmt = $pdo->prepare("DELETE FROM `tfa` WHERE `username` = :username");
same change ff071e5

[Web] Different UV flag for auth and register, remove unique key from fido2, delete tfa/fido2 when removing user object

Full commit hash
ff071e5120e6ce5ec5a0d6fbc5393d1ed6fd6465
Author
andryyy <[email protected]>
Date
over 5 years ago
Selected line
219
        $stmt->execute(array(
Open commit View diff
219 $stmt->execute(array(
same change ff071e5

[Web] Different UV flag for auth and register, remove unique key from fido2, delete tfa/fido2 when removing user object

Full commit hash
ff071e5120e6ce5ec5a0d6fbc5393d1ed6fd6465
Author
andryyy <[email protected]>
Date
over 5 years ago
Selected line
220
          ':username' => $username,
Open commit View diff
220 ':username' => $username,
same change ff071e5

[Web] Different UV flag for auth and register, remove unique key from fido2, delete tfa/fido2 when removing user object

Full commit hash
ff071e5120e6ce5ec5a0d6fbc5393d1ed6fd6465
Author
andryyy <[email protected]>
Date
over 5 years ago
Selected line
221
        ));
Open commit View diff
221 ));
same change ff071e5

[Web] Different UV flag for auth and register, remove unique key from fido2, delete tfa/fido2 when removing user object

Full commit hash
ff071e5120e6ce5ec5a0d6fbc5393d1ed6fd6465
Author
andryyy <[email protected]>
Date
over 5 years ago
Selected line
222
        $stmt = $pdo->prepare("DELETE FROM `fido2` WHERE `username` = :username");
Open commit View diff
222 $stmt = $pdo->prepare("DELETE FROM `fido2` WHERE `username` = :username");
same change ff071e5

[Web] Different UV flag for auth and register, remove unique key from fido2, delete tfa/fido2 when removing user object

Full commit hash
ff071e5120e6ce5ec5a0d6fbc5393d1ed6fd6465
Author
andryyy <[email protected]>
Date
over 5 years ago
Selected line
223
        $stmt->execute(array(
Open commit View diff
223 $stmt->execute(array(
same change ff071e5

[Web] Different UV flag for auth and register, remove unique key from fido2, delete tfa/fido2 when removing user object

Full commit hash
ff071e5120e6ce5ec5a0d6fbc5393d1ed6fd6465
Author
andryyy <[email protected]>
Date
over 5 years ago
Selected line
224
          ':username' => $username,
Open commit View diff
224 ':username' => $username,
same change ff071e5

[Web] Different UV flag for auth and register, remove unique key from fido2, delete tfa/fido2 when removing user object

Full commit hash
ff071e5120e6ce5ec5a0d6fbc5393d1ed6fd6465
Author
andryyy <[email protected]>
Date
over 5 years ago
Selected line
225
        ));
Open commit View diff
225 ));
André almost 8 years ago 9f0be1d

[Web] Fix require_once to always include document root

Full commit hash
9f0be1d8a84b3077e23ec96921b1bea5815adb0a
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
226
        $_SESSION['return'][] = array(
Open commit View diff
226 $_SESSION['return'][] = array(
same change 9f0be1d

[Web] Fix require_once to always include document root

Full commit hash
9f0be1d8a84b3077e23ec96921b1bea5815adb0a
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
227
          'type' => 'success',
Open commit View diff
227 'type' => 'success',
same change 9f0be1d

[Web] Fix require_once to always include document root

Full commit hash
9f0be1d8a84b3077e23ec96921b1bea5815adb0a
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
228
          'log' => array(__FUNCTION__, $_action, $_data_log),
Open commit View diff
228 'log' => array(__FUNCTION__, $_action, $_data_log),
same change 9f0be1d

[Web] Fix require_once to always include document root

Full commit hash
9f0be1d8a84b3077e23ec96921b1bea5815adb0a
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
229
          'msg' => array('admin_removed', htmlspecialchars($username))
Open commit View diff
229 'msg' => array('admin_removed', htmlspecialchars($username))
same change 9f0be1d

[Web] Fix require_once to always include document root

Full commit hash
9f0be1d8a84b3077e23ec96921b1bea5815adb0a
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
230
        );
Open commit View diff
230 );
same change 9f0be1d

[Web] Fix require_once to always include document root

Full commit hash
9f0be1d8a84b3077e23ec96921b1bea5815adb0a
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
231
      }
Open commit View diff
231 }
same change 9f0be1d

[Web] Fix require_once to always include document root

Full commit hash
9f0be1d8a84b3077e23ec96921b1bea5815adb0a
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
232
    break;
Open commit View diff
232 break;
same change 9f0be1d

[Web] Fix require_once to always include document root

Full commit hash
9f0be1d8a84b3077e23ec96921b1bea5815adb0a
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
233
    case 'get':
Open commit View diff
233 case 'get':
same change 9f0be1d

[Web] Fix require_once to always include document root

Full commit hash
9f0be1d8a84b3077e23ec96921b1bea5815adb0a
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
234
      $admins = array();
Open commit View diff
234 $admins = array();
same change 9f0be1d

[Web] Fix require_once to always include document root

Full commit hash
9f0be1d8a84b3077e23ec96921b1bea5815adb0a
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
235
      $stmt = $pdo->query("SELECT `username` FROM `admin` WHERE `superadmin` = '1'");
Open commit View diff
235 $stmt = $pdo->query("SELECT `username` FROM `admin` WHERE `superadmin` = '1'");
same change 9f0be1d

[Web] Fix require_once to always include document root

Full commit hash
9f0be1d8a84b3077e23ec96921b1bea5815adb0a
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
236
      $rows = $stmt->fetchAll(PDO::FETCH_ASSOC);
Open commit View diff
236 $rows = $stmt->fetchAll(PDO::FETCH_ASSOC);
same change 9f0be1d

[Web] Fix require_once to always include document root

Full commit hash
9f0be1d8a84b3077e23ec96921b1bea5815adb0a
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
237
      while ($row = array_shift($rows)) {
Open commit View diff
237 while ($row = array_shift($rows)) {
same change 9f0be1d

[Web] Fix require_once to always include document root

Full commit hash
9f0be1d8a84b3077e23ec96921b1bea5815adb0a
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
238
        $admins[] = $row['username'];
Open commit View diff
238 $admins[] = $row['username'];
same change 9f0be1d

[Web] Fix require_once to always include document root

Full commit hash
9f0be1d8a84b3077e23ec96921b1bea5815adb0a
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
239
      }
Open commit View diff
239 }
same change 9f0be1d

[Web] Fix require_once to always include document root

Full commit hash
9f0be1d8a84b3077e23ec96921b1bea5815adb0a
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
240
      return $admins;
Open commit View diff
240 return $admins;
same change 9f0be1d

[Web] Fix require_once to always include document root

Full commit hash
9f0be1d8a84b3077e23ec96921b1bea5815adb0a
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
241
    break;
Open commit View diff
241 break;
same change 9f0be1d

[Web] Fix require_once to always include document root

Full commit hash
9f0be1d8a84b3077e23ec96921b1bea5815adb0a
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
242
    case 'details':
Open commit View diff
242 case 'details':
same change 9f0be1d

[Web] Fix require_once to always include document root

Full commit hash
9f0be1d8a84b3077e23ec96921b1bea5815adb0a
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
243
      $admindata = array();
Open commit View diff
243 $admindata = array();
same change 9f0be1d

[Web] Fix require_once to always include document root

Full commit hash
9f0be1d8a84b3077e23ec96921b1bea5815adb0a
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
244
      $stmt = $pdo->prepare("SELECT
Open commit View diff
244 $stmt = $pdo->prepare("SELECT
andryyy almost 6 years ago d9b91fc

[Web] Important: Removed unnecessary *_int attributes from GET elements, _only_ returning int values now (same for all attributes which were provided as html char and int)

Full commit hash
d9b91fc04f286eaba4266ca60254a02dc5e91867
Author
andryyy <[email protected]>
Date
almost 6 years ago
Selected line
245
        `tfa`.`active` AS `tfa_active`,
Open commit View diff
245 `tfa`.`active` AS `tfa_active`,
André almost 8 years ago 9f0be1d

[Web] Fix require_once to always include document root

Full commit hash
9f0be1d8a84b3077e23ec96921b1bea5815adb0a
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
246
        `admin`.`username`,
Open commit View diff
246 `admin`.`username`,
same change 9f0be1d

[Web] Fix require_once to always include document root

Full commit hash
9f0be1d8a84b3077e23ec96921b1bea5815adb0a
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
247
        `admin`.`created`,
Open commit View diff
247 `admin`.`created`,
FreddleSpl0it 5 months ago ad5b94a

[Web] Add forced 2FA setup and password update enforcement

Full commit hash
ad5b94af5e48297631629c2a118e7f163a044a07
Author
FreddleSpl0it <[email protected]>
Date
5 months ago
Selected line
248
        `admin`.`active` AS `active`,
Open commit View diff
248 `admin`.`active` AS `active`,
same change ad5b94a

[Web] Add forced 2FA setup and password update enforcement

Full commit hash
ad5b94af5e48297631629c2a118e7f163a044a07
Author
FreddleSpl0it <[email protected]>
Date
5 months ago
Selected line
249
        `admin`.`attributes` AS `attributes`
Open commit View diff
249 `admin`.`attributes` AS `attributes`
André almost 8 years ago 9f0be1d

[Web] Fix require_once to always include document root

Full commit hash
9f0be1d8a84b3077e23ec96921b1bea5815adb0a
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
250
          FROM `admin`
Open commit View diff
250 FROM `admin`
same change 9f0be1d

[Web] Fix require_once to always include document root

Full commit hash
9f0be1d8a84b3077e23ec96921b1bea5815adb0a
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
251
          LEFT OUTER JOIN `tfa` ON `tfa`.`username`=`admin`.`username`
Open commit View diff
251 LEFT OUTER JOIN `tfa` ON `tfa`.`username`=`admin`.`username`
same change 9f0be1d

[Web] Fix require_once to always include document root

Full commit hash
9f0be1d8a84b3077e23ec96921b1bea5815adb0a
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
252
            WHERE `admin`.`username`= :admin AND `superadmin` = '1'");
Open commit View diff
252 WHERE `admin`.`username`= :admin AND `superadmin` = '1'");
same change 9f0be1d

[Web] Fix require_once to always include document root

Full commit hash
9f0be1d8a84b3077e23ec96921b1bea5815adb0a
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
253
      $stmt->execute(array(
Open commit View diff
253 $stmt->execute(array(
same change 9f0be1d

[Web] Fix require_once to always include document root

Full commit hash
9f0be1d8a84b3077e23ec96921b1bea5815adb0a
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
254
        ':admin' => $_data
Open commit View diff
254 ':admin' => $_data
same change 9f0be1d

[Web] Fix require_once to always include document root

Full commit hash
9f0be1d8a84b3077e23ec96921b1bea5815adb0a
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
255
      ));
Open commit View diff
255 ));
same change 9f0be1d

[Web] Fix require_once to always include document root

Full commit hash
9f0be1d8a84b3077e23ec96921b1bea5815adb0a
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
256
      $row = $stmt->fetch(PDO::FETCH_ASSOC);
Open commit View diff
256 $row = $stmt->fetch(PDO::FETCH_ASSOC);
Max over 6 years ago 852392f

Fix missing username in username_invalid message (#3135)

Full commit hash
852392fd150819f1e99f364fa47c82e3012b1710
Author
Max <[email protected]>
Date
over 6 years ago
Selected line
257
      if (empty($row)) {
Open commit View diff
257 if (empty($row)) {
André almost 8 years ago 9f0be1d

[Web] Fix require_once to always include document root

Full commit hash
9f0be1d8a84b3077e23ec96921b1bea5815adb0a
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
258
        return false;
Open commit View diff
258 return false;
same change 9f0be1d

[Web] Fix require_once to always include document root

Full commit hash
9f0be1d8a84b3077e23ec96921b1bea5815adb0a
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
259
      }
Open commit View diff
259 }
same change 9f0be1d

[Web] Fix require_once to always include document root

Full commit hash
9f0be1d8a84b3077e23ec96921b1bea5815adb0a
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
260
      $admindata['username'] = $row['username'];
Open commit View diff
260 $admindata['username'] = $row['username'];
andryyy almost 6 years ago d9b91fc

[Web] Important: Removed unnecessary *_int attributes from GET elements, _only_ returning int values now (same for all attributes which were provided as html char and int)

Full commit hash
d9b91fc04f286eaba4266ca60254a02dc5e91867
Author
andryyy <[email protected]>
Date
almost 6 years ago
Selected line
261
      $admindata['tfa_active'] = (is_null($row['tfa_active'])) ? 0 : $row['tfa_active'];
Open commit View diff
261 $admindata['tfa_active'] = (is_null($row['tfa_active'])) ? 0 : $row['tfa_active'];
andryyy almost 6 years ago d5c22de

[Web] Compatibility: Re-add _int vars

Full commit hash
d5c22de9b3b47c015cfec18e25198796ae487aec
Author
andryyy <[email protected]>
Date
almost 6 years ago
Selected line
262
      $admindata['tfa_active_int'] = (is_null($row['tfa_active'])) ? 0 : $row['tfa_active'];
Open commit View diff
262 $admindata['tfa_active_int'] = (is_null($row['tfa_active'])) ? 0 : $row['tfa_active'];
André almost 8 years ago 9f0be1d

[Web] Fix require_once to always include document root

Full commit hash
9f0be1d8a84b3077e23ec96921b1bea5815adb0a
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
263
      $admindata['active'] = $row['active'];
Open commit View diff
263 $admindata['active'] = $row['active'];
andryyy almost 6 years ago d5c22de

[Web] Compatibility: Re-add _int vars

Full commit hash
d5c22de9b3b47c015cfec18e25198796ae487aec
Author
andryyy <[email protected]>
Date
almost 6 years ago
Selected line
264
      $admindata['active_int'] = $row['active'];
Open commit View diff
264 $admindata['active_int'] = $row['active'];
André almost 8 years ago 9f0be1d

[Web] Fix require_once to always include document root

Full commit hash
9f0be1d8a84b3077e23ec96921b1bea5815adb0a
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
265
      $admindata['created'] = $row['created'];
Open commit View diff
265 $admindata['created'] = $row['created'];
FreddleSpl0it 5 months ago ad5b94a

[Web] Add forced 2FA setup and password update enforcement

Full commit hash
ad5b94af5e48297631629c2a118e7f163a044a07
Author
FreddleSpl0it <[email protected]>
Date
5 months ago
Selected line
266
      $admindata['attributes'] = json_decode($row['attributes'], true) ?? array('force_tfa' => '0', 'force_pw_update' => '0');
Open commit View diff
266 $admindata['attributes'] = json_decode($row['attributes'], true) ?? array('force_tfa' => '0', 'force_pw_update' => '0');
André almost 8 years ago 9f0be1d

[Web] Fix require_once to always include document root

Full commit hash
9f0be1d8a84b3077e23ec96921b1bea5815adb0a
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
267
      return $admindata;
Open commit View diff
267 return $admindata;
same change 9f0be1d

[Web] Fix require_once to always include document root

Full commit hash
9f0be1d8a84b3077e23ec96921b1bea5815adb0a
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
268
    break;
Open commit View diff
268 break;
same change 9f0be1d

[Web] Fix require_once to always include document root

Full commit hash
9f0be1d8a84b3077e23ec96921b1bea5815adb0a
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
269
  }
Open commit View diff
269 }
same change 9f0be1d

[Web] Fix require_once to always include document root

Full commit hash
9f0be1d8a84b3077e23ec96921b1bea5815adb0a
Author
André <[email protected]>
Date
almost 8 years ago
Selected line
270
}
Open commit View diff
270 }