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.rspamd.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.rspamd.inc.php on main
Author Date Commit Line Code
andryyy over 6 years ago b52ee0a

[Rspamd] Fix map permissions for www

Full commit hash
b52ee0a706f1b4d0fb7989c8805623d2c842ea47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
1
<?php
Open commit View diff
1 <?php
same change b52ee0a

[Rspamd] Fix map permissions for www

Full commit hash
b52ee0a706f1b4d0fb7989c8805623d2c842ea47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
2
function rsettings($_action, $_data = null) {
Open commit View diff
2 function rsettings($_action, $_data = null) {
same change b52ee0a

[Rspamd] Fix map permissions for www

Full commit hash
b52ee0a706f1b4d0fb7989c8805623d2c842ea47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
3
	global $pdo;
Open commit View diff
3 global $pdo;
same change b52ee0a

[Rspamd] Fix map permissions for www

Full commit hash
b52ee0a706f1b4d0fb7989c8805623d2c842ea47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
4
	global $lang;
Open commit View diff
4 global $lang;
same change b52ee0a

[Rspamd] Fix map permissions for www

Full commit hash
b52ee0a706f1b4d0fb7989c8805623d2c842ea47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
5
  $_data_log = $_data;
Open commit View diff
5 $_data_log = $_data;
same change b52ee0a

[Rspamd] Fix map permissions for www

Full commit hash
b52ee0a706f1b4d0fb7989c8805623d2c842ea47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
6
  switch ($_action) {
Open commit View diff
6 switch ($_action) {
same change b52ee0a

[Rspamd] Fix map permissions for www

Full commit hash
b52ee0a706f1b4d0fb7989c8805623d2c842ea47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
7
    case 'add':
Open commit View diff
7 case 'add':
same change b52ee0a

[Rspamd] Fix map permissions for www

Full commit hash
b52ee0a706f1b4d0fb7989c8805623d2c842ea47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
8
      if ($_SESSION['mailcow_cc_role'] != "admin") {
Open commit View diff
8 if ($_SESSION['mailcow_cc_role'] != "admin") {
same change b52ee0a

[Rspamd] Fix map permissions for www

Full commit hash
b52ee0a706f1b4d0fb7989c8805623d2c842ea47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
9
        $_SESSION['return'][] = array(
Open commit View diff
9 $_SESSION['return'][] = array(
same change b52ee0a

[Rspamd] Fix map permissions for www

Full commit hash
b52ee0a706f1b4d0fb7989c8805623d2c842ea47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
10
          'type' => 'danger',
Open commit View diff
10 'type' => 'danger',
same change b52ee0a

[Rspamd] Fix map permissions for www

Full commit hash
b52ee0a706f1b4d0fb7989c8805623d2c842ea47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
11
          'log' => array(__FUNCTION__, $_action, $_data_log),
Open commit View diff
11 'log' => array(__FUNCTION__, $_action, $_data_log),
same change b52ee0a

[Rspamd] Fix map permissions for www

Full commit hash
b52ee0a706f1b4d0fb7989c8805623d2c842ea47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
12
          'msg' => 'access_denied'
Open commit View diff
12 'msg' => 'access_denied'
same change b52ee0a

[Rspamd] Fix map permissions for www

Full commit hash
b52ee0a706f1b4d0fb7989c8805623d2c842ea47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
13
        );
Open commit View diff
13 );
same change b52ee0a

[Rspamd] Fix map permissions for www

Full commit hash
b52ee0a706f1b4d0fb7989c8805623d2c842ea47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
14
        return false;
Open commit View diff
14 return false;
same change b52ee0a

[Rspamd] Fix map permissions for www

Full commit hash
b52ee0a706f1b4d0fb7989c8805623d2c842ea47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
15
      }
Open commit View diff
15 }
same change b52ee0a

[Rspamd] Fix map permissions for www

Full commit hash
b52ee0a706f1b4d0fb7989c8805623d2c842ea47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
16
      $content = $_data['content'];
Open commit View diff
16 $content = $_data['content'];
same change b52ee0a

[Rspamd] Fix map permissions for www

Full commit hash
b52ee0a706f1b4d0fb7989c8805623d2c842ea47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
17
      $desc = $_data['desc'];
Open commit View diff
17 $desc = $_data['desc'];
same change b52ee0a

[Rspamd] Fix map permissions for www

Full commit hash
b52ee0a706f1b4d0fb7989c8805623d2c842ea47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
18
      $active = intval($_data['active']);
Open commit View diff
18 $active = intval($_data['active']);
same change b52ee0a

[Rspamd] Fix map permissions for www

Full commit hash
b52ee0a706f1b4d0fb7989c8805623d2c842ea47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
19
      if (empty($content)) {
Open commit View diff
19 if (empty($content)) {
same change b52ee0a

[Rspamd] Fix map permissions for www

Full commit hash
b52ee0a706f1b4d0fb7989c8805623d2c842ea47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
20
        $_SESSION['return'][] = array(
Open commit View diff
20 $_SESSION['return'][] = array(
same change b52ee0a

[Rspamd] Fix map permissions for www

Full commit hash
b52ee0a706f1b4d0fb7989c8805623d2c842ea47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
21
          'type' => 'danger',
Open commit View diff
21 'type' => 'danger',
same change b52ee0a

[Rspamd] Fix map permissions for www

Full commit hash
b52ee0a706f1b4d0fb7989c8805623d2c842ea47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
22
          'log' => array(__FUNCTION__, $_action, $_data_log),
Open commit View diff
22 'log' => array(__FUNCTION__, $_action, $_data_log),
same change b52ee0a

[Rspamd] Fix map permissions for www

Full commit hash
b52ee0a706f1b4d0fb7989c8805623d2c842ea47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
23
          'msg' => 'map_content_empty'
Open commit View diff
23 'msg' => 'map_content_empty'
same change b52ee0a

[Rspamd] Fix map permissions for www

Full commit hash
b52ee0a706f1b4d0fb7989c8805623d2c842ea47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
24
        );
Open commit View diff
24 );
same change b52ee0a

[Rspamd] Fix map permissions for www

Full commit hash
b52ee0a706f1b4d0fb7989c8805623d2c842ea47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
25
        return false;
Open commit View diff
25 return false;
same change b52ee0a

[Rspamd] Fix map permissions for www

Full commit hash
b52ee0a706f1b4d0fb7989c8805623d2c842ea47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
26
      }
Open commit View diff
26 }
andryyy over 5 years ago 8d05d4a

[Web] Cleanup Rspamd, other fixes

Full commit hash
8d05d4a51d8fb80dd5328c8137bbe34386b45b61
Author
andryyy <[email protected]>
Date
over 5 years ago
Selected line
27
      $stmt = $pdo->prepare("INSERT INTO `settingsmap` (`content`, `desc`, `active`)
Open commit View diff
27 $stmt = $pdo->prepare("INSERT INTO `settingsmap` (`content`, `desc`, `active`)
same change 8d05d4a

[Web] Cleanup Rspamd, other fixes

Full commit hash
8d05d4a51d8fb80dd5328c8137bbe34386b45b61
Author
andryyy <[email protected]>
Date
over 5 years ago
Selected line
28
        VALUES (:content, :desc, :active)");
Open commit View diff
28 VALUES (:content, :desc, :active)");
same change 8d05d4a

[Web] Cleanup Rspamd, other fixes

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

[Web] Cleanup Rspamd, other fixes

Full commit hash
8d05d4a51d8fb80dd5328c8137bbe34386b45b61
Author
andryyy <[email protected]>
Date
over 5 years ago
Selected line
30
        ':content' => $content,
Open commit View diff
30 ':content' => $content,
same change 8d05d4a

[Web] Cleanup Rspamd, other fixes

Full commit hash
8d05d4a51d8fb80dd5328c8137bbe34386b45b61
Author
andryyy <[email protected]>
Date
over 5 years ago
Selected line
31
        ':desc' => $desc,
Open commit View diff
31 ':desc' => $desc,
same change 8d05d4a

[Web] Cleanup Rspamd, other fixes

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

[Web] Cleanup Rspamd, other fixes

Full commit hash
8d05d4a51d8fb80dd5328c8137bbe34386b45b61
Author
andryyy <[email protected]>
Date
over 5 years ago
Selected line
33
      ));
Open commit View diff
33 ));
andryyy over 6 years ago b52ee0a

[Rspamd] Fix map permissions for www

Full commit hash
b52ee0a706f1b4d0fb7989c8805623d2c842ea47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
34
      $_SESSION['return'][] = array(
Open commit View diff
34 $_SESSION['return'][] = array(
same change b52ee0a

[Rspamd] Fix map permissions for www

Full commit hash
b52ee0a706f1b4d0fb7989c8805623d2c842ea47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
35
        'type' => 'success',
Open commit View diff
35 'type' => 'success',
same change b52ee0a

[Rspamd] Fix map permissions for www

Full commit hash
b52ee0a706f1b4d0fb7989c8805623d2c842ea47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
36
        'log' => array(__FUNCTION__, $_action, $_data_log),
Open commit View diff
36 'log' => array(__FUNCTION__, $_action, $_data_log),
same change b52ee0a

[Rspamd] Fix map permissions for www

Full commit hash
b52ee0a706f1b4d0fb7989c8805623d2c842ea47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
37
        'msg' => 'settings_map_added'
Open commit View diff
37 'msg' => 'settings_map_added'
same change b52ee0a

[Rspamd] Fix map permissions for www

Full commit hash
b52ee0a706f1b4d0fb7989c8805623d2c842ea47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
38
      );
Open commit View diff
38 );
same change b52ee0a

[Rspamd] Fix map permissions for www

Full commit hash
b52ee0a706f1b4d0fb7989c8805623d2c842ea47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
39
    break;
Open commit View diff
39 break;
same change b52ee0a

[Rspamd] Fix map permissions for www

Full commit hash
b52ee0a706f1b4d0fb7989c8805623d2c842ea47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
40
    case 'edit':
Open commit View diff
40 case 'edit':
same change b52ee0a

[Rspamd] Fix map permissions for www

Full commit hash
b52ee0a706f1b4d0fb7989c8805623d2c842ea47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
41
      if ($_SESSION['mailcow_cc_role'] != "admin") {
Open commit View diff
41 if ($_SESSION['mailcow_cc_role'] != "admin") {
same change b52ee0a

[Rspamd] Fix map permissions for www

Full commit hash
b52ee0a706f1b4d0fb7989c8805623d2c842ea47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
42
        $_SESSION['return'][] = array(
Open commit View diff
42 $_SESSION['return'][] = array(
same change b52ee0a

[Rspamd] Fix map permissions for www

Full commit hash
b52ee0a706f1b4d0fb7989c8805623d2c842ea47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
43
          'type' => 'danger',
Open commit View diff
43 'type' => 'danger',
same change b52ee0a

[Rspamd] Fix map permissions for www

Full commit hash
b52ee0a706f1b4d0fb7989c8805623d2c842ea47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
44
          'log' => array(__FUNCTION__, $_action, $_data_log),
Open commit View diff
44 'log' => array(__FUNCTION__, $_action, $_data_log),
same change b52ee0a

[Rspamd] Fix map permissions for www

Full commit hash
b52ee0a706f1b4d0fb7989c8805623d2c842ea47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
45
          'msg' => 'access_denied'
Open commit View diff
45 'msg' => 'access_denied'
same change b52ee0a

[Rspamd] Fix map permissions for www

Full commit hash
b52ee0a706f1b4d0fb7989c8805623d2c842ea47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
46
        );
Open commit View diff
46 );
same change b52ee0a

[Rspamd] Fix map permissions for www

Full commit hash
b52ee0a706f1b4d0fb7989c8805623d2c842ea47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
47
        return false;
Open commit View diff
47 return false;
same change b52ee0a

[Rspamd] Fix map permissions for www

Full commit hash
b52ee0a706f1b4d0fb7989c8805623d2c842ea47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
48
      }
Open commit View diff
48 }
same change b52ee0a

[Rspamd] Fix map permissions for www

Full commit hash
b52ee0a706f1b4d0fb7989c8805623d2c842ea47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
49
      $ids = (array)$_data['id'];
Open commit View diff
49 $ids = (array)$_data['id'];
same change b52ee0a

[Rspamd] Fix map permissions for www

Full commit hash
b52ee0a706f1b4d0fb7989c8805623d2c842ea47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
50
      foreach ($ids as $id) {
Open commit View diff
50 foreach ($ids as $id) {
same change b52ee0a

[Rspamd] Fix map permissions for www

Full commit hash
b52ee0a706f1b4d0fb7989c8805623d2c842ea47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
51
        $is_now = rsettings('details', $id);
Open commit View diff
51 $is_now = rsettings('details', $id);
same change b52ee0a

[Rspamd] Fix map permissions for www

Full commit hash
b52ee0a706f1b4d0fb7989c8805623d2c842ea47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
52
        if (!empty($is_now)) {
Open commit View diff
52 if (!empty($is_now)) {
same change b52ee0a

[Rspamd] Fix map permissions for www

Full commit hash
b52ee0a706f1b4d0fb7989c8805623d2c842ea47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
53
          $content = (!empty($_data['content'])) ? $_data['content'] : $is_now['content'];
Open commit View diff
53 $content = (!empty($_data['content'])) ? $_data['content'] : $is_now['content'];
same change b52ee0a

[Rspamd] Fix map permissions for www

Full commit hash
b52ee0a706f1b4d0fb7989c8805623d2c842ea47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
54
          $desc = (!empty($_data['desc'])) ? $_data['desc'] : $is_now['desc'];
Open commit View diff
54 $desc = (!empty($_data['desc'])) ? $_data['desc'] : $is_now['desc'];
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
55
          $active = (isset($_data['active'])) ? intval($_data['active']) : $is_now['active'];
Open commit View diff
55 $active = (isset($_data['active'])) ? intval($_data['active']) : $is_now['active'];
andryyy over 6 years ago b52ee0a

[Rspamd] Fix map permissions for www

Full commit hash
b52ee0a706f1b4d0fb7989c8805623d2c842ea47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
56
        }
Open commit View diff
56 }
same change b52ee0a

[Rspamd] Fix map permissions for www

Full commit hash
b52ee0a706f1b4d0fb7989c8805623d2c842ea47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
57
        else {
Open commit View diff
57 else {
same change b52ee0a

[Rspamd] Fix map permissions for www

Full commit hash
b52ee0a706f1b4d0fb7989c8805623d2c842ea47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
58
          $_SESSION['return'][] = array(
Open commit View diff
58 $_SESSION['return'][] = array(
same change b52ee0a

[Rspamd] Fix map permissions for www

Full commit hash
b52ee0a706f1b4d0fb7989c8805623d2c842ea47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
59
            'type' => 'danger',
Open commit View diff
59 'type' => 'danger',
same change b52ee0a

[Rspamd] Fix map permissions for www

Full commit hash
b52ee0a706f1b4d0fb7989c8805623d2c842ea47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
60
            'log' => array(__FUNCTION__, $_action, $_data_log),
Open commit View diff
60 'log' => array(__FUNCTION__, $_action, $_data_log),
same change b52ee0a

[Rspamd] Fix map permissions for www

Full commit hash
b52ee0a706f1b4d0fb7989c8805623d2c842ea47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
61
            'msg' => array('settings_map_invalid', $id)
Open commit View diff
61 'msg' => array('settings_map_invalid', $id)
same change b52ee0a

[Rspamd] Fix map permissions for www

Full commit hash
b52ee0a706f1b4d0fb7989c8805623d2c842ea47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
62
          );
Open commit View diff
62 );
same change b52ee0a

[Rspamd] Fix map permissions for www

Full commit hash
b52ee0a706f1b4d0fb7989c8805623d2c842ea47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
63
          continue;
Open commit View diff
63 continue;
same change b52ee0a

[Rspamd] Fix map permissions for www

Full commit hash
b52ee0a706f1b4d0fb7989c8805623d2c842ea47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
64
        }
Open commit View diff
64 }
same change b52ee0a

[Rspamd] Fix map permissions for www

Full commit hash
b52ee0a706f1b4d0fb7989c8805623d2c842ea47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
65
        $content = trim($content);
Open commit View diff
65 $content = trim($content);
andryyy over 5 years ago 8d05d4a

[Web] Cleanup Rspamd, other fixes

Full commit hash
8d05d4a51d8fb80dd5328c8137bbe34386b45b61
Author
andryyy <[email protected]>
Date
over 5 years ago
Selected line
66
        $stmt = $pdo->prepare("UPDATE `settingsmap` SET
Open commit View diff
66 $stmt = $pdo->prepare("UPDATE `settingsmap` SET
same change 8d05d4a

[Web] Cleanup Rspamd, other fixes

Full commit hash
8d05d4a51d8fb80dd5328c8137bbe34386b45b61
Author
andryyy <[email protected]>
Date
over 5 years ago
Selected line
67
          `content` = :content,
Open commit View diff
67 `content` = :content,
same change 8d05d4a

[Web] Cleanup Rspamd, other fixes

Full commit hash
8d05d4a51d8fb80dd5328c8137bbe34386b45b61
Author
andryyy <[email protected]>
Date
over 5 years ago
Selected line
68
          `desc` = :desc,
Open commit View diff
68 `desc` = :desc,
same change 8d05d4a

[Web] Cleanup Rspamd, other fixes

Full commit hash
8d05d4a51d8fb80dd5328c8137bbe34386b45b61
Author
andryyy <[email protected]>
Date
over 5 years ago
Selected line
69
          `active` = :active
Open commit View diff
69 `active` = :active
same change 8d05d4a

[Web] Cleanup Rspamd, other fixes

Full commit hash
8d05d4a51d8fb80dd5328c8137bbe34386b45b61
Author
andryyy <[email protected]>
Date
over 5 years ago
Selected line
70
            WHERE `id` = :id");
Open commit View diff
70 WHERE `id` = :id");
same change 8d05d4a

[Web] Cleanup Rspamd, other fixes

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

[Web] Cleanup Rspamd, other fixes

Full commit hash
8d05d4a51d8fb80dd5328c8137bbe34386b45b61
Author
andryyy <[email protected]>
Date
over 5 years ago
Selected line
72
          ':content' => $content,
Open commit View diff
72 ':content' => $content,
same change 8d05d4a

[Web] Cleanup Rspamd, other fixes

Full commit hash
8d05d4a51d8fb80dd5328c8137bbe34386b45b61
Author
andryyy <[email protected]>
Date
over 5 years ago
Selected line
73
          ':desc' => $desc,
Open commit View diff
73 ':desc' => $desc,
same change 8d05d4a

[Web] Cleanup Rspamd, other fixes

Full commit hash
8d05d4a51d8fb80dd5328c8137bbe34386b45b61
Author
andryyy <[email protected]>
Date
over 5 years ago
Selected line
74
          ':active' => $active,
Open commit View diff
74 ':active' => $active,
same change 8d05d4a

[Web] Cleanup Rspamd, other fixes

Full commit hash
8d05d4a51d8fb80dd5328c8137bbe34386b45b61
Author
andryyy <[email protected]>
Date
over 5 years ago
Selected line
75
          ':id' => $id
Open commit View diff
75 ':id' => $id
same change 8d05d4a

[Web] Cleanup Rspamd, other fixes

Full commit hash
8d05d4a51d8fb80dd5328c8137bbe34386b45b61
Author
andryyy <[email protected]>
Date
over 5 years ago
Selected line
76
        ));
Open commit View diff
76 ));
andryyy over 6 years ago b52ee0a

[Rspamd] Fix map permissions for www

Full commit hash
b52ee0a706f1b4d0fb7989c8805623d2c842ea47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
77
        $_SESSION['return'][] = array(
Open commit View diff
77 $_SESSION['return'][] = array(
same change b52ee0a

[Rspamd] Fix map permissions for www

Full commit hash
b52ee0a706f1b4d0fb7989c8805623d2c842ea47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
78
          'type' => 'success',
Open commit View diff
78 'type' => 'success',
same change b52ee0a

[Rspamd] Fix map permissions for www

Full commit hash
b52ee0a706f1b4d0fb7989c8805623d2c842ea47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
79
          'log' => array(__FUNCTION__, $_action, $_data_log),
Open commit View diff
79 'log' => array(__FUNCTION__, $_action, $_data_log),
Kristian Feldsam almost 5 years ago 0d53df3

[Web] PHP8 fix, fixes #4259 (#4261)

Full commit hash
0d53df3a4de01602e646c8230beac058bec3cc3f
Author
Kristian Feldsam <[email protected]>
Date
almost 5 years ago
Selected line
80
          'msg' => array('object_modified', htmlspecialchars(implode(',', $ids)))
Open commit View diff
80 'msg' => array('object_modified', htmlspecialchars(implode(',', $ids)))
andryyy over 6 years ago b52ee0a

[Rspamd] Fix map permissions for www

Full commit hash
b52ee0a706f1b4d0fb7989c8805623d2c842ea47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
81
        );
Open commit View diff
81 );
same change b52ee0a

[Rspamd] Fix map permissions for www

Full commit hash
b52ee0a706f1b4d0fb7989c8805623d2c842ea47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
82
      }
Open commit View diff
82 }
same change b52ee0a

[Rspamd] Fix map permissions for www

Full commit hash
b52ee0a706f1b4d0fb7989c8805623d2c842ea47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
83
    break;
Open commit View diff
83 break;
same change b52ee0a

[Rspamd] Fix map permissions for www

Full commit hash
b52ee0a706f1b4d0fb7989c8805623d2c842ea47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
84
    case 'delete':
Open commit View diff
84 case 'delete':
same change b52ee0a

[Rspamd] Fix map permissions for www

Full commit hash
b52ee0a706f1b4d0fb7989c8805623d2c842ea47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
85
      if ($_SESSION['mailcow_cc_role'] != "admin") {
Open commit View diff
85 if ($_SESSION['mailcow_cc_role'] != "admin") {
same change b52ee0a

[Rspamd] Fix map permissions for www

Full commit hash
b52ee0a706f1b4d0fb7989c8805623d2c842ea47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
86
        $_SESSION['return'][] = array(
Open commit View diff
86 $_SESSION['return'][] = array(
same change b52ee0a

[Rspamd] Fix map permissions for www

Full commit hash
b52ee0a706f1b4d0fb7989c8805623d2c842ea47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
87
          'type' => 'danger',
Open commit View diff
87 'type' => 'danger',
same change b52ee0a

[Rspamd] Fix map permissions for www

Full commit hash
b52ee0a706f1b4d0fb7989c8805623d2c842ea47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
88
          'log' => array(__FUNCTION__, $_action, $_data_log),
Open commit View diff
88 'log' => array(__FUNCTION__, $_action, $_data_log),
same change b52ee0a

[Rspamd] Fix map permissions for www

Full commit hash
b52ee0a706f1b4d0fb7989c8805623d2c842ea47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
89
          'msg' => 'access_denied'
Open commit View diff
89 'msg' => 'access_denied'
same change b52ee0a

[Rspamd] Fix map permissions for www

Full commit hash
b52ee0a706f1b4d0fb7989c8805623d2c842ea47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
90
        );
Open commit View diff
90 );
same change b52ee0a

[Rspamd] Fix map permissions for www

Full commit hash
b52ee0a706f1b4d0fb7989c8805623d2c842ea47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
91
        return false;
Open commit View diff
91 return false;
same change b52ee0a

[Rspamd] Fix map permissions for www

Full commit hash
b52ee0a706f1b4d0fb7989c8805623d2c842ea47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
92
      }
Open commit View diff
92 }
same change b52ee0a

[Rspamd] Fix map permissions for www

Full commit hash
b52ee0a706f1b4d0fb7989c8805623d2c842ea47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
93
      $ids = (array)$_data['id'];
Open commit View diff
93 $ids = (array)$_data['id'];
same change b52ee0a

[Rspamd] Fix map permissions for www

Full commit hash
b52ee0a706f1b4d0fb7989c8805623d2c842ea47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
94
      foreach ($ids as $id) {
Open commit View diff
94 foreach ($ids as $id) {
andryyy over 5 years ago 8d05d4a

[Web] Cleanup Rspamd, other fixes

Full commit hash
8d05d4a51d8fb80dd5328c8137bbe34386b45b61
Author
andryyy <[email protected]>
Date
over 5 years ago
Selected line
95
        $stmt = $pdo->prepare("DELETE FROM `settingsmap` WHERE `id`= :id");
Open commit View diff
95 $stmt = $pdo->prepare("DELETE FROM `settingsmap` WHERE `id`= :id");
same change 8d05d4a

[Web] Cleanup Rspamd, other fixes

Full commit hash
8d05d4a51d8fb80dd5328c8137bbe34386b45b61
Author
andryyy <[email protected]>
Date
over 5 years ago
Selected line
96
        $stmt->execute(array(':id' => $id));
Open commit View diff
96 $stmt->execute(array(':id' => $id));
andryyy over 6 years ago b52ee0a

[Rspamd] Fix map permissions for www

Full commit hash
b52ee0a706f1b4d0fb7989c8805623d2c842ea47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
97
        $_SESSION['return'][] = array(
Open commit View diff
97 $_SESSION['return'][] = array(
same change b52ee0a

[Rspamd] Fix map permissions for www

Full commit hash
b52ee0a706f1b4d0fb7989c8805623d2c842ea47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
98
          'type' => 'success',
Open commit View diff
98 'type' => 'success',
same change b52ee0a

[Rspamd] Fix map permissions for www

Full commit hash
b52ee0a706f1b4d0fb7989c8805623d2c842ea47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
99
          'log' => array(__FUNCTION__, $_action, $_data_log),
Open commit View diff
99 'log' => array(__FUNCTION__, $_action, $_data_log),
same change b52ee0a

[Rspamd] Fix map permissions for www

Full commit hash
b52ee0a706f1b4d0fb7989c8805623d2c842ea47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
100
          'msg' => array('settings_map_removed', htmlspecialchars($id))
Open commit View diff
100 'msg' => array('settings_map_removed', htmlspecialchars($id))
same change b52ee0a

[Rspamd] Fix map permissions for www

Full commit hash
b52ee0a706f1b4d0fb7989c8805623d2c842ea47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
101
        );
Open commit View diff
101 );
same change b52ee0a

[Rspamd] Fix map permissions for www

Full commit hash
b52ee0a706f1b4d0fb7989c8805623d2c842ea47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
102
      }
Open commit View diff
102 }
same change b52ee0a

[Rspamd] Fix map permissions for www

Full commit hash
b52ee0a706f1b4d0fb7989c8805623d2c842ea47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
103
    break;
Open commit View diff
103 break;
same change b52ee0a

[Rspamd] Fix map permissions for www

Full commit hash
b52ee0a706f1b4d0fb7989c8805623d2c842ea47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
104
    case 'get':
Open commit View diff
104 case 'get':
same change b52ee0a

[Rspamd] Fix map permissions for www

Full commit hash
b52ee0a706f1b4d0fb7989c8805623d2c842ea47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
105
      if ($_SESSION['mailcow_cc_role'] != "admin") {
Open commit View diff
105 if ($_SESSION['mailcow_cc_role'] != "admin") {
same change b52ee0a

[Rspamd] Fix map permissions for www

Full commit hash
b52ee0a706f1b4d0fb7989c8805623d2c842ea47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
106
        return false;
Open commit View diff
106 return false;
same change b52ee0a

[Rspamd] Fix map permissions for www

Full commit hash
b52ee0a706f1b4d0fb7989c8805623d2c842ea47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
107
      }
Open commit View diff
107 }
same change b52ee0a

[Rspamd] Fix map permissions for www

Full commit hash
b52ee0a706f1b4d0fb7989c8805623d2c842ea47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
108
      $settingsmaps = array();
Open commit View diff
108 $settingsmaps = array();
same change b52ee0a

[Rspamd] Fix map permissions for www

Full commit hash
b52ee0a706f1b4d0fb7989c8805623d2c842ea47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
109
      $stmt = $pdo->query("SELECT `id`, `desc`, `active` FROM `settingsmap`");
Open commit View diff
109 $stmt = $pdo->query("SELECT `id`, `desc`, `active` FROM `settingsmap`");
same change b52ee0a

[Rspamd] Fix map permissions for www

Full commit hash
b52ee0a706f1b4d0fb7989c8805623d2c842ea47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
110
      $settingsmaps = $stmt->fetchAll(PDO::FETCH_ASSOC);
Open commit View diff
110 $settingsmaps = $stmt->fetchAll(PDO::FETCH_ASSOC);
same change b52ee0a

[Rspamd] Fix map permissions for www

Full commit hash
b52ee0a706f1b4d0fb7989c8805623d2c842ea47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
111
      return $settingsmaps;
Open commit View diff
111 return $settingsmaps;
same change b52ee0a

[Rspamd] Fix map permissions for www

Full commit hash
b52ee0a706f1b4d0fb7989c8805623d2c842ea47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
112
    break;
Open commit View diff
112 break;
same change b52ee0a

[Rspamd] Fix map permissions for www

Full commit hash
b52ee0a706f1b4d0fb7989c8805623d2c842ea47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
113
    case 'details':
Open commit View diff
113 case 'details':
same change b52ee0a

[Rspamd] Fix map permissions for www

Full commit hash
b52ee0a706f1b4d0fb7989c8805623d2c842ea47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
114
      if ($_SESSION['mailcow_cc_role'] != "admin" || !isset($_data)) {
Open commit View diff
114 if ($_SESSION['mailcow_cc_role'] != "admin" || !isset($_data)) {
same change b52ee0a

[Rspamd] Fix map permissions for www

Full commit hash
b52ee0a706f1b4d0fb7989c8805623d2c842ea47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
115
        return false;
Open commit View diff
115 return false;
same change b52ee0a

[Rspamd] Fix map permissions for www

Full commit hash
b52ee0a706f1b4d0fb7989c8805623d2c842ea47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
116
      }
Open commit View diff
116 }
same change b52ee0a

[Rspamd] Fix map permissions for www

Full commit hash
b52ee0a706f1b4d0fb7989c8805623d2c842ea47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
117
      $settingsmapdata = array();
Open commit View diff
117 $settingsmapdata = array();
same change b52ee0a

[Rspamd] Fix map permissions for www

Full commit hash
b52ee0a706f1b4d0fb7989c8805623d2c842ea47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
118
      $stmt = $pdo->prepare("SELECT `id`,
Open commit View diff
118 $stmt = $pdo->prepare("SELECT `id`,
same change b52ee0a

[Rspamd] Fix map permissions for www

Full commit hash
b52ee0a706f1b4d0fb7989c8805623d2c842ea47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
119
        `desc`,
Open commit View diff
119 `desc`,
same change b52ee0a

[Rspamd] Fix map permissions for www

Full commit hash
b52ee0a706f1b4d0fb7989c8805623d2c842ea47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
120
        `content`,
Open commit View diff
120 `content`,
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
121
        `active`
Open commit View diff
121 `active`
andryyy over 6 years ago b52ee0a

[Rspamd] Fix map permissions for www

Full commit hash
b52ee0a706f1b4d0fb7989c8805623d2c842ea47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
122
          FROM `settingsmap`
Open commit View diff
122 FROM `settingsmap`
same change b52ee0a

[Rspamd] Fix map permissions for www

Full commit hash
b52ee0a706f1b4d0fb7989c8805623d2c842ea47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
123
            WHERE `id` = :id");
Open commit View diff
123 WHERE `id` = :id");
same change b52ee0a

[Rspamd] Fix map permissions for www

Full commit hash
b52ee0a706f1b4d0fb7989c8805623d2c842ea47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
124
      $stmt->execute(array(':id' => $_data));
Open commit View diff
124 $stmt->execute(array(':id' => $_data));
same change b52ee0a

[Rspamd] Fix map permissions for www

Full commit hash
b52ee0a706f1b4d0fb7989c8805623d2c842ea47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
125
      $settingsmapdata = $stmt->fetch(PDO::FETCH_ASSOC);
Open commit View diff
125 $settingsmapdata = $stmt->fetch(PDO::FETCH_ASSOC);
same change b52ee0a

[Rspamd] Fix map permissions for www

Full commit hash
b52ee0a706f1b4d0fb7989c8805623d2c842ea47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
126
      return $settingsmapdata;
Open commit View diff
126 return $settingsmapdata;
same change b52ee0a

[Rspamd] Fix map permissions for www

Full commit hash
b52ee0a706f1b4d0fb7989c8805623d2c842ea47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
127
    break;
Open commit View diff
127 break;
same change b52ee0a

[Rspamd] Fix map permissions for www

Full commit hash
b52ee0a706f1b4d0fb7989c8805623d2c842ea47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
128
  }
Open commit View diff
128 }
same change b52ee0a

[Rspamd] Fix map permissions for www

Full commit hash
b52ee0a706f1b4d0fb7989c8805623d2c842ea47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
129
}
Open commit View diff
129 }
andryyy over 5 years ago 8d05d4a

[Web] Cleanup Rspamd, other fixes

Full commit hash
8d05d4a51d8fb80dd5328c8137bbe34386b45b61
Author
andryyy <[email protected]>
Date
over 5 years ago
Selected line
130
function rspamd_maps($_action, $_data = null) {
Open commit View diff
130 function rspamd_maps($_action, $_data = null) {
andryyy over 6 years ago b52ee0a

[Rspamd] Fix map permissions for www

Full commit hash
b52ee0a706f1b4d0fb7989c8805623d2c842ea47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
131
	global $pdo;
Open commit View diff
131 global $pdo;
same change b52ee0a

[Rspamd] Fix map permissions for www

Full commit hash
b52ee0a706f1b4d0fb7989c8805623d2c842ea47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
132
	global $lang;
Open commit View diff
132 global $lang;
same change b52ee0a

[Rspamd] Fix map permissions for www

Full commit hash
b52ee0a706f1b4d0fb7989c8805623d2c842ea47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
133
	global $RSPAMD_MAPS;
Open commit View diff
133 global $RSPAMD_MAPS;
same change b52ee0a

[Rspamd] Fix map permissions for www

Full commit hash
b52ee0a706f1b4d0fb7989c8805623d2c842ea47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
134
  $_data_log = $_data;
Open commit View diff
134 $_data_log = $_data;
same change b52ee0a

[Rspamd] Fix map permissions for www

Full commit hash
b52ee0a706f1b4d0fb7989c8805623d2c842ea47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
135
  switch ($_action) {
Open commit View diff
135 switch ($_action) {
same change b52ee0a

[Rspamd] Fix map permissions for www

Full commit hash
b52ee0a706f1b4d0fb7989c8805623d2c842ea47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
136
    case 'edit':
Open commit View diff
136 case 'edit':
same change b52ee0a

[Rspamd] Fix map permissions for www

Full commit hash
b52ee0a706f1b4d0fb7989c8805623d2c842ea47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
137
      if ($_SESSION['mailcow_cc_role'] != "admin") {
Open commit View diff
137 if ($_SESSION['mailcow_cc_role'] != "admin") {
same change b52ee0a

[Rspamd] Fix map permissions for www

Full commit hash
b52ee0a706f1b4d0fb7989c8805623d2c842ea47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
138
        $_SESSION['return'][] = array(
Open commit View diff
138 $_SESSION['return'][] = array(
same change b52ee0a

[Rspamd] Fix map permissions for www

Full commit hash
b52ee0a706f1b4d0fb7989c8805623d2c842ea47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
139
          'type' => 'danger',
Open commit View diff
139 'type' => 'danger',
andryyy over 5 years ago 0b19c77

[Web] Fix textarea number width > 999

Full commit hash
0b19c77cdc8981ce6fc3b3817f112fc672e77fb5
Author
andryyy <[email protected]>
Date
over 5 years ago
Selected line
140
          'log' => array(__FUNCTION__, $_action, '-'),
Open commit View diff
140 'log' => array(__FUNCTION__, $_action, '-'),
andryyy over 6 years ago b52ee0a

[Rspamd] Fix map permissions for www

Full commit hash
b52ee0a706f1b4d0fb7989c8805623d2c842ea47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
141
          'msg' => 'access_denied'
Open commit View diff
141 'msg' => 'access_denied'
same change b52ee0a

[Rspamd] Fix map permissions for www

Full commit hash
b52ee0a706f1b4d0fb7989c8805623d2c842ea47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
142
        );
Open commit View diff
142 );
same change b52ee0a

[Rspamd] Fix map permissions for www

Full commit hash
b52ee0a706f1b4d0fb7989c8805623d2c842ea47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
143
        return false;
Open commit View diff
143 return false;
same change b52ee0a

[Rspamd] Fix map permissions for www

Full commit hash
b52ee0a706f1b4d0fb7989c8805623d2c842ea47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
144
      }
Open commit View diff
144 }
same change b52ee0a

[Rspamd] Fix map permissions for www

Full commit hash
b52ee0a706f1b4d0fb7989c8805623d2c842ea47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
145
      $maps = (array)$_data['map'];
Open commit View diff
145 $maps = (array)$_data['map'];
FreddleSpl0it over 2 years ago 0d09c86

[Web] fix invalid rspamd map check

Full commit hash
0d09c86c124e9a4f17f6813ce06cc4537ce81b46
Author
FreddleSpl0it <[email protected]>
Date
over 2 years ago
Selected line
146
      $valid_maps = array();
Open commit View diff
146 $valid_maps = array();
andryyy over 6 years ago b52ee0a

[Rspamd] Fix map permissions for www

Full commit hash
b52ee0a706f1b4d0fb7989c8805623d2c842ea47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
147
      foreach ($maps as $map) {
Open commit View diff
147 foreach ($maps as $map) {
FreddleSpl0it over 2 years ago 7660ca8

[Web] break loop if rspamd_map is valid

Full commit hash
7660ca89ae35f9900fef1858f53c292b22883faa
Author
FreddleSpl0it <[email protected]>
Date
over 2 years ago
Selected line
148
        $is_valid = false;
Open commit View diff
148 $is_valid = false;
andryyy over 6 years ago a89df38

[Web] Fix global maps

Full commit hash
a89df381f89647edb3741c0f7442aeaca5113bd5
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
149
        foreach ($RSPAMD_MAPS as $rspamd_map_type) {
Open commit View diff
149 foreach ($RSPAMD_MAPS as $rspamd_map_type) {
FreddleSpl0it over 2 years ago 7660ca8

[Web] break loop if rspamd_map is valid

Full commit hash
7660ca89ae35f9900fef1858f53c292b22883faa
Author
FreddleSpl0it <[email protected]>
Date
over 2 years ago
Selected line
150
          if (in_array($map, $rspamd_map_type)) {
Open commit View diff
150 if (in_array($map, $rspamd_map_type)) {
same change 7660ca8

[Web] break loop if rspamd_map is valid

Full commit hash
7660ca89ae35f9900fef1858f53c292b22883faa
Author
FreddleSpl0it <[email protected]>
Date
over 2 years ago
Selected line
151
            $is_valid = true;
Open commit View diff
151 $is_valid = true;
same change 7660ca8

[Web] break loop if rspamd_map is valid

Full commit hash
7660ca89ae35f9900fef1858f53c292b22883faa
Author
FreddleSpl0it <[email protected]>
Date
over 2 years ago
Selected line
152
            break;
Open commit View diff
152 break;
andryyy over 6 years ago a89df38

[Web] Fix global maps

Full commit hash
a89df381f89647edb3741c0f7442aeaca5113bd5
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
153
          }
Open commit View diff
153 }
andryyy over 6 years ago b52ee0a

[Rspamd] Fix map permissions for www

Full commit hash
b52ee0a706f1b4d0fb7989c8805623d2c842ea47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
154
        }
Open commit View diff
154 }
FreddleSpl0it over 2 years ago 7660ca8

[Web] break loop if rspamd_map is valid

Full commit hash
7660ca89ae35f9900fef1858f53c292b22883faa
Author
FreddleSpl0it <[email protected]>
Date
over 2 years ago
Selected line
155
        if ($is_valid) {
Open commit View diff
155 if ($is_valid) {
same change 7660ca8

[Web] break loop if rspamd_map is valid

Full commit hash
7660ca89ae35f9900fef1858f53c292b22883faa
Author
FreddleSpl0it <[email protected]>
Date
over 2 years ago
Selected line
156
          array_push($valid_maps, $map);
Open commit View diff
156 array_push($valid_maps, $map);
same change 7660ca8

[Web] break loop if rspamd_map is valid

Full commit hash
7660ca89ae35f9900fef1858f53c292b22883faa
Author
FreddleSpl0it <[email protected]>
Date
over 2 years ago
Selected line
157
        } else {
Open commit View diff
157 } else {
same change 7660ca8

[Web] break loop if rspamd_map is valid

Full commit hash
7660ca89ae35f9900fef1858f53c292b22883faa
Author
FreddleSpl0it <[email protected]>
Date
over 2 years ago
Selected line
158
          $_SESSION['return'][] = array(
Open commit View diff
158 $_SESSION['return'][] = array(
same change 7660ca8

[Web] break loop if rspamd_map is valid

Full commit hash
7660ca89ae35f9900fef1858f53c292b22883faa
Author
FreddleSpl0it <[email protected]>
Date
over 2 years ago
Selected line
159
            'type' => 'danger',
Open commit View diff
159 'type' => 'danger',
same change 7660ca8

[Web] break loop if rspamd_map is valid

Full commit hash
7660ca89ae35f9900fef1858f53c292b22883faa
Author
FreddleSpl0it <[email protected]>
Date
over 2 years ago
Selected line
160
            'log' => array(__FUNCTION__, $_action, '-'),
Open commit View diff
160 'log' => array(__FUNCTION__, $_action, '-'),
same change 7660ca8

[Web] break loop if rspamd_map is valid

Full commit hash
7660ca89ae35f9900fef1858f53c292b22883faa
Author
FreddleSpl0it <[email protected]>
Date
over 2 years ago
Selected line
161
            'msg' => array('global_map_invalid', $map)
Open commit View diff
161 'msg' => array('global_map_invalid', $map)
same change 7660ca8

[Web] break loop if rspamd_map is valid

Full commit hash
7660ca89ae35f9900fef1858f53c292b22883faa
Author
FreddleSpl0it <[email protected]>
Date
over 2 years ago
Selected line
162
          );
Open commit View diff
162 );
same change 7660ca8

[Web] break loop if rspamd_map is valid

Full commit hash
7660ca89ae35f9900fef1858f53c292b22883faa
Author
FreddleSpl0it <[email protected]>
Date
over 2 years ago
Selected line
163
        }
Open commit View diff
163 }
FreddleSpl0it over 2 years ago 0d09c86

[Web] fix invalid rspamd map check

Full commit hash
0d09c86c124e9a4f17f6813ce06cc4537ce81b46
Author
FreddleSpl0it <[email protected]>
Date
over 2 years ago
Selected line
164
      }
Open commit View diff
164 }
same change 0d09c86

[Web] fix invalid rspamd map check

Full commit hash
0d09c86c124e9a4f17f6813ce06cc4537ce81b46
Author
FreddleSpl0it <[email protected]>
Date
over 2 years ago
Selected line
165
      foreach ($valid_maps as $map) {
Open commit View diff
165 foreach ($valid_maps as $map) {
andryyy over 6 years ago b52ee0a

[Rspamd] Fix map permissions for www

Full commit hash
b52ee0a706f1b4d0fb7989c8805623d2c842ea47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
166
        try {
Open commit View diff
166 try {
same change b52ee0a

[Rspamd] Fix map permissions for www

Full commit hash
b52ee0a706f1b4d0fb7989c8805623d2c842ea47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
167
          if (file_exists('/rspamd_custom_maps/' . $map)) {
Open commit View diff
167 if (file_exists('/rspamd_custom_maps/' . $map)) {
same change b52ee0a

[Rspamd] Fix map permissions for www

Full commit hash
b52ee0a706f1b4d0fb7989c8805623d2c842ea47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
168
            $map_content = trim($_data['rspamd_map_data']);
Open commit View diff
168 $map_content = trim($_data['rspamd_map_data']);
same change b52ee0a

[Rspamd] Fix map permissions for www

Full commit hash
b52ee0a706f1b4d0fb7989c8805623d2c842ea47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
169
            $map_handle = fopen('/rspamd_custom_maps/' . $map, 'w');
Open commit View diff
169 $map_handle = fopen('/rspamd_custom_maps/' . $map, 'w');
same change b52ee0a

[Rspamd] Fix map permissions for www

Full commit hash
b52ee0a706f1b4d0fb7989c8805623d2c842ea47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
170
            if (!$map_handle) {
Open commit View diff
170 if (!$map_handle) {
andryyy over 6 years ago e1897b0

[Web] Allow to set global sieve filters

Full commit hash
e1897b0631db96a9d05604f2eb38132122edb099
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
171
              throw new Exception($lang['danger']['file_open_error']);
Open commit View diff
171 throw new Exception($lang['danger']['file_open_error']);
andryyy over 6 years ago b52ee0a

[Rspamd] Fix map permissions for www

Full commit hash
b52ee0a706f1b4d0fb7989c8805623d2c842ea47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
172
            }
Open commit View diff
172 }
same change b52ee0a

[Rspamd] Fix map permissions for www

Full commit hash
b52ee0a706f1b4d0fb7989c8805623d2c842ea47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
173
            fwrite($map_handle, $map_content . PHP_EOL);
Open commit View diff
173 fwrite($map_handle, $map_content . PHP_EOL);
same change b52ee0a

[Rspamd] Fix map permissions for www

Full commit hash
b52ee0a706f1b4d0fb7989c8805623d2c842ea47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
174
            fclose($map_handle);
Open commit View diff
174 fclose($map_handle);
andryyy over 6 years ago 27de9db

[Rspamd] Slight changes to improve memory usage

Full commit hash
27de9dbf92c090b3504bc14404e3cca511883b71
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
175
            sleep(1.5);
Open commit View diff
175 sleep(1.5);
same change 27de9db

[Rspamd] Slight changes to improve memory usage

Full commit hash
27de9dbf92c090b3504bc14404e3cca511883b71
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
176
            touch('/rspamd_custom_maps/' . $map);
Open commit View diff
176 touch('/rspamd_custom_maps/' . $map);
andryyy over 6 years ago b52ee0a

[Rspamd] Fix map permissions for www

Full commit hash
b52ee0a706f1b4d0fb7989c8805623d2c842ea47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
177
          }
Open commit View diff
177 }
same change b52ee0a

[Rspamd] Fix map permissions for www

Full commit hash
b52ee0a706f1b4d0fb7989c8805623d2c842ea47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
178
        }
Open commit View diff
178 }
same change b52ee0a

[Rspamd] Fix map permissions for www

Full commit hash
b52ee0a706f1b4d0fb7989c8805623d2c842ea47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
179
        catch (Exception $e) {
Open commit View diff
179 catch (Exception $e) {
same change b52ee0a

[Rspamd] Fix map permissions for www

Full commit hash
b52ee0a706f1b4d0fb7989c8805623d2c842ea47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
180
          $_SESSION['return'][] = array(
Open commit View diff
180 $_SESSION['return'][] = array(
same change b52ee0a

[Rspamd] Fix map permissions for www

Full commit hash
b52ee0a706f1b4d0fb7989c8805623d2c842ea47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
181
            'type' => 'danger',
Open commit View diff
181 'type' => 'danger',
andryyy over 5 years ago 0b19c77

[Web] Fix textarea number width > 999

Full commit hash
0b19c77cdc8981ce6fc3b3817f112fc672e77fb5
Author
andryyy <[email protected]>
Date
over 5 years ago
Selected line
182
            'log' => array(__FUNCTION__, $_action, '-'),
Open commit View diff
182 'log' => array(__FUNCTION__, $_action, '-'),
andryyy over 6 years ago b52ee0a

[Rspamd] Fix map permissions for www

Full commit hash
b52ee0a706f1b4d0fb7989c8805623d2c842ea47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
183
            'msg' => array('global_map_write_error', htmlspecialchars($map), htmlspecialchars($e->getMessage()))
Open commit View diff
183 'msg' => array('global_map_write_error', htmlspecialchars($map), htmlspecialchars($e->getMessage()))
same change b52ee0a

[Rspamd] Fix map permissions for www

Full commit hash
b52ee0a706f1b4d0fb7989c8805623d2c842ea47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
184
          );
Open commit View diff
184 );
same change b52ee0a

[Rspamd] Fix map permissions for www

Full commit hash
b52ee0a706f1b4d0fb7989c8805623d2c842ea47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
185
          continue;
Open commit View diff
185 continue;
same change b52ee0a

[Rspamd] Fix map permissions for www

Full commit hash
b52ee0a706f1b4d0fb7989c8805623d2c842ea47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
186
        }
Open commit View diff
186 }
same change b52ee0a

[Rspamd] Fix map permissions for www

Full commit hash
b52ee0a706f1b4d0fb7989c8805623d2c842ea47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
187
        $_SESSION['return'][] = array(
Open commit View diff
187 $_SESSION['return'][] = array(
same change b52ee0a

[Rspamd] Fix map permissions for www

Full commit hash
b52ee0a706f1b4d0fb7989c8805623d2c842ea47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
188
          'type' => 'success',
Open commit View diff
188 'type' => 'success',
andryyy over 5 years ago 0b19c77

[Web] Fix textarea number width > 999

Full commit hash
0b19c77cdc8981ce6fc3b3817f112fc672e77fb5
Author
andryyy <[email protected]>
Date
over 5 years ago
Selected line
189
          'log' => array(__FUNCTION__, $_action, '-'),
Open commit View diff
189 'log' => array(__FUNCTION__, $_action, '-'),
andryyy over 6 years ago b52ee0a

[Rspamd] Fix map permissions for www

Full commit hash
b52ee0a706f1b4d0fb7989c8805623d2c842ea47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
190
          'msg' => array('object_modified', htmlspecialchars($map))
Open commit View diff
190 'msg' => array('object_modified', htmlspecialchars($map))
same change b52ee0a

[Rspamd] Fix map permissions for www

Full commit hash
b52ee0a706f1b4d0fb7989c8805623d2c842ea47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
191
        );
Open commit View diff
191 );
same change b52ee0a

[Rspamd] Fix map permissions for www

Full commit hash
b52ee0a706f1b4d0fb7989c8805623d2c842ea47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
192
      }
Open commit View diff
192 }
same change b52ee0a

[Rspamd] Fix map permissions for www

Full commit hash
b52ee0a706f1b4d0fb7989c8805623d2c842ea47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
193
    break;
Open commit View diff
193 break;
same change b52ee0a

[Rspamd] Fix map permissions for www

Full commit hash
b52ee0a706f1b4d0fb7989c8805623d2c842ea47
Author
andryyy <[email protected]>
Date
over 6 years ago
Selected line
194
  }
Open commit View diff
194 }
andryyy over 5 years ago 8d05d4a

[Web] Cleanup Rspamd, other fixes

Full commit hash
8d05d4a51d8fb80dd5328c8137bbe34386b45b61
Author
andryyy <[email protected]>
Date
over 5 years ago
Selected line
195
}
Open commit View diff
195 }
same change 8d05d4a

[Web] Cleanup Rspamd, other fixes

Full commit hash
8d05d4a51d8fb80dd5328c8137bbe34386b45b61
Author
andryyy <[email protected]>
Date
over 5 years ago
Selected line
196
function rspamd_actions() {
Open commit View diff
196 function rspamd_actions() {
same change 8d05d4a

[Web] Cleanup Rspamd, other fixes

Full commit hash
8d05d4a51d8fb80dd5328c8137bbe34386b45b61
Author
andryyy <[email protected]>
Date
over 5 years ago
Selected line
197
  if (isset($_SESSION["mailcow_cc_role"]) && $_SESSION["mailcow_cc_role"] == "admin") {
Open commit View diff
197 if (isset($_SESSION["mailcow_cc_role"]) && $_SESSION["mailcow_cc_role"] == "admin") {
same change 8d05d4a

[Web] Cleanup Rspamd, other fixes

Full commit hash
8d05d4a51d8fb80dd5328c8137bbe34386b45b61
Author
andryyy <[email protected]>
Date
over 5 years ago
Selected line
198
    $curl = curl_init();
Open commit View diff
198 $curl = curl_init();
same change 8d05d4a

[Web] Cleanup Rspamd, other fixes

Full commit hash
8d05d4a51d8fb80dd5328c8137bbe34386b45b61
Author
andryyy <[email protected]>
Date
over 5 years ago
Selected line
199
    curl_setopt($curl, CURLOPT_UNIX_SOCKET_PATH, '/var/lib/rspamd/rspamd.sock');
Open commit View diff
199 curl_setopt($curl, CURLOPT_UNIX_SOCKET_PATH, '/var/lib/rspamd/rspamd.sock');
same change 8d05d4a

[Web] Cleanup Rspamd, other fixes

Full commit hash
8d05d4a51d8fb80dd5328c8137bbe34386b45b61
Author
andryyy <[email protected]>
Date
over 5 years ago
Selected line
200
    curl_setopt($curl, CURLOPT_URL,"http://rspamd/stat");
Open commit View diff
200 curl_setopt($curl, CURLOPT_URL,"http://rspamd/stat");
same change 8d05d4a

[Web] Cleanup Rspamd, other fixes

Full commit hash
8d05d4a51d8fb80dd5328c8137bbe34386b45b61
Author
andryyy <[email protected]>
Date
over 5 years ago
Selected line
201
    curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
Open commit View diff
201 curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
same change 8d05d4a

[Web] Cleanup Rspamd, other fixes

Full commit hash
8d05d4a51d8fb80dd5328c8137bbe34386b45b61
Author
andryyy <[email protected]>
Date
over 5 years ago
Selected line
202
    $data = curl_exec($curl);
Open commit View diff
202 $data = curl_exec($curl);
same change 8d05d4a

[Web] Cleanup Rspamd, other fixes

Full commit hash
8d05d4a51d8fb80dd5328c8137bbe34386b45b61
Author
andryyy <[email protected]>
Date
over 5 years ago
Selected line
203
    if ($data) {
Open commit View diff
203 if ($data) {
same change 8d05d4a

[Web] Cleanup Rspamd, other fixes

Full commit hash
8d05d4a51d8fb80dd5328c8137bbe34386b45b61
Author
andryyy <[email protected]>
Date
over 5 years ago
Selected line
204
      $return = array();
Open commit View diff
204 $return = array();
same change 8d05d4a

[Web] Cleanup Rspamd, other fixes

Full commit hash
8d05d4a51d8fb80dd5328c8137bbe34386b45b61
Author
andryyy <[email protected]>
Date
over 5 years ago
Selected line
205
      $stats_array = json_decode($data, true)['actions'];
Open commit View diff
205 $stats_array = json_decode($data, true)['actions'];
same change 8d05d4a

[Web] Cleanup Rspamd, other fixes

Full commit hash
8d05d4a51d8fb80dd5328c8137bbe34386b45b61
Author
andryyy <[email protected]>
Date
over 5 years ago
Selected line
206
      $stats_array['soft reject'] = $stats_array['soft reject'] + $stats_array['greylist'];
Open commit View diff
206 $stats_array['soft reject'] = $stats_array['soft reject'] + $stats_array['greylist'];
same change 8d05d4a

[Web] Cleanup Rspamd, other fixes

Full commit hash
8d05d4a51d8fb80dd5328c8137bbe34386b45b61
Author
andryyy <[email protected]>
Date
over 5 years ago
Selected line
207
      unset($stats_array['greylist']);
Open commit View diff
207 unset($stats_array['greylist']);
same change 8d05d4a

[Web] Cleanup Rspamd, other fixes

Full commit hash
8d05d4a51d8fb80dd5328c8137bbe34386b45b61
Author
andryyy <[email protected]>
Date
over 5 years ago
Selected line
208
      foreach ($stats_array as $action => $count) {
Open commit View diff
208 foreach ($stats_array as $action => $count) {
same change 8d05d4a

[Web] Cleanup Rspamd, other fixes

Full commit hash
8d05d4a51d8fb80dd5328c8137bbe34386b45b61
Author
andryyy <[email protected]>
Date
over 5 years ago
Selected line
209
        $return[] = array($action, $count);
Open commit View diff
209 $return[] = array($action, $count);
same change 8d05d4a

[Web] Cleanup Rspamd, other fixes

Full commit hash
8d05d4a51d8fb80dd5328c8137bbe34386b45b61
Author
andryyy <[email protected]>
Date
over 5 years ago
Selected line
210
      }
Open commit View diff
210 }
same change 8d05d4a

[Web] Cleanup Rspamd, other fixes

Full commit hash
8d05d4a51d8fb80dd5328c8137bbe34386b45b61
Author
andryyy <[email protected]>
Date
over 5 years ago
Selected line
211
      return $return;
Open commit View diff
211 return $return;
same change 8d05d4a

[Web] Cleanup Rspamd, other fixes

Full commit hash
8d05d4a51d8fb80dd5328c8137bbe34386b45b61
Author
andryyy <[email protected]>
Date
over 5 years ago
Selected line
212
    }
Open commit View diff
212 }
same change 8d05d4a

[Web] Cleanup Rspamd, other fixes

Full commit hash
8d05d4a51d8fb80dd5328c8137bbe34386b45b61
Author
andryyy <[email protected]>
Date
over 5 years ago
Selected line
213
    else {
Open commit View diff
213 else {
same change 8d05d4a

[Web] Cleanup Rspamd, other fixes

Full commit hash
8d05d4a51d8fb80dd5328c8137bbe34386b45b61
Author
andryyy <[email protected]>
Date
over 5 years ago
Selected line
214
      return false;
Open commit View diff
214 return false;
same change 8d05d4a

[Web] Cleanup Rspamd, other fixes

Full commit hash
8d05d4a51d8fb80dd5328c8137bbe34386b45b61
Author
andryyy <[email protected]>
Date
over 5 years ago
Selected line
215
    }
Open commit View diff
215 }
same change 8d05d4a

[Web] Cleanup Rspamd, other fixes

Full commit hash
8d05d4a51d8fb80dd5328c8137bbe34386b45b61
Author
andryyy <[email protected]>
Date
over 5 years ago
Selected line
216
  }
Open commit View diff
216 }
same change 8d05d4a

[Web] Cleanup Rspamd, other fixes

Full commit hash
8d05d4a51d8fb80dd5328c8137bbe34386b45b61
Author
andryyy <[email protected]>
Date
over 5 years ago
Selected line
217
  else {
Open commit View diff
217 else {
same change 8d05d4a

[Web] Cleanup Rspamd, other fixes

Full commit hash
8d05d4a51d8fb80dd5328c8137bbe34386b45b61
Author
andryyy <[email protected]>
Date
over 5 years ago
Selected line
218
    return false;
Open commit View diff
218 return false;
same change 8d05d4a

[Web] Cleanup Rspamd, other fixes

Full commit hash
8d05d4a51d8fb80dd5328c8137bbe34386b45b61
Author
andryyy <[email protected]>
Date
over 5 years ago
Selected line
219
  }
Open commit View diff
219 }
same change 8d05d4a

[Web] Cleanup Rspamd, other fixes

Full commit hash
8d05d4a51d8fb80dd5328c8137bbe34386b45b61
Author
andryyy <[email protected]>
Date
over 5 years ago
Selected line
220
}
Open commit View diff
220 }