Skip to content
GitLab
Explore
Sign in
Register
J. Daniel Schmidt
ISPConfig 3
Compare revisions
b28c39db091dfd8588983f22d68dc03af8326dcf to efd0e0dfd321dad20a156af677a40d47508f4a26
Hide whitespace changes
Inline
Side-by-side
interface/web/sites/templates/web_vhost_domain_edit.htm
View file @
efd0e0df
...
...
@@ -278,7 +278,11 @@
<input
type=
"hidden"
name=
"id"
value=
"{tmpl_var name='id'}"
>
<div
class=
"clear"
><div
class=
"right"
>
<div
class=
"clear"
>
<tmpl_if
name=
'id'
><tmpl_if
name=
'show_delete_on_forms'
op=
"=="
value=
"y"
>
<a
class=
"btn btn-default formbutton-danger formbutton-narrow"
href=
"javascript: ISPConfig.confirm_action('sites/web_vhost_domain_del.php?id={tmpl_var name='id'}&_csrf_id={tmpl_var name='_csrf_id'}&_csrf_key={tmpl_var name='_csrf_key'}&phpsessid={tmpl_var name='phpsessid'}','{tmpl_var name='delete_confirmation'}');"
><span
class=
"icon icon-delete"
></span></a>
</tmpl_if></tmpl_if>
<div
class=
"right"
>
<button
id=
"dom-edit-submit"
class=
"btn btn-default formbutton-success"
type=
"button"
value=
"{tmpl_var name='btn_save_txt'}"
>
{tmpl_var name='btn_save_txt'}
</button>
<button
class=
"btn btn-default formbutton-default"
type=
"button"
value=
"{tmpl_var name='btn_cancel_txt'}"
data-load-content=
"sites/web_vhost_domain_list.php"
>
{tmpl_var name='btn_cancel_txt'}
</button>
</div></div>
...
...
interface/web/sites/web_vhost_domain_edit.php
View file @
efd0e0df
...
...
@@ -843,6 +843,13 @@ class page_action extends tform_actions {
$app
->
tpl
->
setVar
(
'is_pagespeed_enabled'
,
(
$web_config
[
'nginx_enable_pagespeed'
]));
}
$csrf_token
=
$app
->
auth
->
csrf_token_get
(
'web_vhost_domain_del'
);
$app
->
tpl
->
setVar
(
'_csrf_id'
,
$csrf_token
[
'csrf_id'
]);
$app
->
tpl
->
setVar
(
'_csrf_key'
,
$csrf_token
[
'csrf_key'
]);
$global_config
=
$app
->
getconf
->
get_global_config
();
$app
->
tpl
->
setVar
(
'show_delete_on_forms'
,
$global_config
[
'misc'
][
'show_delete_on_forms'
]);
$app
->
tpl
->
setVar
(
'app_module'
,
'sites'
);
parent
::
onShowEnd
();
...
...
interface/web/themes/default/assets/javascripts/ispconfig.js
View file @
efd0e0df
...
...
@@ -813,4 +813,31 @@ $(document).ready(function() {
}
return
iCaretPos
;
};
//copy to clipboard
$
(
document
).
on
(
'
click
'
,
'
.copy-to-clipboard
'
,
function
()
{
var
$copyElement
=
$
(
this
).
children
();
var
temp
=
$
(
"
<input>
"
);
$
(
"
body
"
).
append
(
temp
);
temp
.
val
(
$copyElement
.
text
()).
select
();
//execCommand is Deprecated - but there is no alternative (2023)
document
.
execCommand
(
"
copy
"
);
temp
.
remove
();
}
);
//display copy-to-clipboard icon
let
lastCopyToClipboardIcon
;
$
(
document
).
on
(
"
mouseenter
"
,
'
.copy-to-clipboard
'
,
function
()
{
$
(
lastCopyToClipboardIcon
).
removeClass
(
"
copy-to-clipboard-icon
"
);
//Clean up old icons - sometimes mouse is too fast to trigger mouseleave
$
(
this
).
addClass
(
"
copy-to-clipboard-icon
"
);
lastCopyToClipboardIcon
=
$
(
this
);
//console.log("Mouseenter e-tooltip");
});
//hide copy-to-clipboard icon
$
(
document
).
on
(
"
mouseleave
"
,
'
.copy-to-clipboard
'
,
function
()
{
$
(
this
).
removeClass
(
"
copy-to-clipboard-icon
"
);
//console.log("Mouseleave e-tooltip");
});
});
interface/web/themes/default/assets/stylesheets/ispconfig.css
View file @
efd0e0df
...
...
@@ -838,3 +838,20 @@ max-width: 1260px; }
#apache_directives
,
#nginx_directives
,
#proxy_directives
{
font-family
:
Consolas
,
"Courier New"
,
Courier
,
monospace
;
}
.copy-to-clipboard-icon
::after
{
content
:
"\f0ea"
;
font-family
:
FontAwesome
;
font-size
:
0.6em
;
color
:
#6396b5
;
vertical-align
:
top
;
float
:
right
;
cursor
:
copy
;
position
:
absolute
;
margin-left
:
5px
;
}
.copy-to-clipboard-icon-helper
{
display
:
inline-block
;
max-width
:
90%
;
text-overflow
:
ellipsis
;
overflow-x
:
hidden
;
}
\ No newline at end of file
server/lib/classes/letsencrypt.inc.php
View file @
efd0e0df
...
...
@@ -44,7 +44,7 @@ class letsencrypt {
}
public
function
get_acme_script
()
{
$acme
=
explode
(
"
\n
"
,
shell_exec
(
'which acme.sh /usr/local/ispconfig/server/scripts/acme.sh /root/.acme.sh/acme.sh 2> /dev/null'
));
$acme
=
explode
(
"
\n
"
,
shell_exec
(
'which acme.sh /usr/local/ispconfig/server/scripts/acme.sh /root/.acme.sh/acme.sh 2> /dev/null'
)
??
''
);
$acme
=
reset
(
$acme
);
if
(
is_executable
(
$acme
))
{
return
$acme
;
...
...
@@ -464,7 +464,7 @@ class letsencrypt {
$letsencrypt_cmd
=
$this
->
get_certbot_script
()
.
" certificates "
.
$cli_domain_arg
;
$output
=
explode
(
"
\n
"
,
shell_exec
(
$letsencrypt_cmd
.
" 2>/dev/null | grep -v '^
\$
'"
));
$output
=
explode
(
"
\n
"
,
shell_exec
(
$letsencrypt_cmd
.
" 2>/dev/null | grep -v '^
\$
'"
)
??
''
);
$le_path
=
''
;
$skip_to_next
=
true
;
$matches
=
null
;
...
...
server/plugins-available/bind_plugin.inc.php
View file @
efd0e0df
...
...
@@ -402,7 +402,7 @@ class bind_plugin {
}
//* Restart bind nameserver if update_acl is not empty, otherwise reload it
if
(
$data
[
'new'
][
'update_acl'
]
!=
''
)
{
if
(
!
empty
(
$data
[
'new'
][
'update_acl'
]
)
)
{
$app
->
services
->
restartServiceDelayed
(
'bind'
,
'restart'
);
}
else
{
$app
->
services
->
restartServiceDelayed
(
'bind'
,
'reload'
);
...
...
server/plugins-available/cron_jailkit_plugin.inc.php
View file @
efd0e0df
...
...
@@ -229,7 +229,7 @@ class cron_jailkit_plugin {
function
_setup_jailkit_chroot
()
{
global
$app
;
global
$app
,
$conf
;
if
(
isset
(
$this
->
jailkit_config
)
&&
isset
(
$this
->
jailkit_config
[
'jailkit_hardlinks'
]))
{
if
(
$this
->
jailkit_config
[
'jailkit_hardlinks'
]
==
'yes'
)
{
...
...
@@ -293,7 +293,7 @@ class cron_jailkit_plugin {
$programs
=
$this
->
jailkit_config
[
'jailkit_chroot_app_programs'
]
.
' '
.
$this
->
jailkit_config
[
'jailkit_chroot_cron_programs'
];
if
(
$update_hash
==
$parent_domain
[
'last_jailkit_hash'
])
{
if
(
$update_hash
==
$
this
->
parent_domain
[
'last_jailkit_hash'
])
{
return
;
}
...
...
server/plugins-available/rspamd_plugin.inc.php
View file @
efd0e0df
...
...
@@ -282,74 +282,76 @@ class rspamd_plugin {
$app
->
system
->
mkdirpath
(
$this
->
users_config_dir
);
}
if
((
!
$this
->
isValidEmail
(
$app
->
functions
->
idn_encode
(
$email_address
)))
||
!
isset
(
$data
[
'new'
][
'policy_id'
])
||
intval
(
$data
[
'new'
][
'policy_id'
])
==
0
&&
$type
==
'spamfilter_user'
)
{
if
(
is_file
(
$settings_file
))
{
unlink
(
$settings_file
);
}
}
else
{
$app
->
load
(
'tpl'
);
$tpl
=
new
tpl
();
if
(
file_exists
(
$conf
[
'rootpath'
]
.
"/conf-custom/install/rspamd_users.inc.conf.master"
))
{
$tpl
->
newTemplate
(
$conf
[
'rootpath'
]
.
"/conf-custom/install/rspamd_users.inc.conf.master"
);
if
(
$type
==
'spamfilter_user'
){
if
((
!
$this
->
isValidEmail
(
$app
->
functions
->
idn_encode
(
$email_address
)))
||
!
isset
(
$data
[
'new'
][
'policy_id'
])
||
intval
(
$data
[
'new'
][
'policy_id'
])
==
0
)
{
if
(
is_file
(
$settings_file
))
{
unlink
(
$settings_file
);
}
}
else
{
$tpl
->
newTemplate
(
"rspamd_users.inc.conf.master"
);
}
$tpl
->
setVar
(
'record_identifier'
,
'ispc_'
.
$type
.
'_'
.
$entry_id
);
$tpl
->
setVar
(
'priority'
,
$settings_priority
);
$app
->
load
(
'tpl'
);
if
(
$type
===
'spamfilter_user'
)
{
if
(
$data
[
$use_data
][
'local'
]
===
'Y'
)
{
$tpl
->
setVar
(
'to_email'
,
$app
->
functions
->
idn_encode
(
$email_address
)
);
$tpl
=
new
tpl
();
if
(
file_exists
(
$conf
[
'rootpath'
]
.
"/conf-custom/install/rspamd_users.inc.conf.master"
)
)
{
$tpl
->
newTemplate
(
$conf
[
'rootpath'
]
.
"/conf-custom/install/rspamd_users.inc.conf.master"
);
}
else
{
$tpl
->
setVar
(
'from_email'
,
$app
->
functions
->
idn_encode
(
$email_address
)
);
$tpl
->
newTemplate
(
"rspamd_users.inc.conf.master"
);
}
// unneded? $spamfilter appears unused
$spamfilter
=
$data
[
$use_data
];
}
else
{
$tpl
->
setVar
(
'to_email'
,
$app
->
functions
->
idn_encode
(
$email_address
));
// need to get matching spamfilter user if any
// unneded? $spamfilter appears unused
$spamfilter
=
$app
->
db
->
queryOneRecord
(
'SELECT * FROM spamfilter_users WHERE `email` = ?'
,
$email_address
);
}
$tpl
->
setVar
(
'record_identifier'
,
'ispc_'
.
$type
.
'_'
.
$entry_id
);
$tpl
->
setVar
(
'priority'
,
$settings_priority
);
if
(
$type
===
'spamfilter_user'
)
{
if
(
$data
[
$use_data
][
'local'
]
===
'Y'
)
{
$tpl
->
setVar
(
'to_email'
,
$app
->
functions
->
idn_encode
(
$email_address
));
}
else
{
$tpl
->
setVar
(
'from_email'
,
$app
->
functions
->
idn_encode
(
$email_address
));
}
// unneded? $spamfilter appears unused
$spamfilter
=
$data
[
$use_data
];
}
else
{
$tpl
->
setVar
(
'to_email'
,
$app
->
functions
->
idn_encode
(
$email_address
));
if
(
!
isset
(
$policy
[
'rspamd_spam_tag_level'
]))
{
$policy
[
'rspamd_spam_tag_level'
]
=
6.0
;
}
if
(
!
isset
(
$policy
[
'rspamd_spam_tag_method'
]))
{
$policy
[
'rspamd_spam_tag_method'
]
=
'add_header'
;
}
if
(
!
isset
(
$policy
[
'rspamd_spam_kill_level'
]))
{
$policy
[
'rspamd_spam_kill_level'
]
=
15.0
;
}
if
(
!
isset
(
$policy
[
'rspamd_virus_kill_level'
]))
{
$policy
[
'rspamd_virus_kill_level'
]
=
floatval
(
$policy
[
'rspamd_spam_kill_level'
])
+
1000
;
}
// need to get matching spamfilter user if any
// unneded? $spamfilter appears unused
$spamfilter
=
$app
->
db
->
queryOneRecord
(
'SELECT * FROM spamfilter_users WHERE `email` = ?'
,
$email_address
);
}
$tpl
->
setVar
(
'rspamd_spam_tag_level'
,
floatval
(
$policy
[
'rspamd_spam_tag_level'
]));
$tpl
->
setVar
(
'rspamd_spam_tag_method'
,
$policy
[
'rspamd_spam_tag_method'
]);
$tpl
->
setVar
(
'rspamd_spam_kill_level'
,
floatval
(
$policy
[
'rspamd_spam_kill_level'
]));
$tpl
->
setVar
(
'rspamd_virus_kill_level'
,
floatval
(
$policy
[
'rspamd_spam_kill_level'
])
+
1000
);
if
(
!
isset
(
$policy
[
'rspamd_spam_tag_level'
]))
{
$policy
[
'rspamd_spam_tag_level'
]
=
6.0
;
}
if
(
!
isset
(
$policy
[
'rspamd_spam_tag_method'
]))
{
$policy
[
'rspamd_spam_tag_method'
]
=
'add_header'
;
}
if
(
!
isset
(
$policy
[
'rspamd_spam_kill_level'
]))
{
$policy
[
'rspamd_spam_kill_level'
]
=
15.0
;
}
if
(
!
isset
(
$policy
[
'rspamd_virus_kill_level'
]))
{
$policy
[
'rspamd_virus_kill_level'
]
=
floatval
(
$policy
[
'rspamd_spam_kill_level'
])
+
1000
;
}
if
(
isset
(
$policy
[
'spam_lover'
])
&&
$policy
[
'spam_lover'
]
==
'Y'
)
{
$tpl
->
setVar
(
'spam_lover'
,
true
);
}
if
(
isset
(
$policy
[
'virus_lover'
])
&&
$policy
[
'virus_lover'
]
==
'Y'
)
{
$tpl
->
setVar
(
'virus_lover'
,
true
);
}
$tpl
->
setVar
(
'rspamd_spam_tag_level'
,
floatval
(
$policy
[
'rspamd_spam_tag_level'
]));
$tpl
->
setVar
(
'rspamd_spam_tag_method'
,
$policy
[
'rspamd_spam_tag_method'
]);
$tpl
->
setVar
(
'rspamd_spam_kill_level'
,
floatval
(
$policy
[
'rspamd_spam_kill_level'
]));
$tpl
->
setVar
(
'rspamd_virus_kill_level'
,
floatval
(
$policy
[
'rspamd_spam_kill_level'
])
+
1000
);
$tpl
->
setVar
(
'greylisting'
,
$greylisting
);
if
(
isset
(
$policy
[
'spam_lover'
])
&&
$policy
[
'spam_lover'
]
==
'Y'
)
{
$tpl
->
setVar
(
'spam_lover'
,
true
);
}
if
(
isset
(
$policy
[
'virus_lover'
])
&&
$policy
[
'virus_lover'
]
==
'Y'
)
{
$tpl
->
setVar
(
'virus_lover'
,
true
);
}
if
(
isset
(
$policy
[
'rspamd_spam_greylisting_level'
]))
{
$tpl
->
setVar
(
'greylisting_level'
,
floatval
(
$policy
[
'rspamd_spam_greylisting_level'
]));
}
else
{
$tpl
->
setVar
(
'greylisting_level'
,
0.1
);
}
$tpl
->
setVar
(
'greylisting'
,
$greylisting
);
$app
->
system
->
file_put_contents
(
$settings_file
,
$tpl
->
grab
());
if
(
isset
(
$policy
[
'rspamd_spam_greylisting_level'
]))
{
$tpl
->
setVar
(
'greylisting_level'
,
floatval
(
$policy
[
'rspamd_spam_greylisting_level'
]));
}
else
{
$tpl
->
setVar
(
'greylisting_level'
,
0.1
);
}
$app
->
system
->
file_put_contents
(
$settings_file
,
$tpl
->
grab
());
}
}
}
...
...
Prev
1
2
3
4
5
Next