Commit Graph

3210 Commits

Author SHA1 Message Date
Camille Lafitte 3ea150e2f7 Use sed_script during roundcube installation
* SED_SCRIPT is provided as second argument to all install.d/ scripts

Follow exit status as explained at https://www.gnu.org/software/bash/manual/html_node/Exit-Status.html
2024-01-26 11:14:34 +01:00
Kienan Stewart ad1940201b Pass SED_SCRIPT to install.d scripts for templating action 2024-01-25 18:11:08 +01:00
Kienan Stewart cbfbb0c21a Use mktemp to get the filename for storing the templating script
Using a fixed string could allow for abuse by anyone who has access to /tmp.
One could place a symbolic link to any file to cause it to be overwritten
when alternc.install is run.
2024-01-25 18:10:34 +01:00
Km bd03632163 Merge pull request #495 from tobald/unittest_fixes
Provide some unit test fixes
2024-01-25 15:36:30 +01:00
Camille Lafitte 21e6353314 Change order php dependencies
* We must downgrade php version requirement
* Prevent a too recent php version since changes about php package versioning
2023-11-15 16:45:43 +01:00
Camille Lafitte 08f219779e Provide AlternC 3.5 RC 2
* As defined RC2 is released with all evolves provide by Koubmit team
* Compatible distribution should be stretch and buster
2023-11-09 16:13:24 +01:00
Camille Lafitte 9723969017 Fix #247
* Missing backport from koumbit/pu
2023-11-03 10:04:35 +01:00
Camille Lafitte 432f32d98a Fix about #337
* sql update was missing during backport action
* close #337
2023-11-02 18:48:35 +01:00
Nina e467c1c5f1 Update translations README 2023-09-29 10:56:20 +02:00
Nina 0b7ec2716e Add translation and update .po files 2023-09-29 10:56:11 +02:00
Nina fa8e4a71e0 Print error message returned by before_alternc_add_member hook 2023-09-29 10:55:59 +02:00
Nina 0b5725cb86 Fix french message on file creation 2023-09-29 10:55:53 +02:00
Kienan Stewart 1f932fd5ec Issue #526: Fix dovecot quota warnings 2023-09-29 10:55:34 +02:00
Nina 5eac4b375d Restrict password reset requests to username 2023-09-29 10:54:19 +02:00
Kienan Stewart b4062026d9 Allow the help_baseurl to be configured via interface variables 2023-09-29 10:54:01 +02:00
Nina b61c69f007 Remove duplicated DB update to disable sub-domain 2023-09-29 10:53:45 +02:00
Nina 4832594a1e Fix sub-domains activation/deactivation 2023-09-29 10:53:31 +02:00
Kienan Stewart 63b19754b5 Set alterncpanel as group owner of mysql configuration on install
Fixes #504
2023-09-29 10:53:21 +02:00
Kienan Stewart a5d8d6d943 Remove alternc-squirrelmail
* close #502
* close #464
* close #316
2023-09-29 10:51:40 +02:00
Nina c5c087155a Use ORDER BY when querying for things to do on a subdomain in m_dom
close #496
2023-09-29 10:44:48 +02:00
Nina 8dc23ccf06 Add hook before account creation 2023-09-29 10:43:41 +02:00
Kienan Stewart 8b64c144b2 Improve feedback to users when protecting folder with htaccess
The current behaviour of protecting a folder only modifies adds the
relevant .htaccess configuration lines if the file doesn't already
exist. In the case that it exists, no change is made and it appears to
"not work" for users.

This commit improves the feedbackup to users about what is happening,
and gives them the necessary information to modify their custom
.htaccess file with the appropriate configuration lines.
2023-09-29 10:43:31 +02:00
Kienan Stewart da50b32d61 Add variable to control if DNS is enabled for free domains 2023-09-29 10:43:10 +02:00
Kienan Stewart 08bb4af74d Remove dovecot quota entries when mailboxes are truly deleted
Without this, when a mailbox is deleted, the entry in dovecot_quota
persists and the user's see the that the mailbox continues to take
space on the information page.
2023-09-29 10:42:36 +02:00
Kienan Stewart 504e77034f Use a single query to fetch database size
The procedure can use a single query instead of a 1 + N queries, where
N is the number of tables on the server.

There is a minor side-effect in the result: databases with no tables
will not be listed in the output. Before, they would be output but
with an empty size value.

close #452
2023-09-28 09:18:44 +02:00
Nina f56809fd8a Append changes instead of overriding
close #428
2023-09-28 09:16:41 +02:00
Nina 7e05910237 Adding compatibility between url domain type and MX records
Fix indentation
cf #428
2023-09-28 09:15:52 +02:00
Kienan Stewart 40fed101e3 Fixes #441: Correct DMARC entry syntax 2023-09-28 09:08:15 +02:00
Kienan Stewart 6a3af13817 Filter db information searches to limit results to databases owned by current user 2023-09-28 09:05:43 +02:00
Kienan Stewart 20db4fceba Do not re-create sub_domaines unique key compte
New installations haven't had this unique key since 2014
(d9e24d9703) and only old
installations passing through 3.1.0~a would have had it
added.

Given that the unique key constraint was never dropped during
an AlternC upgrade, I think it should just be dropped here.

Re-creating is problematic when merged with other recent changes
because the length of both the key and column size are longer
than what MySQL/MariaDB support.
2023-09-28 09:04:31 +02:00
Km cd123f99f0
Merge pull request #437 from AlternC/415-upgrade_notice
Fixes #415: Add upgrade notice when installing 3.5 if upgrading from a version less than 3.3.12
2023-09-28 09:03:30 +02:00
Kienan Stewart 8cabbc7e50 Fix SQL syntax error in 3.5.0.2.sql upgrade
Refs #435
2023-09-28 09:01:02 +02:00
Kienan Stewart 451ed4c369 Add confirmation to preinstallation to warn about data loss
Refs #415
2023-09-28 09:00:44 +02:00
Kienan Stewart ec143dda02 Update upgrade notice to mention passing through 3.3.12
Refs #415 #416
2023-09-28 09:00:22 +02:00
Kienan Stewart 16ff2ead31 Fix warning when a user has many scheduled tasks to run
When a user has more than m_cron::MAX_SOCKETS actions to run when the
cron script is invoked, it uses a rolling window while running the
batch execution in CURL. The followin warning happens because the
url key isn't being used when getting the information out of the array.
2023-09-28 08:58:44 +02:00
Kienan Stewart c53eda9b9e Limit incrond scripts to watching a specific file
When they both watch the same directory, when a file is touched - eg,
/run/alternc/incron/inotify_do_action.lock both scripts are started
running in children of the top-level /usr/sbin/incrond script. When
those scripts finish, one or the other tends to start watching for all
the incron tables again (created more and more children each time).

Maybe it's a bug in incron.

Test:
 * Check number of running processes with ps faux | grep incron
 * Do an action, eg. chmod a folder in the web interace
 * Re-check the number of running processes, they should stay the same
 not increase
2023-09-28 08:58:27 +02:00
Kienan Stewart d3b1051543 Fix typo in chown command 2023-09-28 08:58:10 +02:00
Kienan Stewart 7957deccba Normalize action return value recorded in database
While working on #424, I discovered that actions that were run were unable
to record their run state into the database because the return code value
being passed to m_action::finish was a string and not an integer.

I added a shim to try to normalize the data passed onwards to m_action::finish,
although in the long term I think a proper cleanup of the cases should be done.
2023-09-28 08:55:54 +02:00
Kienan Stewart 6dc3b0d5a3 Watch a different directory for incrond actions by default
This should help with #424 by switching the watched directories to a
sub-directory of /run/alternc. There are many other scripts create and
handle files in the /run/alternc that were causing incrond to start up
quite often.
2023-09-28 08:55:34 +02:00
Kienan Stewart ef21e3e144 Fix tabs/spacing 2023-09-28 08:53:09 +02:00
Guillaume Est Une Palourde a675041874 Set the disabled flag so its not permanently pending when disabling domains 2023-09-28 08:52:41 +02:00
Guillaume Est Une Palourde 36563f7298 Added a return value so query that sets the result and resets the action to OK don't crash 2023-09-28 08:52:18 +02:00
Kienan Stewart e028b15e7b Hide matomo users who have access to a site but not made by AlternC
Users made in the Matomo interface and given an access to a site
that's in AlternC show up without this restriction. When that happens,
the user is no longer able to modify permissions for any of the Matomo
users from their AlternC account.
2023-09-28 08:49:07 +02:00
Kienan Stewart c95dd63c26 Remove trailing whitespace 2023-09-28 08:48:39 +02:00
Kienan Stewart 95efdafd3d Modify bind9 apparmor profile on installation
If the apparmor configuration file is there, an extra include will be added
and the install/app/usr.sbin.named-alternc file deployed to the apparmor local
configuration directory.

This allows bind to work with AlternC and apparmor enabled out of the box on
Debian Buster.
2023-09-27 18:10:09 +02:00
Kienan Stewart e3a59dd504 Remove trailing '.' from the return values of m_dom::whois()
The answer from dig is typically fully qualified with a trailing '.',
but the callers of whois() expect the nameservers without that trailing dot.
2023-09-27 18:09:56 +02:00
Guillaume Est Une Palourde fc8ce3d487 Made it possible to update a subdomain from vhost https to vhost http 2023-09-27 18:09:37 +02:00
Kienan Stewart c59bdce1f3 Add hook to allow adding bind tokens 2023-09-27 18:08:38 +02:00
Kienan Stewart ba199de626 Remove maxlength specific from e-mail password and confirmation fields
Fixes #382

The maxlength attribute will silently drop all characters after the
indicated limit. Users will not have feedback that their password
is (now) wrong.

There seems to a password policy that is actively checked, and may be
defined by the admin (default: 64 character limit).
2023-09-27 18:07:11 +02:00
Kienan Stewart bbdd2c2a64 Update package requirements for Debian Buster / PHP 7.3
Note: PHPMyAdmin is not available in buster, but is a requirement for AlternC,
so that package will need to be sourced elsewhere.
2023-09-27 18:03:57 +02:00