ISPConfig 3 issueshttps://git.ispconfig.org/ispconfig/ispconfig3/-/issues2024-02-09T16:27:06Zhttps://git.ispconfig.org/ispconfig/ispconfig3/-/issues/6643rspamd policy per mailbox wrongly removed on mailuser update2024-02-09T16:27:06ZLucarspamd policy per mailbox wrongly removed on mailuser update## Summary
If you update a mailbox from ispconfig interface, without change the spamfilter policy, the rspamd per-user configuration is removed
## Steps to reproduce
1. install a server default with autoinstaller (debian 11/12) with rsp...## Summary
If you update a mailbox from ispconfig interface, without change the spamfilter policy, the rspamd per-user configuration is removed
## Steps to reproduce
1. install a server default with autoinstaller (debian 11/12) with rspamd as mailfilter
2. create a mailbox
3. set to this mailbox a spamfilter policy (example normal)
4. save
5. you will see the file rspamd/local.d/{user}.conf file written
6. then enter again on the mailbox from ispconfig
7. try to update the quota with a different value, without change the spamfilter policy
8. save
9. now you will see the file rspamd/local.d/{user}.conf removed
## Correct behaviour
The correct behaviour is that the mailbox will be updated, without the rspamd policy custom of the mail user removed
## Environment
Server OS + version: (Debian 11/12)
ISPConfig version: latest stable
Software version of the related software: everything to the latest stable
Output of the command: n/a
## Proposed fix
**This is NOT** a proposted fix, but some information that hope could be useful.
Basically I have found that when a mailbox user is updated from ispconfig without changing the spamfilter policy, on the file
`/usr/local/ispconfig/server/plugins-available/rspamd_plugin.inc.php at the row 285` the variable `$data['new']['policy_id']` is always empty so `intval($data['new']['policy_id'])` is always `0` and the `if` is entered and the file removed:
```
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 {
[...]
```
In my testing server in order to avoid that i did something like this:
```
if ((!$this->isValidEmail($app->functions->idn_encode($email_address)))){
[...]
```
but i known that **THIS IS NOT THE SOLUTION** (due i did only on test, for debug purpose). Due that is really needed to understand: or why the `$data['new']['policy_id']` is empty, or if it is that correct, accordingly change the original if to manage them properly.
If you can reproduce this, i think that a patch is urgently required because as you can understand is very easy to have misleading anti spam settings for certain users.3.2.11p2https://git.ispconfig.org/ispconfig/ispconfig3/-/issues/6291changing owner website from reseller to client gives site on 2 places2024-02-01T15:36:54ZSteffan Noordchanging owner website from reseller to client gives site on 2 placesWhen i cange a website owner from a reseller to a new client the website is visable to the new client, but also stays in the reseller controlpanel.
When looking in the database i see that sys_userid is not changed to the new client
When...When i cange a website owner from a reseller to a new client the website is visable to the new client, but also stays in the reseller controlpanel.
When looking in the database i see that sys_userid is not changed to the new client
When i change sys_userid one number higher then sys_groupid everything is fine again.3.2.12https://git.ispconfig.org/ispconfig/ispconfig3/-/issues/6635DNS import confuses ID and name2024-02-01T11:05:10ZHelmoDNS import confuses ID and nameWhen using the domains module I could not use the Zone File Import feature.
It kept coming back with 'This zone is not allowed for this account.' even though I'm logged in as admin and the client and domains_domain match.
I found that ...When using the domains module I could not use the Zone File Import feature.
It kept coming back with 'This zone is not allowed for this account.' even though I'm logged in as admin and the client and domains_domain match.
I found that the form posts an ID(int), and then later on the code expects it to be a name(string). When NOT using the domains module the form submits the domainname.3.2.12HelmoHelmohttps://git.ispconfig.org/ispconfig/ispconfig3/-/issues/6634Zone file import failes to show errors2024-02-01T11:04:18ZHelmoZone file import failes to show errorsI ran into an issue with the DNS zone import ... and was wondering why I saw no errors.
After some digging I found that the http request did return html for an error message, it just never got loaded into the DOM.
After debugging furt...I ran into an issue with the DNS zone import ... and was wondering why I saw no errors.
After some digging I found that the http request did return html for an error message, it just never got loaded into the DOM.
After debugging further I found that while submitForm replaces the content in `$('#pageContent')` submitUploadFormdoes it differently and only extracts a few elements (#errorMsg and #OKMsg)
I'll add a MR to restore the #errorMsg.
![image.png](/uploads/596ec47a12e37060931d400f8e29bdc0/image.png)3.2.12HelmoHelmohttps://git.ispconfig.org/ispconfig/ispconfig3/-/issues/5158Ugly validation errors adding databases and database users2024-01-30T15:17:51ZChris GrahamUgly validation errors adding databases and database usersThis is a trivial issue, but impacts on ISPConfig's polish. If you leave the fields blank and click add, you'll see repeated errors (or effectively repeated), and all under the same number '1'.
![Screen_Shot_2018-10-18_at_10.06.13_AM](/...This is a trivial issue, but impacts on ISPConfig's polish. If you leave the fields blank and click add, you'll see repeated errors (or effectively repeated), and all under the same number '1'.
![Screen_Shot_2018-10-18_at_10.06.13_AM](/uploads/d4e2ce4ebe750e561e836be53bf772b1/Screen_Shot_2018-10-18_at_10.06.13_AM.png)![Screen_Shot_2018-10-18_at_10.06.27_AM](/uploads/aef5907090d9030e55fb7fb6d5f0293c/Screen_Shot_2018-10-18_at_10.06.27_AM.png)3.2https://git.ispconfig.org/ispconfig/ispconfig3/-/issues/6613DNS zone filters did not work2024-01-26T14:03:44ZMassimilianoDNS zone filters did not work## Summary
DNS Zones (records view) filters did not work, the page will refresh but the records are not filtered.
## Steps to reproduce
1. Go to DNS > Zones and select a zone
2. Filter a record by using the search function below the hea...## Summary
DNS Zones (records view) filters did not work, the page will refresh but the records are not filtered.
## Steps to reproduce
1. Go to DNS > Zones and select a zone
2. Filter a record by using the search function below the headers and click on the glass (or push enter) button
## Correct behaviour
Only filtered record will be shown.
## Environment
Server OS + version: Debian 12.2
ISPConfig version: 3.2.11p1
Software version of the related software:
```
**Apache**
Server version: Apache/2.4.57 (Debian)
Server built: 2023-04-13T03:26:51
**PHP**
PHP 8.2.7 (cli) (built: Jun 9 2023 19:37:27) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.2.7, Copyright (c) Zend Technologies
with Zend OPcache v8.2.7, Copyright (c), by Zend Technologies
```3.2.12ThomThomhttps://git.ispconfig.org/ispconfig/ispconfig3/-/issues/6631E-Mail address with comma in recipient name2024-01-23T16:54:53Zteuto.netE-Mail address with comma in recipient name## Summary
<!-- What is happening and what is wrong with that? -->
## Steps to reproduce
1. Create a user with "," in there name
2. Try to send a email to that user, for example with "Password reset"
The E-Mail to header will split at ...## Summary
<!-- What is happening and what is wrong with that? -->
## Steps to reproduce
1. Create a user with "," in there name
2. Try to send a email to that user, for example with "Password reset"
The E-Mail to header will split at each comma. The email is submitted to the user but also many other addresses.
## Correct behaviour
<!-- What should happen instead? -->
Send an email to the user with correct recipient.
## Environment
Ubuntu 20.04 with postfix and a relay for email transmission.
## Proposed fix
I will create a merge request3.2.12https://git.ispconfig.org/ispconfig/ispconfig3/-/issues/6629PHP warning in bind_plugin.inc.php on line 4052024-01-18T06:52:59ZHelmoPHP warning in bind_plugin.inc.php on line 405I noticed this one in the logs while updating a dns zone:
\`PHP Warning: Trying to access array offset on value of type null in /usr/local/ispconfig/server/plugins-available/bind_plugin.inc.php on line 405\`I noticed this one in the logs while updating a dns zone:
\`PHP Warning: Trying to access array offset on value of type null in /usr/local/ispconfig/server/plugins-available/bind_plugin.inc.php on line 405\`HelmoHelmohttps://git.ispconfig.org/ispconfig/ispconfig3/-/issues/6166private/cron.log, private/cron_error.log are rotated multiple times2023-12-25T13:43:49Zlennartprivate/cron.log, private/cron_error.log are rotated multiple times<!-- Before creating a bug report, please:
- Read the contribution guidelines: https://git.ispconfig.org/ispconfig/ispconfig3/-/blob/develop/CONTRIBUTING.md
- Do not ask support questions here. If you are unsure if your problem is a bug,...<!-- Before creating a bug report, please:
- Read the contribution guidelines: https://git.ispconfig.org/ispconfig/ispconfig3/-/blob/develop/CONTRIBUTING.md
- Do not ask support questions here. If you are unsure if your problem is a bug, post a thread on the forum: https://www.howtoforge.com/community/#ispconfig-3.23
- Make sure to remove any content from the description that you did not add. For example, if there are no related log entries, remove the whole "Related log entries" part.
-->
## Summary
<!-- What is happening and what is wrong with that? -->
Users cron log files private/cron.log, private/cron_error.log, are rotated multiple times every night if there are multiple records in table web_domain of type = 'vhost' or type = 'vhostsubdomain' or type = 'vhostalias'.
## Steps to reproduce
1. [First step]
2. [Second step]
3. [and so on...]
see [https://www.howtoforge.com/community/threads/many-user-cron-log-files.86937/#post-422325](https://www.howtoforge.com/community/threads/many-user-cron-log-files.86937/#post-422325)
## Correct behaviour
<!-- What should happen instead? -->
private/cron.log, private/cron_error.log should be rotated only once every night.
## Environment
Server OS + version: (Debian 10/Ubuntu 20.04/CentOS 8/...) \
ISPConfig version: (3.1.15p3/3.2.3/3.2dev/...)
<!-- _you can use `grep 'ISPC_APP_VERSION' /usr/local/ispconfig/server/lib/config.inc.php` to get it from the command line_ -->
Software version of the related software:
<!-- You can use 'nginx -v' or 'apachectl -v' to find the webserver version. Use 'php -v' to find the PHP version.> Put this in code blocks, like so: -->
```
PRETTY_NAME="Debian GNU/Linux 10 (buster)"
NAME="Debian GNU/Linux"
VERSION_ID="10"
VERSION="10 (buster)"
VERSION_CODENAME=buster
define('ISPC_APP_VERSION', '3.2.4');
$conf['app_version'] = ISPC_APP_VERSION;
Server version: Apache/2.4.38 (Debian)
Server built: 2020-08-25T20:08:29
PHP 7.3.28-1+0~20210503.84+debian10~1.gbp6819da (cli) (built: May 3 2021 11:59:15) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.3.28, Copyright (c) 1998-2018 Zend Technologies
with the ionCube PHP Loader + ionCube24 v10.4.5, Copyright (c) 2002-2020, by ionCube Ltd.
with Zend OPcache v7.3.28-1+0~20210503.84+debian10~1.gbp6819da, Copyright (c) 1999-2018, by Zend Technologies
```
## Proposed fix
optional, of course.
if you want to post code snippets, please use
```
*** 200-logfiles.inc-orig-324.php 2021-05-09 14:47:49.000000000 +0200
--- 200-logfiles.inc.php 2021-05-09 15:25:34.000000000 +0200
***************
*** 71,76 ****
--- 71,79 ----
$sql = "SELECT domain_id, domain, type, document_root, web_folder, parent_domain_id, log_retention FROM web_domain WHERE (type = 'vhost' or type = 'vhostsubdomain' or type = 'vhostalias') AND server_id = ?";
$records = $app->db->queryAllRecords($sql, $conf['server_id']);
+ // ikasp
+ // rotate user cron files once
+ $cron_logfile_rotated = [];
foreach($records as $rec) {
//* create traffic statistics based on yesterdays access log file
***************
*** 126,131 ****
--- 129,139 ----
foreach($cron_logfiles as $cron_logfile) {
$cron_logfile = $rec['document_root'].'/private/' . $cron_logfile;
+ // ikasp
+ // check if already rotated
+ if (isset($cron_logfile_rotated[$cron_logfile]) and $cron_logfile_rotated[$cron_logfile]) continue;
+ $cron_logfile_rotated[$cron_logfile] = true;
+
// rename older files (move up by one)
$num = $log_retention;
while($num >= 1) {
```
or attach a code file. Best is to create a merge request of course.
## References
if you know of related bugs or feature requests, please reference them by using `#<issuenumber>`, e. g. #6105
if you have done a merge request already, please reference it by using `!<mergenumber>`, e. g. !1444
if you know of a forum post on howtoforge.com that deals with this topic, just add the link to the forum topic here
## Screenshots
optional, of course.
Add screenshots of the problem by clicking "Attach a file" on the bottom right.
## Related log entrieshttps://git.ispconfig.org/ispconfig/ispconfig3/-/issues/6610manually added DKIM key creates empty DNS RR2023-12-09T20:45:19ZMatus Uhlarmanually added DKIM key creates empty DNS RR<!-- Before creating a bug report, please:
- Read the contribution guidelines: https://git.ispconfig.org/ispconfig/ispconfig3/-/blob/develop/CONTRIBUTING.md
- Do not ask support questions here. If you are unsure if your problem is a bug,...<!-- Before creating a bug report, please:
- Read the contribution guidelines: https://git.ispconfig.org/ispconfig/ispconfig3/-/blob/develop/CONTRIBUTING.md
- Do not ask support questions here. If you are unsure if your problem is a bug, post a thread on the forum: https://www.howtoforge.com/community/#ispconfig-3.23
- Make sure to remove any content from the description that you did not add. For example, if there are no related log entries, remove the whole "Related log entries" part.
-->
## Summary
<!-- What is happening and what is wrong with that? -->
Adding existing DKIM key for a domain by pasting the it into "DKIM Private-key:" textbox (instead of using "Generate DKIM Private-key" button) and saving it adds dummy TXT record (empty "p=") to DNS zone.
## Steps to reproduce
1. Enter Email / Mail Domain in ISPConfig interface
2. Expand DKIM options by clicking "Domain Keys Identifid Mail (DKIM)" button
3. click the "enable DKIM:" text box
4. paste existing DKIM key to the "DKIM Private-key:"
5. click the "Save" button
6. the new TXT records without public key gets added to the domain.
## Correct behaviour
<!-- What should happen instead? -->
The DKIM TXT Record should be only added to DNS if the public key is known
(and does not alredy exist)
## Environment
Server OS + version: Debian GNU/Linux 10 (buster)
ISPConfig version: 3.2.11
Software version of the related software:
```
Server version: Apache/2.4.38 (Debian)
Server built: 2023-04-21T22:01:00
```
```
PHP 7.3.33-14+0~20230902.114+debian10~1.gbp764b27 (cli) (built: Sep 2 2023 07:11:20) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.3.33, Copyright (c) 1998-2018 Zend Technologies
with Zend OPcache v7.3.33-14+0~20230902.114+debian10~1.gbp764b27, Copyright (c) 1999-2018, by Zend Technologies
```
## References
https://forum.howtoforge.com/threads/creating-domain-with-manually-addded-dkim-key.91432/3.2.12https://git.ispconfig.org/ispconfig/ispconfig3/-/issues/6543mysqldump command has been renamed to mariadb-dump in latest versions2023-12-04T14:34:35ZTill Brehmmysqldump command has been renamed to mariadb-dump in latest versionshttps://forum.howtoforge.com/threads/how-to-upgrade-mariadb-with-ispconfig.89509/#post-447776https://forum.howtoforge.com/threads/how-to-upgrade-mariadb-with-ispconfig.89509/#post-4477763.2.13https://git.ispconfig.org/ispconfig/ispconfig3/-/issues/6595PHP Deprecated (with php 8.1) in letsencrypt.inc.php2023-12-03T20:49:53ZHannesPHP Deprecated (with php 8.1) in letsencrypt.inc.phpUbuntu 22.04/PHP 8.1.24 (cli)/ISPConfig 3.2.11
If certbot is used then server.php shows (php8.1)
```plaintext
PHP Deprecated: explode(): Passing null to parameter #2 ($string) of type string is deprecated in /usr/local/ispconfig/serv...Ubuntu 22.04/PHP 8.1.24 (cli)/ISPConfig 3.2.11
If certbot is used then server.php shows (php8.1)
```plaintext
PHP Deprecated: explode(): Passing null to parameter #2 ($string) of type string is deprecated in /usr/local/ispconfig/server/lib/classes/letsencrypt.inc.php on line 47
PHP Deprecated: explode(): Passing null to parameter #2 ($string) of type string is deprecated in /usr/local/ispconfig/server/lib/classes/letsencrypt.inc.php on line 471
```3.2.12https://git.ispconfig.org/ispconfig/ispconfig3/-/issues/6596Improve input value checks in language editor2023-12-03T19:05:00ZTill BrehmImprove input value checks in language editorA PHP code injection vulnerability has been found in the ISPConfig language editor by Egidio Romano from Karma(In)Security. Thanks a lot for reporting this issue! The vulnerability requires that the attacker is correctly logged in as the...A PHP code injection vulnerability has been found in the ISPConfig language editor by Egidio Romano from Karma(In)Security. Thanks a lot for reporting this issue! The vulnerability requires that the attacker is correctly logged in as the 'admin' user (the account with superadmin privilege) in ISPConfig, so an attacker must know the administrator password. Not affected are logins from Clients, Resellers, or Email users and also not logins from additionally created admin users.
Also not affected are systems where the language editor is disabled. The language editor can be disabled by setting:
```
admin_allow_langedit=no
```
in the file /usr/local/ispconfig/security/security_settings.ini.3.2.11p1https://git.ispconfig.org/ispconfig/ispconfig3/-/issues/6599Issue in ajax_get_json.php when $dkim_strength = 02023-12-03T19:04:30ZTill BrehmIssue in ajax_get_json.php when $dkim_strength = 0Reported by M Roji:
I found some bug, that make my script not working properly.
The bug is the code in file /usr/local/ispconfig/interface/web/mail/ajax_get_json.php
```
$dkim_strength = $app->functions->intval($mail_config['dkim_stre...Reported by M Roji:
I found some bug, that make my script not working properly.
The bug is the code in file /usr/local/ispconfig/interface/web/mail/ajax_get_json.php
```
$dkim_strength = $app->functions->intval($mail_config['dkim_strength']);
if ($dkim_strength=='') $dkim_strength = 2048;
```
The right way is
```
$dkim_strength = $app->functions->intval($mail_config['dkim_strength']);
if ($dkim_strength==0) $dkim_strength = 2048;3.2.12https://git.ispconfig.org/ispconfig/ispconfig3/-/issues/6584DNS - any not allowed in also_notify [bind restart fail]2023-12-03T19:00:50ZHannesDNS - any not allowed in also_notify [bind restart fail]## Summary
"any" not allowed in also_notify \[bind restart fail\]
## Steps to reproduce
1. type "any" into DNS-\>some Zone-\> Zone settings -\> Also Notify Field
2. try to restart bind (will fail) with
```plaintext
02-Oct-2023 09:...## Summary
"any" not allowed in also_notify \[bind restart fail\]
## Steps to reproduce
1. type "any" into DNS-\>some Zone-\> Zone settings -\> Also Notify Field
2. try to restart bind (will fail) with
```plaintext
02-Oct-2023 09:34:39.046 config: error: /etc/bind/named.conf.local:4: unable to find primaries list 'any'\
02-Oct-2023 09:34:39.046 general: error: reloading configuration failed: failure
```
## Correct behaviour
Disallow value "any" in field also-notify ("any" in xfer is ok)
## Environment
Ubuntu 22.04 - ISPConfig 2.3.11
```plaintext
Output of the command
```
## Proposed fix
optional, of course.\\
Maybe change the check or write other function for also_notify
```plaintext
Index: interface/lib/classes/validate_dns.inc.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/interface/lib/classes/validate_dns.inc.php b/interface/lib/classes/validate_dns.inc.php
--- a/interface/lib/classes/validate_dns.inc.php
+++ b/interface/lib/classes/validate_dns.inc.php (date 1696240257952)
@@ -292,7 +292,7 @@
if($validator['allowempty'] != 'y') $validator['allowempty'] = 'n';
if($validator['allowempty'] == 'y' && $field_value == '') {
//* Do nothing
- } elseif ($field_value == 'any' && $field_name != ) {
+ } elseif ($field_value == 'any' && $field_name != "also_notify") {
//* Do nothing
} else {
//* Check if its a IPv4 or IPv6 address/range
```3.2.12https://git.ispconfig.org/ispconfig/ispconfig3/-/issues/6606Wrong german translation in $wb['sender_cc_note_txt'] (de_mail_user.lng)2023-12-03T19:00:17ZHannesWrong german translation in $wb['sender_cc_note_txt'] (de_mail_user.lng)Englisch: $wb\['sender_cc_note_txt'\] = '(One email address only)';
Actual German: $wb\['sender_cc_note_txt'\] = '(Mehrere E-Mail-Adressen mit Kommas trennen)';
Correct German: $wb\['sender_cc_note_txt'\] = '(Nur eine E-Mail-Adresse)';Englisch: $wb\['sender_cc_note_txt'\] = '(One email address only)';
Actual German: $wb\['sender_cc_note_txt'\] = '(Mehrere E-Mail-Adressen mit Kommas trennen)';
Correct German: $wb\['sender_cc_note_txt'\] = '(Nur eine E-Mail-Adresse)';3.2.12HannesHanneshttps://git.ispconfig.org/ispconfig/ispconfig3/-/issues/6592Website edit - after an validations error (example write xxx into Quota and ...2023-12-02T10:22:10ZHannesWebsite edit - after an validations error (example write xxx into Quota and save) than document_root is empty## Summary
Edit a Website \[Tab Domian\] - trigger an error (example write xxx into Quota and save) than document_root is empty (and maybe other)
(Maybe it is only "cosmetic" but not sure - there a lot of variables/code is this form)
...## Summary
Edit a Website \[Tab Domian\] - trigger an error (example write xxx into Quota and save) than document_root is empty (and maybe other)
(Maybe it is only "cosmetic" but not sure - there a lot of variables/code is this form)
## Steps to reproduce
1. Edit a Website
2. trigger an validations error (example write xxx into Quota)
$this-\>dataRecords contains (web_vhost_domain_edit)
`Array ( [domain_id] => 1 [sys_userid] => 1 [sys_groupid] => 2 [sys_perm_user] => riud [sys_perm_group] => ru [sys_perm_other] => [server_id] => 1 [ip_address] => * [ipv6_address] => [domain] => testdom.xx [type] => vhost [parent_domain_id] => 0 [vhost_type] => name [document_root] => /var/www/clients/client1/web1 [web_folder] => [system_user] => web1 [system_group] => client1 [hd_quota] => 44 [traffic_quota] => -1 [cgi] => n [ssi] => n [suexec] => y [errordocs] => 1 [is_subdomainwww] => 1 [subdomain] => www [php] => no [ruby] => n [python] => n [perl] => n [redirect_type] => [redirect_path] => [seo_redirect] => [rewrite_to_https] => n [ssl] => n [ssl_letsencrypt] => n [ssl_letsencrypt_exclude] => n [ssl_state] => [ssl_locality] => [ssl_organisation] => [ssl_organisation_unit] => [ssl_country] => [ssl_domain] => [ssl_request] => [ssl_cert] => [ssl_bundle] => [ssl_key] => [ssl_action] => [stats_password] => [stats_type] => awstats [allow_override] => All [apache_directives] => [nginx_directives] => [php_fpm_use_socket] => y [php_fpm_chroot] => n [pm] => ondemand [pm_max_children] => 10 [pm_start_servers] => 2 [pm_min_spare_servers] => 1 [pm_max_spare_servers] => 5 [pm_process_idle_timeout] => 10 [pm_max_requests] => 0 [php_open_basedir] => /var/www/clients/client1/web1/web:/var/www/clients/client1/web1/private:/var/www/clients/client1/web1/tmp:/var/www/testdom.xx/web:/srv/www/testdom.xx/web:/usr/share/php5:/usr/share/php:/tmp:/usr/share/phpmyadmin:/etc/phpmyadmin:/var/lib/phpmyadmin:/dev/random:/dev/urandom [custom_php_ini] => [backup_interval] => none [backup_copies] => 1 [backup_format_web] => default [backup_format_db] => gzip [backup_encrypt] => n [backup_password] => [backup_excludes] => [active] => y [traffic_quota_lock] => n [proxy_directives] => [last_quota_notification] => [rewrite_rules] => [added_date] => 2023-10-19 [added_by] => admin [directive_snippets_id] => 0 [enable_pagespeed] => n [http_port] => 80 [https_port] => 443 [folder_directive_snippets] => [log_retention] => 10 [proxy_protocol] => n [server_php_id] => 0 [jailkit_chroot_app_sections] => [jailkit_chroot_app_programs] => [delete_unused_jailkit] => n [last_jailkit_update] => 2023-10-19 [last_jailkit_hash] => )`
$this-\>dataRecords after an Error
`Array ( [server_id] => 1 [ip_address] => * [ipv6_address] => [domain] => testdom.xx [type] => vhost [parent_domain_id] => 0 [vhost_type] => name [hd_quota] => 0 [traffic_quota] => -1 [cgi] => n [ssi] => n [suexec] => y [errordocs] => 1 [subdomain] => www [ssl] => n [ssl_letsencrypt] => n [php] => no [server_php_id] => 0 [perl] => n [ruby] => n [python] => n [enable_pagespeed] => [active] => y [web_folder] => )`
## Environment
Ubuntu 22.04 ISPConfig version: 3.2.113.2.12https://git.ispconfig.org/ispconfig/ispconfig3/-/issues/6591Further Improve PHP 8.2 support2023-12-02T10:17:09ZTill BrehmFurther Improve PHP 8.2 supporthttps://forum.howtoforge.de/threads/php-warning-undefined-variable.13566/#post-65093https://forum.howtoforge.de/threads/php-warning-undefined-variable.13566/#post-650933.2.12https://git.ispconfig.org/ispconfig/ispconfig3/-/issues/6614Spamfilter configuration is not updated when changing the policy through API2023-12-02T10:15:00ZThomSpamfilter configuration is not updated when changing the policy through API<!-- Before creating a bug report, please:
- Read the contribution guidelines: https://git.ispconfig.org/ispconfig/ispconfig3/-/blob/develop/CONTRIBUTING.md
- Do not ask support questions here. If you are unsure if your problem is a bug,...<!-- Before creating a bug report, please:
- Read the contribution guidelines: https://git.ispconfig.org/ispconfig/ispconfig3/-/blob/develop/CONTRIBUTING.md
- Do not ask support questions here. If you are unsure if your problem is a bug, post a thread on the forum: https://www.howtoforge.com/community/#ispconfig-3.23
- Make sure to remove any content from the description that you did not add. For example, if there are no related log entries, remove the whole "Related log entries" part.
-->
## Summary
<!-- What is happening and what is wrong with that? -->
When updating a spam policy through the API with mail_policy_update, there is no trigger to update the config files that are based on this policy.
## Steps to reproduce
1. Send POST request to remote/json.php?mail_policy_update
## Correct behaviour
<!-- What should happen instead? -->
The configuration should be updated. This does happen when making a change to the policy through the UI:
```
function onAfterDatalogSave($insert = false) {
global $app;
if(!$insert && $this->record_has_changed){
$spamfilter_users = $app->db->queryAllRecords("SELECT * FROM spamfilter_users WHERE policy_id = ?", intval($this->id));
if(is_array($spamfilter_users) && !empty($spamfilter_users)){
foreach($spamfilter_users as $spamfilter_user){
$app->db->datalogUpdate('spamfilter_users', $spamfilter_user, 'id', $spamfilter_user["id"], true);
// check if this is an email domain
if(substr($spamfilter_user['email'],0,1) == '@') {
$domain = substr($spamfilter_user['email'],1);
// Nothing special to do for a domain
}
}
}
}
}
```
## Environment
ISPConfig version: 3.2.11
<!-- _you can use `grep 'ISPC_APP_VERSION' /usr/local/ispconfig/server/lib/config.inc.php` to get it from the command line_ -->
## References
https://forum.howtoforge.com/threads/rspamd-spamfilter-policy-conf-file-not-update-on-spamfilter-policy-score-update-via-api.91491/#post-4521193.2.12https://git.ispconfig.org/ispconfig/ispconfig3/-/issues/6612as Client -> new website - php handler default set to system default even if ...2023-11-24T07:23:04ZHannesas Client -> new website - php handler default set to system default even if in client limit the option is disabled## Summary
as Client -\> new website - php handler default set to system default even if in client limit the option is disabled
If global setting (system-\>server config-\>web-\>php) Default PHP Handler is Fast-CGI than customer can ch...## Summary
as Client -\> new website - php handler default set to system default even if in client limit the option is disabled
If global setting (system-\>server config-\>web-\>php) Default PHP Handler is Fast-CGI than customer can choose fast cgi (in the \<select\>) even if in client limit the option is disabled
## Steps to reproduce
1. create client template with the only php handler option "Disabled" and add it to an client
2. if global setting (system-\>server config-\>web-\>php) Default PHP Handler is Fast-CGI than customer can choose fast cgi on new websites
3. create a website as user
## Environment
Ubuntu 22.04 ISPConfig 3.2.11p1
## Proposed fix
maybe there is an better option/possibility somewhere in the form definition to set the dynamic default values
my change would be
```plaintext
diff --git a/interface/web/sites/web_vhost_domain_edit.php b/interface/web/sites/web_vhost_domain_edit.php
--- a/interface/web/sites/web_vhost_domain_edit.php
+++ b/interface/web/sites/web_vhost_domain_edit.php
@@ -117,19 +117,31 @@
$server_id = $web_servers[0];
$app->tpl->setVar("server_id_value", $server_id, true);
unset($web_servers);
- } else {
+ // Set the default php handler on new form for the client
+ $client = $app->db->queryOneRecord("SELECT client.web_php_options FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = ?", $client_group_id);
+ $allowedPHPHandler = explode(',', $client['web_php_options']);
+ $web_config = $app->getconf->get_server_config($server_id, 'web'); //Get default php handler
+ if (in_array($web_config['php_handler'],$allowedPHPHandler)) { //if default php handler is in allowed php handler of client
+ $app->tform->formDef['tabs']['domain']['fields']['php']['default'] = $web_config['php_handler'];
+ } elseif(in_array('no',$allowedPHPHandler)) { //check if "Disabled" is allowed in template - if yes set it as default
+ $app->tform->formDef['tabs']['domain']['fields']['php']['default'] = 'no';
+ } elseif (count($allowedPHPHandler) > 0 && $allowedPHPHandler != "") { // else set the first allowed in the list if there is an element
+ $app->tform->formDef['tabs']['domain']['fields']['php']['default'] = $allowedPHPHandler[0];
+ } else { //set it to disabled if no other option is available (changes in templates of existing websites bypass the checks in client limits)
+ $app->tform->formDef['tabs']['domain']['fields']['php']['default'] = 'no';
+ }
+ }else {
$settings = $app->getconf->get_global_config('sites');
$server_id = intval($settings['default_webserver']);
$app->tform->formDef['tabs']['domain']['fields']['server_id']['default'] = $server_id;
+ $web_config = $app->getconf->get_server_config($server_id, 'web');
+ $app->tform->formDef['tabs']['domain']['fields']['php']['default'] = $web_config['php_handler'];
}
if(!$server_id){
$default_web_server = $app->db->queryOneRecord("SELECT server_id FROM server WHERE web_server = ? ORDER BY server_id LIMIT 0,1", 1);
$server_id = $default_web_server['server_id'];
}
- $web_config = $app->getconf->get_server_config($server_id, 'web');
- $app->tform->formDef['tabs']['domain']['fields']['php']['default'] = $web_config['php_handler'];
$app->tform->formDef['tabs']['domain']['readonly'] = false;
-
$app->tpl->setVar('vhostdomain_type', $this->_vhostdomain_type, true);
parent::onShowNew();
}
```
##3.2.12