public
nobgit
read
NobMail
Based on mailcow: dockerized
Languages
Repository composition by tracked source files.
PHP
49%
JavaScript
35%
HTML
9%
CSS
4%
Shell
2%
Python
1%
Lua
0%
Perl
0%
Ruby
0%
SCSS
0%
Create file
Wiki Documentation
Clone
https://nobgit.com/orgs/nobgit/nobmail.git
ssh://[email protected]:2222/orgs/nobgit/nobmail.git
Trace
data/web/inc/ajax/sieve_validation.php
Trace helps you understand code history line by line. See who changed each line, when it changed, and which commit introduced it.
Author
Date
Commit
Line
Code
1
<?php
2
require_once $_SERVER['DOCUMENT_ROOT'] . '/inc/prerequisites.inc.php';
3
header('Content-Type: application/json');
4
if (!isset($_SESSION['mailcow_cc_role'])) {
5
exit();
6
}
7
if (isset($_REQUEST['script'])) {
8
$sieve = new Sieve\SieveParser();
9
try {
10
if (empty($_REQUEST['script'])) {
11
echo json_encode(array('type' => 'danger', 'msg' => $lang['danger']['script_empty']));
12
exit();
13
}
14
$sieve->parse($_REQUEST['script']);
15
}
16
catch (Exception $e) {
17
echo json_encode(array('type' => 'danger', 'msg' => $e->getMessage()));
18
exit();
19
}
20
echo json_encode(array('type' => 'success', 'msg' => $lang['add']['validation_success']));
21
}
22
?>