Compare commits

...

3310 Commits

Author SHA1 Message Date
Michael Kaufmann
9d0e463906 set version to 2.0.22 for upcoming maintenance release
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2023-09-01 09:58:33 +02:00
Daniel
a7198f58ce Fix"Add" shortcut link in email address navigation (#1169)
Seems to have changed when adding the domain-filter overview for email addresses, but not updated in the navigation.
2023-08-13 08:19:32 +02:00
Michael Kaufmann
47be4b2847 remove shortcode for --diff-params in configdiff command
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2023-08-12 09:04:58 +02:00
Daniel
b0fae4bd14 Add config-diff CLI Command (#1168)
---------

Co-authored-by: Michael Kaufmann <d00p@froxlor.org>
2023-08-12 09:03:16 +02:00
Michael Kaufmann
4711a41436 correct validation of hostingplan name and description
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2023-08-11 13:57:21 +02:00
Michael Kaufmann
faa71ceaef forgot to save one file for the last commit
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2023-08-11 12:13:33 +02:00
Michael Kaufmann
2d30394150 correctly redirect to last-page if session is timed out and remove passing script/qrystr url parameters
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2023-08-11 12:09:23 +02:00
Michael Kaufmann
99c1182af8 adjustments in installation for debian 12 and fcgid / disabling mod_php; thx to Konstantin
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2023-07-27 11:25:03 +02:00
Michael Kaufmann
d9abe58dd2 adjust proftpd config for debian 12 bookworm
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2023-07-22 13:00:11 +02:00
Michael Kaufmann
23034b8ad2 rework path to certificates non-ecc/ecc, regardless of current setting
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2023-07-21 08:54:29 +02:00
Michael Kaufmann
1cae5638d3 fix optional-flag for IpsAndPorts.add() and IpsAndPorts.update()
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2023-07-16 17:09:45 +02:00
Michael Kaufmann
ce9a5f97a3 validate non-empy admin-name in Admins.update()
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2023-07-16 16:44:46 +02:00
Michael Kaufmann
c38b90deef Merge branch 'main' of github.com:Froxlor/Froxlor 2023-07-07 09:52:37 +02:00
Michael Kaufmann
13daa7d6fa set version to 2.0.21 for upcoming maintenance release
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2023-07-07 09:50:50 +02:00
Michael Kaufmann
b0e43d332d validate generated config-json parameter string
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2023-07-07 09:47:17 +02:00
jabertwo
75c8754fb4 Fix typo in pathDescriptionSubdomain (#1156) 2023-06-26 11:03:48 +02:00
Michael Kaufmann
e0fa64f897 fix update-check unit-tests now that the current testing version is at 2.1.0-dev1
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2023-06-08 12:33:48 +02:00
Michael Kaufmann
ed72fd1766 exclude password fields from being filtered/escaped by AntiXSS, fixes #1150
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2023-06-08 12:14:13 +02:00
Michael Kaufmann
826ae36647 adjust log-levels in API methods
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2023-06-05 12:13:38 +02:00
Michael Kaufmann
9ddf24539e remove hidden fields from login/passwd-reset; refs #1102
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2023-06-05 12:10:39 +02:00
Grigory Morozov
3940c1429d Correcting Nginx location match, fixes #1153 2023-06-05 08:06:44 +02:00
Michael Kaufmann
c236d9eaab set version to 2.0.20 for upcoming release
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2023-06-02 20:13:36 +02:00
Michael Kaufmann
688994e40c idna encode umlaut-emailaddresses when adding email-forwarder
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2023-05-29 20:52:57 +02:00
Michael Kaufmann
9facaee809 re-enable fcgid/php-fpm activation-validate-check
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2023-05-28 15:49:06 +02:00
Michael Kaufmann
a7dd5f4685 show 0 value of resource-fields if value is empty, fixes #1149
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2023-05-28 10:46:28 +02:00
Michael Kaufmann
da810ea953 secure filename of local-archive in webupdate
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2023-05-25 09:51:55 +02:00
Michael Kaufmann
51b6e067e8 idna encode umlaut-emailaddresses when adding/editing email-account; use correct password-suggestion-layout in change-email-account formfield
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2023-05-25 08:26:39 +02:00
Michael Kaufmann
34cf6698bc remove superfluous try_files in nginx config if php-backend (non-fastcgi) is used
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2023-05-15 20:14:26 +02:00
Michael Kaufmann
4642160724 add same loginfail restrictions for entering 2fa code as for user/pwd login
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2023-05-12 10:36:27 +02:00
Nicolas Thumann
78a259ef3b Fix IPv6 address in cookie domain (#1137)
* Implement getCookieHost to extract cookie host from HTTP_HOST
2023-05-10 08:26:08 +02:00
Nicolas Thumann
68cf4ab69a Fix typo in English privileged_passwd (#1136) 2023-05-09 18:52:43 +02:00
Michael Kaufmann
d5661d492d set version to 2.0.19 for bugfix release
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2023-05-07 11:07:31 +02:00
Michael Kaufmann
6900898ae1 typo in updater
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2023-05-07 11:03:21 +02:00
Michael Kaufmann
d90fb7fa68 fix mysql-pdo check on installation, set version to 2.0.18 for bugfix release
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2023-05-07 10:54:47 +02:00
Michael Kaufmann
4ea8629fcc set version to 2.0.17 for bugfix release
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2023-05-06 22:08:43 +02:00
Michael Kaufmann
9d4ff8698d fix ratelimiting when settings do not exist (yet)
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2023-05-06 22:00:19 +02:00
Michael Kaufmann
b164038846 set version to 2.0.16 for upcoming maintenance release
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2023-05-05 21:10:01 +02:00
Michael Kaufmann
5c46960734 fix language mixup for rate-limit-interval setting
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2023-05-05 13:21:12 +02:00
Michael Kaufmann
a7f4f0c737 output nicer message when hitting rate limit
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2023-05-04 10:55:34 +02:00
Michael Kaufmann
b64dd501dd fix missing use-statement
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2023-05-02 10:27:28 +02:00
Michael Kaufmann
1679675aa1 introduce http-request rate-limit; smaller fixes
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2023-05-02 10:19:53 +02:00
sro0
640466f301 Disable autocomplete on 2FA input element (#1133)
2FA codes change every login. So there is no need to save entered values in browser and suggest them again during future logins.

Co-authored-by: sro0 <>
2023-04-29 09:56:15 +02:00
Michael Kaufmann
9c9771a371 fix generation of current_ips array in Domains-API
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2023-04-25 20:09:18 +02:00
Michael Kaufmann
1922b3ce65 set default value for email_quota to settings-default in EmailAccounts.add(); fixes #1132
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2023-04-25 19:50:41 +02:00
Michael Kaufmann
83e819908a set default value of 'openbasedir_path' to 0 in SubDomain.add() like we do in Domains.add()
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2023-04-25 19:49:09 +02:00
Michael Kaufmann
0924aa644b update dependencies
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2023-04-25 19:48:29 +02:00
Lukas Bableck
7711ce1d66 Allow admins to edit openbasedir_path for domains (#1125)
* Add openbasedir_path formfield
* Add openbasedir_path field values to admin_domains page
2023-04-25 19:42:27 +02:00
Michael Kaufmann
7dae63e586 Merge branch 'main' of github.com:Froxlor/Froxlor 2023-04-25 19:40:22 +02:00
Michael Kaufmann
1bcaa45492 add copy-system-details-to-clipboard button on admin dashboard; fixes #1126
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2023-04-25 19:36:46 +02:00
Michael Kaufmann
66cb114f0d trigger rebuild of config files after changing only ip-settings in domains
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2023-04-25 19:33:52 +02:00
Michael Kaufmann
1c5d60dcfd Add mysql to required extensions 2023-04-23 13:28:33 +02:00
Michael Kaufmann
b6da6356fc Update build-docs.yml 2023-04-23 12:08:19 +02:00
Michael Kaufmann
c09670cc45 make it clearer that the finishing commands have to be exectuted as 'root'; fixes #1128
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2023-04-23 11:56:20 +02:00
Michael Kaufmann
464f5b7bed fix adding mysql-server to customers without any prior assigned mysql-server, fixes #1123; fix issues with displaying set value if path-mode is 'dropdown'
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2023-04-19 20:58:48 +02:00
Michael Kaufmann
c799235c24 corrected display of special-case titles of settings
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2023-04-14 08:23:37 +02:00
Michael Kaufmann
a2860e70a5 strictly check whether field to select is the id or the email-address b/c is cases of email-addresses starting with a digit this is somehow used as value for the id field and return the wrong entity
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2023-04-14 08:22:31 +02:00
Michael Kaufmann
95a96d46a6 put php-fpm directives in Directory-directive in apache2; fixes #1120
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2023-04-11 09:48:26 +02:00
Michael Kaufmann
81f3dbda31 respect no-try_files setting also in protected directories
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2023-04-10 09:33:43 +02:00
Michael Kaufmann
4eb4191843 don't run cron tasks if requirements return non-success; fixes #1122
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2023-04-08 10:49:59 +02:00
Michael Kaufmann
ca433d8a61 set version to 2.0.15 for update-bugfix release
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2023-04-07 18:58:19 +02:00
Michael Kaufmann
8f4dfe1514 Fix the fix... 2023-04-07 11:51:44 +02:00
Michael Kaufmann
ee42f5168e Use correct SQL Syntax for older versions 2023-04-07 11:48:43 +02:00
Michael Kaufmann
fc8ca57f8c set version to 2.0.14 for upcoming release
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2023-04-07 08:52:12 +02:00
Michael Kaufmann
7e4bba2d55 corrected mail-log parsing, refs #1119
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2023-03-27 12:53:21 +02:00
Michael Kaufmann
7e635f9be4 correctly retriggered certificate issue on froxlor-vhost alias-domain changes, fixes #1115
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2023-03-24 09:17:04 +01:00
Michael Kaufmann
e9406a20f2 readd php interpretation to php-enabled customers/domains in directory protection, fixes #1118
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2023-03-23 19:18:39 +01:00
Michael Kaufmann
de7729cec8 add certificate metadata to db table
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2023-03-23 12:40:01 +01:00
Michael Kaufmann
d60e48849b correct languages for mail/file templates
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2023-03-23 08:56:45 +01:00
Michael Kaufmann
908df5a7bb remove sorting from ssl 'issuer' as this data is being read from the certificate content and not the database/table and therefore cannot be sorted using the API, fixes #1116
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2023-03-21 14:22:34 +01:00
Michael Kaufmann
c1952afb94 dont sort indexed array as the keys get lost; fixes #1114
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2023-03-20 11:12:30 +01:00
Michael Kaufmann
7a22e8f4dd open newsfeed-links in a new tab, fixes #1112
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2023-03-18 20:04:02 +01:00
Michael Kaufmann
3ac0da2cdd corrected checkLocalGroup() validation if setting did not change, fixes #1111
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2023-03-17 08:27:31 +01:00
dependabot[bot]
eb816c4cc6 Bump webpack from 5.75.0 to 5.76.1 (#1109)
Bumps [webpack](https://github.com/webpack/webpack) from 5.75.0 to 5.76.1.
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](https://github.com/webpack/webpack/compare/v5.75.0...v5.76.1)

---
updated-dependencies:
- dependency-name: webpack
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-15 13:21:01 +01:00
Michael Kaufmann
64d8bf4fba avoid socket length limitations leading to cut-off/invalid filename for very long domain and/or loginnames, fixes #1108
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2023-03-15 13:18:43 +01:00
Michael Kaufmann
ae6ee95973 avoid using posix-extension function before requirement-check can test for it and inform user
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2023-03-15 08:54:50 +01:00
Michael Kaufmann
e9051dc30a add spanish language translation reference to german language file
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2023-03-08 09:48:13 +01:00
scramatte
b6c7c53c3a Add Spanish language (#1105)
* Add Spanish localization
* add spanish to languages list
2023-03-08 09:43:35 +01:00
Michael Kaufmann
f36bc61fc7 better validation for uploaded/imported image files
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2023-03-08 09:33:30 +01:00
Michael Kaufmann
c56e0b9dac add 'Passing HTTP AUTH BASIC' header option when using FCGID; fix typeerror in parameter for Froxlor\Dns\Dns; require php-gd extension for validating uploaded images
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2023-03-08 09:33:02 +01:00
Michael Kaufmann
1deb08bf75 use correct parameter in PowerDNS::cleanDomainZone(), fixes #1104
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2023-03-04 14:42:31 +01:00
Michael Kaufmann
b30d7a8252 set version to 2.0.13 for maintenance release
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2023-03-03 13:05:09 +01:00
Michael Kaufmann
b03e11c18d fix email-domain navigation and descriptions
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2023-03-03 13:03:12 +01:00
Michael Kaufmann
bf7d22a794 typecast parameter values for sizeReadable(), fixes #1103
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2023-02-28 08:15:31 +01:00
Michael Kaufmann
fb57a8a3b5 update dependencies
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2023-02-26 10:24:44 +01:00
Mickey
0d625797b0 Add command to remove debians prerotate script (#1101)
Co-authored-by: Mickey Knox <mickey@netfreaks.org>
2023-02-22 10:01:25 +01:00
Michael Kaufmann
6777fbf229 type-safe comparsion of md5-compatibility hash-validation
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2023-02-22 09:35:27 +01:00
Michael Kaufmann
23f1f79eff specify clearly which tls settings are being overwritten/ignored depending on the 'Override system TLS settings' flag when adding/updating Domains
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2023-02-19 12:27:56 +01:00
Michael Kaufmann
a5af104d53 keep search-fields/text in pagination links of displaying a search-result
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2023-02-19 12:06:47 +01:00
Michael Kaufmann
38d94698ce set version to 2.0.12 for bugfix release
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2023-02-17 20:47:17 +01:00
Michael Kaufmann
5ba28ef599 fix wrong request-parameter reading for table-column mangement
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2023-02-17 19:32:27 +01:00
Michael Kaufmann
a3486cc5b3 updated workflow for building/deploying documentation; added missing api-method-description for EmailDomains-API
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2023-02-17 17:53:32 +01:00
Michael Kaufmann
5ab322ab1d remove unused required function parameter in nginx cron; set default value for function parameter in lighttpd cron
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2023-02-17 13:19:48 +01:00
Michael Kaufmann
4f26bdd535 set version to 2.0.11 for upcoming release
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2023-02-17 10:26:32 +01:00
Michael Kaufmann
88f76e4355 use bcrypt hash algorithms for htpasswd password hashing instead of the old SHA1
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2023-02-17 10:00:08 +01:00
Oliver Rahner
a464d8cb19 fixed duplicated column heading (#1100) 2023-02-15 20:44:57 +01:00
Michael Kaufmann
0f596dce8b fix api parameter issue when empty values are passed
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2023-02-15 08:33:49 +01:00
Michael Kaufmann
60270b20b3 backup possible remote-db-server databases in backup-cron
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2023-02-14 11:36:39 +01:00
Michael Kaufmann
4003a8d2b6 check for existing fields when setting/updating tablelisting-columns
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2023-02-14 11:36:11 +01:00
Michael Kaufmann
89843d6f37 fix referenced quota field for searching/sorting, fixes #1099
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2023-02-12 10:08:41 +01:00
Michael Kaufmann
256a52a5da fix setting incorrect acme-challenge path on installation; fixes #1097
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2023-02-11 08:54:09 +01:00
Michael Kaufmann
c9b2bfe53c fix pagination for entity-listings with extra parameters
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2023-02-11 08:52:43 +01:00
Michael Kaufmann
98cb36327e add SPF/DKIM to Subdomain DNS Zone separately if isemaildomain = 1
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2023-02-08 12:37:20 +01:00
Michael Kaufmann
7d23e4882d fix '0 illegal offset type' when changing mysql-access-host setting
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2023-02-08 12:36:38 +01:00
Michael Kaufmann
1cc3a1d066 re-add special image_data import for exported custom-logos
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2023-02-07 17:21:39 +01:00
Michael Kaufmann
de0f7d2f01 generalize array-index name of settings to be settingsgroup_varname
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2023-02-07 13:39:09 +01:00
Michael Kaufmann
aa48ffca2b run Form::processForm() when importing settings so the same validations apply if the import file has malicious content
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2023-02-07 13:02:11 +01:00
Michael Kaufmann
802168cb5b forgot to add Validate/Validate to the last commit
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2023-02-07 11:45:57 +01:00
Michael Kaufmann
6ace2e9f3d corrected call to Domain::triggerLetsEncryptCSRForAliasDestinationDomain only if aliasdomain is a valid id; validate registration-date and termination-date only if given
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2023-02-07 11:44:07 +01:00
Michael Kaufmann
0bff360d22 another type fix
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2023-02-07 11:26:13 +01:00
Michael Kaufmann
e300acf109 corrected return type of pexecute_first
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2023-02-07 11:23:21 +01:00
Michael Kaufmann
14d8e12cdc honor deactivated flag for redirects and prepare to use domain.deactivated for domain-specific deactivation
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2023-02-07 11:19:31 +01:00
Michael Kaufmann
d29411dba6 backup nginx.conf when configuring service
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2023-02-07 11:15:56 +01:00
Michael Kaufmann
464663877c cleanup function/parameters and add type declarations where possible
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2023-02-07 11:15:19 +01:00
Michael Kaufmann
c3f769d48b remove robots.txt to actually make meta-tag robots work; fixes #1096
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2023-02-06 14:27:23 +01:00
Michael Kaufmann
f97536ed02 minor adjustments in customer-email-domain-overview
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2023-02-05 18:30:29 +01:00
Michael Kaufmann
7686effc8c new setting to select default value of 'allow api access' for new customers; fixes #1087
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2023-02-03 14:16:37 +01:00
Michael Kaufmann
ee8385467b add fallback to system-hostname for faulty http-clients not setting 'Host' in the request
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2023-02-03 13:59:12 +01:00
Michael Kaufmann
0a51d97684 add translation for new email domain overview
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2023-02-03 13:57:28 +01:00
Michael Kaufmann
67fc762eef fix let's encrypt dns validation check caused by issue in PhpHelper::gethostbynamel6()
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2023-01-31 17:32:56 +01:00
Michael Kaufmann
8378795f5d Merge branch 'main' of github.com:Froxlor/Froxlor 2023-01-31 09:33:02 +01:00
Michael Kaufmann
98e6f1df4a Merge branch 'main' of github.com:Froxlor/Froxlor 2023-01-31 09:32:21 +01:00
Michael Kaufmann
674e35e5c5 add new EmailDomains API Commands for listing domain/email-usage information; show email-domain overview when customer has >1 domains with email addresses; add EmailDomains to GlobalSearch
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2023-01-31 09:31:58 +01:00
Michael Kaufmann
b24ca44e6f fix typos
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2023-01-30 08:47:11 +01:00
Michael Kaufmann
e0f7fcd2ef fix awstats path in generated vhost config if speciallogfile=0
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2023-01-29 15:58:49 +01:00
Michael Kaufmann
c5bece64ce set version to 2.0.10 for security release
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2023-01-28 20:07:15 +01:00
Michael Kaufmann
0034681412 fix possible privilege escalation from customer to root when specifying custom error documents in directory-options
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2023-01-28 20:00:24 +01:00
Michael Kaufmann
bd5b99dc1c verify cronjob interval is one of the fixed available values
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2023-01-28 13:06:44 +01:00
Michael Kaufmann
2feb802094 validate existence of language in admin-templates
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2023-01-28 12:16:40 +01:00
Michael Kaufmann
7b08a71c59 add missing use statement for error-reporting to include the dbms version
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2023-01-28 11:57:43 +01:00
Michael Kaufmann
2a84e9c120 enforce password requirements set in settings for directory-protection
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2023-01-28 11:40:07 +01:00
Michael Kaufmann
d854e8e991 Merge branch 'main' of github.com:Froxlor/Froxlor 2023-01-26 15:23:03 +01:00
Michael Kaufmann
0a363910d6 fix potential infinite loop on errors in cli-installation; fixes #1092
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2023-01-26 15:22:39 +01:00
Maurice Preuß (envoyr)
b23d5cd909 merge branch 'main' of github.com:Froxlor/Froxlor 2023-01-25 18:51:03 +01:00
Maurice Preuß (envoyr)
3b753aa69d change session/cookie domain value, this prevents using the _ server_name when using nginx
Signed-off-by: Maurice Preuß (envoyr) <envoyr@froxlor.org>
2023-01-25 18:50:49 +01:00
Michael Kaufmann
492cd288bc enhanced themefile validation for non-default themes
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2023-01-25 13:09:06 +01:00
Marvin Stark
47938c5082 Update README.md (#1090)
Fixed typo.
2023-01-24 18:56:29 +01:00
Michael Kaufmann
97c4c9a366 Merge branch 'main' of github.com:Froxlor/Froxlor 2023-01-23 09:00:21 +01:00
Michael Kaufmann
d090e48544 validate result of Net_DNS2_Resolver::query (CNAME's are being resolved to their corresponding target A/AAAA addresses); fixes #1089
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2023-01-23 08:58:42 +01:00
Michael Kaufmann
314e4407a0 add lasst successful login to table-columns for customer overview
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2023-01-22 15:04:19 +01:00
Michael Kaufmann
ed50e03957 Merge remote-tracking branch 'origin/main' into customeremail-overview 2023-01-22 14:03:07 +01:00
Michael Kaufmann
dff7530cc5 include froxlor-vhost in validate-acme-webroot command; fixes #1088
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2023-01-22 13:01:20 +01:00
Maurice Preuß (envoyr)
19423c9644 normalize (compress) ip addresses
Signed-off-by: Maurice Preuß (envoyr) <envoyr@froxlor.org>
2023-01-20 21:26:24 +01:00
Michael Kaufmann
42b3f1e59d set version to 2.0.9
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2023-01-20 18:01:28 +01:00
Michael Kaufmann
1b77632fa8 correctly display config-services command in updater if manual commands are needed
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2023-01-19 20:19:43 +01:00
Maurice Preuß (envoyr)
867b7b1390 fix domain variable for gethostbynamel6 function
Signed-off-by: Maurice Preuß (envoyr) <envoyr@froxlor.org>
2023-01-18 14:47:25 +01:00
Maurice Preuß (envoyr)
4c6ebde58c adding new dns resolver setting for let's encrypt
Signed-off-by: Maurice Preuß (envoyr) <envoyr@froxlor.org>
Co-authored-by: Michael Kaufmann <d00p@froxlor.org>
2023-01-18 13:57:47 +01:00
Michael Kaufmann
1e013d9e9a enhance information on updater regarding acme-challenge (if lets encrypt is enabled and applicable)
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2023-01-18 11:47:55 +01:00
Michael Kaufmann
c56bc651b9 allow hiding documentation menu for customers via customers-hide-option; use --staging for acme.sh for every test-CA
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2023-01-18 08:59:59 +01:00
aPollO2k
6cbdf45a7c Typo fixed in update_2.x.inc.php (#1082)
PHO_EOL => PHP_EOL
2023-01-16 21:32:56 +01:00
Michael Kaufmann
715667e227 Merge branch 'main' of github.com:Froxlor/Froxlor 2023-01-15 23:49:09 +01:00
Michael Kaufmann
41de161555 show exact froxlor:config-services parameter for updater; better checks for changed acme-challenge paths; fix typo in PHP_EOL statement; remove crsf token from config-apply-parameter generation from within the ui
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2023-01-15 23:48:37 +01:00
Maurice Preuß (envoyr)
1f1ea370c0 add version to mix-manifest.json and add mix function
Signed-off-by: Maurice Preuß (envoyr) <envoyr@froxlor.org>
2023-01-14 21:14:55 +01:00
Michael Kaufmann
090cfc26f2 set file-log (if enabled) to be in froxlor/logs/ folder; fix ssl param directive for dovecot in Ubuntu Bionic; set version to 2.0.8
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2023-01-14 13:09:42 +01:00
Michael Kaufmann
529890b5d2 fix typo in langauge-definition
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2023-01-12 22:27:45 +01:00
Michael Kaufmann
d4a6ab146d re-add total-disspace dashboard-display on customer dashboard
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2023-01-12 16:52:14 +01:00
Michael Kaufmann
e3f02879cf restore mandatory field on domain-formfields; add translated require message and correct error-placement of the message
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2023-01-12 15:16:42 +01:00
Michael Kaufmann
b52d6df777 [UI] change require of ipandport field in domains.add and domains.delete to one-of instead of all; fixes #1078
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2023-01-12 14:53:05 +01:00
Michael Kaufmann
9e671100ae acme-challenge path adjustments if docroot changed after update from 0.10.x (via apt)
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2023-01-12 14:21:14 +01:00
Michael Kaufmann
7e801ea502 Merge branch 'main' of github.com:Froxlor/Froxlor 2023-01-12 12:20:23 +01:00
Daniel
b68522f7d5 Fix formfield image preview path (#1077) 2023-01-12 12:19:31 +01:00
Michael Kaufmann
86852942e0 add missing language-strings for traffic page
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2023-01-12 11:30:52 +01:00
Michael Kaufmann
ea88d53e39 Merge remote-tracking branch 'origin/main' into customeremail-overview 2023-01-12 09:59:22 +01:00
Michael Kaufmann
61f6a474e4 add emails-overview tablelisting
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2023-01-12 09:59:19 +01:00
Michael Kaufmann
ec05c84f4d check whether let's encrypt is enabled at all and correct acme-alias configuration file if necessary/selected
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2023-01-12 09:40:35 +01:00
Michael Kaufmann
9e13c077e9 show command to regenerate cron.d-file if previous deletion of old files could not be done automatically, fixes #1076
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2023-01-12 08:33:19 +01:00
Maurice Preuß (envoyr)
da8d315e77 remove hardcoded logo height
Signed-off-by: Maurice Preuß (envoyr) <envoyr@froxlor.org>
2023-01-11 22:43:00 +01:00
Michael Kaufmann
82af9af1e1 group email-domains in overview if there are email addresses for multiple domains
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2023-01-11 22:22:39 +01:00
Michael Kaufmann
cb67e3ae63 continue checking domains even if no config was found, thx knox
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2023-01-11 21:07:00 +01:00
Michael Kaufmann
82d15c4dc2 fixes for ValidateAcmeWebroot command
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2023-01-11 20:47:07 +01:00
Michael Kaufmann
6d048e2cee fix default mysql-dbserver for customers if not allowed to use the default (id=0) one; fixes #1075
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2023-01-11 19:41:24 +01:00
Michael Kaufmann
87bd80eea1 reenable access to ftp view for customers with ftps=0 because the main account is always being created
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2023-01-11 14:58:18 +01:00
Michael Kaufmann
80e442e396 set version to 2.0.7
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2023-01-10 22:15:57 +01:00
Michael Kaufmann
489ad375bd ensure latest userdata.inc.php layout for updaters/users of old format
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2023-01-10 16:54:20 +01:00
Michael Kaufmann
c420196e73 check explicitly for template existence and try to use default theme as fallback; fixes #1071
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2023-01-10 16:53:36 +01:00
Michael Kaufmann
cc6d8d5f8b fix login if non-standard ports are used for froxlor vhost
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2023-01-10 12:43:04 +01:00
Michael Kaufmann
24f47bc58b set version to 2.0.6
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2023-01-09 10:09:15 +01:00
Michael Kaufmann
c769c074e0 add Google CA to available acme.sh providers; fixes #1065
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2023-01-09 10:00:08 +01:00
dependabot[bot]
2ecb8eb034 Bump json5 from 1.0.1 to 1.0.2 (#1069)
Bumps [json5](https://github.com/json5/json5) from 1.0.1 to 1.0.2.
- [Release notes](https://github.com/json5/json5/releases)
- [Changelog](https://github.com/json5/json5/blob/main/CHANGELOG.md)
- [Commits](https://github.com/json5/json5/compare/v1.0.1...v1.0.2)

---
updated-dependencies:
- dependency-name: json5
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-01-09 09:51:52 +01:00
Michael Kaufmann
6827c100c3 fix updating email account password-hashes in updater
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2023-01-09 09:50:51 +01:00
Michael Kaufmann
c402acd1bd disable correct mod_php in bionic-config-templates when fcgid/php-fpm is selected
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2023-01-09 09:25:29 +01:00
Michael Kaufmann
c4ec2509fa fix resetting of isemaildomain-flag of subdomains when nothing changed; fixes #1067
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2023-01-09 09:24:22 +01:00
Michael Kaufmann
0f382586ce set version to 2.0.5
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2023-01-08 23:24:43 +01:00
Michael Kaufmann
9c2f12ecb1 mysql-remote-server fixes
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2023-01-08 23:20:31 +01:00
Michael Kaufmann
12da117cab fix chmod() command in compatibility cronjob for updaters
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2023-01-08 20:20:44 +01:00
Michael Kaufmann
ef48f4b48e set version to 2.0.3
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2023-01-08 19:44:07 +01:00
Michael Kaufmann
aae6db52b5 temporarily change innodb_strict_mode to run table updates (shorten fields)
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2023-01-08 19:36:05 +01:00
Michael Kaufmann
fb7d65d645 need pagination-context for sortfields; only disable pagination-code on view
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2023-01-08 19:01:10 +01:00
Michael Kaufmann
3b9c60e985 fix pagination when pagination is diabled (entries per page = 0)
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2023-01-08 18:52:58 +01:00
Michael Kaufmann
452df60866 set version to 2.0.2
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2023-01-08 17:58:42 +01:00
Michael Kaufmann
7ce7123756 fix sql text defaults in updater
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2023-01-08 17:34:58 +01:00
Michael Kaufmann
d42072e3ad re-enable/fix sortable tablelisting flag
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2023-01-08 17:25:19 +01:00
Michael Kaufmann
d69a7eeb07 sql text field corrections
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2023-01-08 15:47:54 +01:00
Michael Kaufmann
a8a112af49 sql text field corrections
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2023-01-08 15:44:32 +01:00
Michael Kaufmann
46c696811d fix customer listing for admins when deactivated customers exist; fix potential row-size too large error for panel_customers; fix possible undefined timestamps in opcache-info; set version to 2.0.1
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2023-01-08 15:37:46 +01:00
Michael Kaufmann
1d2f5a693c fix cli-updater
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2023-01-08 13:27:17 +01:00
Michael Kaufmann
5688690eb8 set version to 2.0.0 for upcoming stable release
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2023-01-08 11:00:59 +01:00
Michael Kaufmann
f7f356e896 fix csrf for clearing apcu/opcache cache
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-12-31 09:08:34 +01:00
Michael Kaufmann
5a807e3dbe do not show apcuinfo or opcacheinfo to users with change_serversettings=0
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-12-31 08:51:05 +01:00
Michael Kaufmann
fede81700e set correct expected return-code from exception in unit-test
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-12-31 00:50:30 +01:00
Michael Kaufmann
b7264cdc5d adjust tests for new reseller permission (edit ipsandports not necessary)
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-12-31 00:47:37 +01:00
Michael Kaufmann
0527f22dc9 dont show page content for resellers withouth required permissions to actually do something
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-12-31 00:42:58 +01:00
Michael Kaufmann
d643e8c673 exclude csrf_token from froxlor-config.json export; exclude system.updatecheck_data from settings-export
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-12-30 21:48:59 +01:00
Michael Kaufmann
f2485ecd9a adjust Request-class methods to be more flexible
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-12-30 21:43:27 +01:00
Michael Kaufmann
983d929460 validate image data/filename when importing
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-12-30 14:39:32 +01:00
Maurice Preuß (envoyr)
37980060ea update form validation for customers
Signed-off-by: Maurice Preuß (envoyr) <envoyr@froxlor.org>
2022-12-27 15:21:53 +01:00
Maurice Preuß (envoyr)
03a39ca69f Merge branch 'main' of github.com:Froxlor/Froxlor 2022-12-26 14:12:45 +01:00
Maurice Preuß (envoyr)
1b63534563 update csrf initialization
Signed-off-by: Maurice Preuß (envoyr) <envoyr@froxlor.org>
2022-12-26 14:12:21 +01:00
Michael Kaufmann
07814f8e46 fix email 2fa; insert task to rebuild vhosts after customer changes password for statistics-page
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-12-26 13:00:34 +01:00
Michael Kaufmann
c696542cf5 remove unnecessary domains_see_all column
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-12-26 12:12:06 +01:00
Michael Kaufmann
15ed0521c5 use proxymap for mysql connection in postfix
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-12-26 11:39:23 +01:00
Maurice Preuß (envoyr)
ae4b961ac1 fix edit button for ssl certificates 2022-12-25 22:44:49 +01:00
Maurice Preuß (envoyr)
6ad78a4818 add csrf token header to jquery requests 2022-12-25 22:14:39 +01:00
Maurice Preuß (envoyr)
ddc95762eb fix of name translation due to incorrect display in lists and forms 2022-12-25 20:54:35 +01:00
Maurice Preuß (envoyr)
6bf0396c76 fix user details in form fields
Signed-off-by: Maurice Preuß (envoyr) <envoyr@froxlor.org>
2022-12-25 20:42:34 +01:00
Maurice Preuß (envoyr)
746d30c65b fix unknown configuration directive on some systems
Signed-off-by: Maurice Preuß (envoyr) <envoyr@froxlor.org>
2022-12-25 20:23:56 +01:00
Michael Kaufmann
9013fd63d7 correct pure-ftpd quota-query
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-12-22 19:16:26 +01:00
Michael Kaufmann
7079e2f2bf correct sql-alter-queries in updater
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-12-22 19:15:42 +01:00
rex2630
03466158a7 Renamed name to Last name instead (#1060) 2022-12-22 19:11:09 +01:00
Michael Kaufmann
ef8dabeb89 re-add edit button in ssl-certificates overview when manually set
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-12-22 11:14:11 +01:00
rex2630
38fb3bc25a Deleted duplicated string (#1058) 2022-12-22 09:29:12 +01:00
Maurice Preuß (envoyr)
d2d3cec4f5 Merge branch 'main' of github.com:Froxlor/Froxlor 2022-12-21 20:25:11 +01:00
Maurice Preuß (envoyr)
669072d996 update navigation for better mobile handling
Signed-off-by: Maurice Preuß (envoyr) <envoyr@froxlor.org>
2022-12-21 20:23:54 +01:00
Michael Kaufmann
a81065a1b0 add dashboard-language string, fix missing { in customer_mysql
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-12-21 11:54:29 +01:00
Michael Kaufmann
4f89d7a9f0 set theme correctly when updating from 0.10.x
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-12-20 23:07:52 +01:00
Maurice Preuß (envoyr)
996b2e4a78 fix translation strings and update session lifetime to default panel sessiontimeout
Signed-off-by: Maurice Preuß (envoyr) <envoyr@froxlor.org>
2022-12-20 21:27:53 +01:00
Maurice Preuß (envoyr)
4acd1d4ef6 add missing translation strings
Signed-off-by: Maurice Preuß (envoyr) <envoyr@froxlor.org>
2022-12-20 19:59:24 +01:00
Michael Kaufmann
795a3d846c regex-validate services commands
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-12-20 19:38:05 +01:00
Michael Kaufmann
2dd226c96c allow domain-redirect to internal-ipaddress
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-12-20 17:20:40 +01:00
Michael Kaufmann
24fa1d39ed add pass_authorizationheader=1 to froxlor vhost php-config; fix issue with assigning mysql-server when editing customer with mysql=0 prior; fix blank page when customer does not have resources but opens page via url manipulation
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-12-16 10:52:12 +01:00
Michael Kaufmann
c19b7d02ab allow api _plainsql special parameter only for internal calls, not needed anywhere else
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-12-14 18:42:06 +01:00
Michael Kaufmann
e5b6492804 fix typo when creating new home for new customer
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-12-14 14:46:51 +01:00
Michael Kaufmann
f4f00352eb add missing csrf-token to configuration-form
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-12-14 10:53:32 +01:00
Michael Kaufmann
ebc44a737e trim fpm ini directives of possible newline characters
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-12-08 23:16:27 +01:00
Michael Kaufmann
4d908ff6ee fix session-timeout not being set
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-12-08 10:05:44 +01:00
Michael Kaufmann
34e3290497 adding csrf-token to all forms
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-12-08 09:33:34 +01:00
Maurice Preuß (envoyr)
fe37313b7b update readme, fix badges and links
Signed-off-by: Maurice Preuß (envoyr) <envoyr@froxlor.org>
2022-12-07 10:58:45 +01:00
Michael Kaufmann
3d033262ed adjustments to dovecot-sql config template; correct enctype for form
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-12-06 23:08:54 +01:00
Michael Kaufmann
6135ba8468 backward compatibility for updaters to update cron.d configuration file after update
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-12-06 16:47:16 +01:00
Michael Kaufmann
d7a2ec35cc clearify customer add/edit name/company requirements
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-12-06 16:25:33 +01:00
Michael Kaufmann
4501eb2723 fix correct increasing of used customers and recalculat resources
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-12-06 08:26:42 +01:00
Michael Kaufmann
609c15688c fix api-key edit (thx Davidd), fix dns-editor ttl field (thx Rolf)
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-12-05 20:58:57 +01:00
Michael Kaufmann
5b7a76b608 Update CONTRIBUTING.md 2022-12-05 10:14:35 +01:00
Michael Kaufmann
4eaf9d2c46 add new graphics/logos; theme dependent logos; layout fixes in forgot-password/reset-password sites;
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-12-04 13:18:33 +01:00
Maurice Preuß
b3da3cf218 Merge pull request #1056 from Froxlor/dependabot/npm_and_yarn/loader-utils-1.4.2
Bump loader-utils from 1.4.0 to 1.4.2
2022-12-03 20:01:46 +01:00
Michael Kaufmann
abf3328ea9 fix api-key creation
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-12-02 13:42:33 +01:00
Michael Kaufmann
89f73f571e use same error message for invalid user and disabled password reset to not give away if a user exists
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-12-02 13:25:17 +01:00
Michael Kaufmann
63f6d221cd secure logo uploading, avoid frame-inclusion, adjustments to SECURITY.md and minor changes in UI for domain import and darkmode
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-12-02 09:24:08 +01:00
Michael Kaufmann
40997762a4 small adjustments for tooltip/popover and icons in top-right menu
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-11-30 10:06:13 +01:00
Michael Kaufmann
fa547197e8 fix server-side version-check response message check
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-11-27 15:38:35 +01:00
Michael Kaufmann
ae8cd3dc8a enhance version-check and beautify displayed information
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-11-27 15:33:25 +01:00
Maurice Preuß (envoyr)
685b6076a0 enable tooltip and popover
Signed-off-by: Maurice Preuß (envoyr) <envoyr@froxlor.org>
2022-11-27 12:51:39 +01:00
Michael Kaufmann
137db0432e adjust validate-test for 'sql username too long' for mariadb
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-11-24 10:29:39 +01:00
Michael Kaufmann
73fe533870 adjust mysql-usernamelength values for mariadb according to docs
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-11-24 10:03:40 +01:00
Michael Kaufmann
4b7ae46fd7 fix missing language-strings
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-11-21 12:52:33 +01:00
Michael Kaufmann
777991e0e3 honor caneditdomain flag correctly; corrected error messages; updated external URLs
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-11-20 12:22:03 +01:00
Michael Kaufmann
eb13796976 use correct docs-url
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-11-19 12:51:18 +01:00
Michael Kaufmann
51aafafd73 update links to new docs.froxlor.org pages (v2 will be /latest/ when released); fixed required-checkbox attribute when having a hidden fallback to value 0 (bool checkboxes); added automatic creation of symlink for bin/froxlor-cli to /usr/local/bin
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-11-17 14:27:51 +01:00
dependabot[bot]
7084cd8c54 Bump loader-utils from 1.4.0 to 1.4.2
Bumps [loader-utils](https://github.com/webpack/loader-utils) from 1.4.0 to 1.4.2.
- [Release notes](https://github.com/webpack/loader-utils/releases)
- [Changelog](https://github.com/webpack/loader-utils/blob/v1.4.2/CHANGELOG.md)
- [Commits](https://github.com/webpack/loader-utils/compare/v1.4.0...v1.4.2)

---
updated-dependencies:
- dependency-name: loader-utils
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-11-15 02:29:29 +00:00
Michael Kaufmann
ed231f159f forgot to save the last changes before committing
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-11-14 15:57:49 +01:00
Michael Kaufmann
da6c1992fa added documentation links to sidebar
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-11-14 12:59:51 +01:00
Michael Kaufmann
5fa98811ab fix reduction of used resources when deleting a customer
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-11-13 18:04:29 +01:00
Michael Kaufmann
6904acc9ea use preinstalled dh params file instead of generating a new one which takes a lot of time
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-11-13 15:09:16 +01:00
Michael Kaufmann
cc1d427a69 enable ssl for postfix/dovecot by default using a self-signed certificate if not otherwise specified
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-11-12 16:36:57 +01:00
Michael Kaufmann
1d938f2a43 remove 'default_password_scheme' for dovecot configs as hashes can be different now and are read by given hash-algo prefix;
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-11-12 09:38:43 +01:00
Michael Kaufmann
f49fd5f0f7 show replacer-variables in php-config add/edit and fpm-versions add/edit; catch potential Exception thrown by Form::processForm() to display the error nicely; minor fixes in field-visibility for phpconfigs depending on php-interface and webserver; validate fcgid/fpm enable-flag correctly if not POST'ed at the same time (older behaviour)
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-11-09 17:07:48 +01:00
Michael Kaufmann
2b12cde77e minor UI/UX fix for settings import (button label)
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-11-08 15:18:39 +01:00
Michael Kaufmann
61dc40ec88 respect domains 'no try_files' option correctly; fix directory-protection generator in nginx
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-11-08 12:41:54 +01:00
Michael Kaufmann
ec8338592d add notice for settings that might require reconfiguration of specific services
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-11-08 10:24:39 +01:00
Michael Kaufmann
b6d850dac3 adjusting texts of standardcustomer-index file; always display current year in copyright
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-11-08 08:30:21 +01:00
envoyr
1b75863823 update domain default page 2022-11-06 15:34:20 +01:00
Maurice Preuß
73aa2ec431 fix html section and use import 2022-11-06 13:58:22 +01:00
Maurice Preuß
fc42b04537 fix missing use Froxlor\UI\Request 2022-11-06 13:49:09 +01:00
Michael Kaufmann
da82403b55 don't check for resource availability if none is going to be given to the customer
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-11-06 13:45:09 +01:00
Michael Kaufmann
c05245c891 correct recalculation of resource usage for admins
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-11-06 11:55:18 +01:00
Michael Kaufmann
1f70327112 show traffic details in admin and customer listings with the info-icon
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-11-06 11:27:32 +01:00
Michael Kaufmann
78945768ec add persistent db storage to goaccess-traffictool to have more data in the output index.html; add security questions when deleting certificates as we do for apikeys and dns-entries
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-11-06 10:11:40 +01:00
Maurice Preuß
8eedf87ac3 Merge pull request #1051 from Froxlor/dependabot/npm_and_yarn/node-forge-1.3.1
Bump node-forge from 1.2.1 to 1.3.1
2022-11-05 14:13:48 +01:00
Michael Kaufmann
4fc50fba1f avoid possible html injection via forgot-password-error-message
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-11-05 12:51:23 +01:00
Michael Kaufmann
4a4188a96b prefer combined operators, refs #999
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-11-05 11:07:18 +01:00
Michael Kaufmann
b0a66b687d allow plaintext_auth in dovecot by default in case no ssl certificate is used
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-11-04 19:59:30 +01:00
Maurice Preuß
6bb2036ebc use bytes instead of kilobytes 2022-11-04 18:32:38 +01:00
Michael Kaufmann
d16608c94a correctly calculate traffic usage and output bytes in Traffic-Api-Command instead of KB
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-11-04 18:02:04 +01:00
Michael Kaufmann
338eca4eb6 rework monthly traffic stats mail
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-11-04 16:08:07 +01:00
Michael Kaufmann
0608713b6a fix traffic/dispace usage reports
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-11-04 15:44:00 +01:00
Michael Kaufmann
6acd4f4df3 corrected usage in reportscron
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-11-04 14:28:17 +01:00
Michael Kaufmann
a14af67e2d typo
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-11-04 14:16:25 +01:00
Michael Kaufmann
a310df0704 language fixes
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-11-04 14:15:26 +01:00
Michael Kaufmann
ecd209b1d9 revert storing traffic in bytes as webalizer/awstats store in KB so goaccess needs to do that as well in order to stay consinstent throughout the system
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-11-04 12:49:26 +01:00
Michael Kaufmann
8aa857ea36 store traffic in bytes
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-11-04 12:44:56 +01:00
Michael Kaufmann
dbec714af8 fix traffic display in dashboards
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-11-04 12:39:10 +01:00
Michael Kaufmann
5abe663cbe fix stats-alias-path for subdomains with parent having speciallogfile == 1
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-11-03 12:08:16 +01:00
Michael Kaufmann
91c8fed5f4 fix stats-url generation in vhosts
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-11-03 11:38:21 +01:00
Michael Kaufmann
1bf9b38cfb fix callGoaccessGetTraffic parameters
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-11-03 11:17:02 +01:00
Michael Kaufmann
2698a730eb fix reading in JSON values from goaccess stats in case they are really large and cant be handled by php's json_decode
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-11-03 10:09:52 +01:00
Michael Kaufmann
1ecbad497a fix updating of path in directory-protections when changing traffic tool
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-11-03 09:13:23 +01:00
Michael Kaufmann
a8dc576833 add 'goaccess' as new and default traffic analyzer tool
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-11-03 08:58:11 +01:00
Michael Kaufmann
a052333296 enhance listing of customer domains; add third openbasedir-option to make 'parentdirectory of domain-docroot' value possible (refs #515); corrected some formfield definitions
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-11-01 15:36:21 +01:00
Michael Kaufmann
0f218914a2 re-add replacer-information for php-configs
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-11-01 15:32:10 +01:00
Michael Kaufmann
cc8814bf16 Merge branch 'main' of github.com:Froxlor/Froxlor 2022-11-01 14:22:05 +01:00
envoyr
67ca368863 Merge branch 'main' of github.com:Froxlor/Froxlor 2022-11-01 13:56:05 +01:00
envoyr
b6b0148495 update packages and badge color for dark mode 2022-11-01 13:54:17 +01:00
Michael Kaufmann
ec0094e754 UI/UX fixes in dns-editor and logfiles-viewer
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-11-01 13:38:27 +01:00
Michael Kaufmann
19284cad00 forgot to remove leftover variable in Ftps.update()
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-10-30 15:06:07 +01:00
Michael Kaufmann
e86f093d31 forgot to remove leftover prepared statement variable in Ftps.add()
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-10-30 14:31:21 +01:00
Michael Kaufmann
5aa059bb24 prefer sha256 (the old-way) over sha1 mixup for two different ftpds
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-10-30 14:22:25 +01:00
Michael Kaufmann
1f43f5d514 pure-ftpd compatible password hashes for ftp users
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-10-30 11:11:12 +01:00
Michael Kaufmann
85e3b6af0e add installation command for cron in case it's somehow not present on the system
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-10-27 14:21:09 +02:00
Michael Kaufmann
7cb5135725 secure userinput when adding/editing admins/customers
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-10-27 14:20:07 +02:00
Michael Kaufmann
afde51ecf6 email validation check input before display
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-10-27 14:14:16 +02:00
envoyr
34d5583333 display better exception for traffic results if admin has no customers 2022-10-25 13:37:33 +02:00
envoyr
3acc5457b2 fix darkmode search, textarea, progress bars and list groups 2022-10-25 13:00:04 +02:00
Michael Kaufmann
1f69ab7e3f fix keep-current-password when editing mysql-server
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-10-24 14:25:53 +02:00
Michael Kaufmann
a55cd86a4c adjust button styles in ssl- and dns-editor; don't show notice about pcntl when using --no-fork
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-10-23 20:43:21 +02:00
envoyr
996976d9f3 fix traffic overview in darkmode 2022-10-23 20:01:50 +02:00
envoyr
cc83099670 remove mix-manifest.json and fix gray colors 2022-10-23 19:43:27 +02:00
envoyr
8e17dda79a refactored scss files and beautify darkmode 2022-10-23 17:35:18 +02:00
Michael Kaufmann
861786f064 fix formfield visibility of ipandports:listen_statement; adjusted settings submit-buttons; fix traffic timescale-selectbox for responsive devices
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-10-21 10:51:06 +02:00
Michael Kaufmann
e30ad7ef9b added shortcut-add-action link to sidebar menu
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-10-19 10:16:17 +02:00
Michael Kaufmann
8b87bd055e optimize form-submit buttons on mobile devices
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-10-19 08:59:32 +02:00
Michael Kaufmann
b9e9cb9377 add subnavigation to hosting-plans
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-10-19 08:32:48 +02:00
Michael Kaufmann
f07bc950c6 Revert "update github-actions to redirect output as wanted"
This reverts commit 3de0d7ae6e.
2022-10-18 22:38:46 +02:00
Michael Kaufmann
3de0d7ae6e update github-actions to redirect output as wanted
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-10-18 22:36:19 +02:00
Michael Kaufmann
a2c8096b57 update github-actions to use node16
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-10-18 22:32:34 +02:00
Michael Kaufmann
e7ccc7bf76 more sub-navigation links; rename 'cancel' to 'discard changes' as it is a form-reset button
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-10-18 20:39:01 +02:00
Michael Kaufmann
3e1ad050a8 add more subnavigation for customer-email section; correctly display next_to elements when type=label in formfields
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-10-18 13:52:26 +02:00
Michael Kaufmann
60beaf8440 fix form-control-plaintext color; make non-href action buttons in table-listings <span> instead of <a>; deactivate let's encrypt for froxlor vhost correctly if dns check returns false
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-10-18 12:20:28 +02:00
Michael Kaufmann
56f5c7b487 fix missing custom_notes for admins/resellers
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-10-18 09:30:02 +02:00
Michael Kaufmann
5b3db2f096 Merge branch 'main' of github.com:Froxlor/Froxlor 2022-10-18 08:57:48 +02:00
Michael Kaufmann
3e931443f7 fix wrongly-escaping of some form-field values
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-10-18 08:57:34 +02:00
envoyr
afc821099a add jammy to yes-to-all supported os 2022-10-17 22:28:41 +02:00
envoyr
91cae70b5b fix php version for bookworm and jammy 2022-10-17 22:05:26 +02:00
Michael Kaufmann
c91047bb62 fix custom rss feed for customers on dashboard
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-10-17 19:30:58 +02:00
Michael Kaufmann
b4ba8f9225 fixing brainfart
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-10-17 17:29:38 +02:00
Michael Kaufmann
28f6d59336 allow optional length parameter for Froxlor.generatePassword API command
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-10-17 17:26:13 +02:00
Michael Kaufmann
2987ae5a05 respect newsfeed-visibility-settings; fix typo for saving column-visibility in apikeys; added back-to-overview button in cronjobs-edit; strings fixes
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-10-17 08:52:58 +02:00
Michael Kaufmann
71274f8f08 rewirk tablecolum js a bit when more than once tablelisting is on one page; do not allow empty column selection
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-10-16 17:10:57 +02:00
Michael Kaufmann
1704875cea remove unnecessary language selection in login-form
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-10-16 15:28:30 +02:00
Michael Kaufmann
dd30ab8f93 corrected updating language format and also update default-language of admins/customers to new format
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-10-16 14:15:19 +02:00
Michael Kaufmann
68c93a17b3 fix column-customizer for non-api based resources; add more no_search=true tags in various tablelistings where search is not available
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-10-16 13:35:50 +02:00
Michael Kaufmann
64142d2158 dont show search-icon/exclude specific non-searchable fields from overviews
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-10-16 13:13:26 +02:00
Michael Kaufmann
21954505b2 only set default_theme to fixed value if in update process of 0.10.x to 2.0.0-beta1 (or later)
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-10-16 11:39:30 +02:00
Michael Kaufmann
d3ed765945 fix link to internal frolxor.panel user, thx to Davidd
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-10-16 11:16:18 +02:00
Michael Kaufmann
1c653c7cb1 only show link to customer when user is admin in Domain::domainWithCustomerLink callback
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-10-16 09:29:32 +02:00
Michael Kaufmann
4003c53dc4 use correct response field for domain-name in ssl-overview
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-10-16 09:18:53 +02:00
Michael Kaufmann
7d55b94a91 corrected default sorting field for sslcertificates overview
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-10-15 12:46:27 +02:00
Michael Kaufmann
f19f7ba936 add default-sorting to dns-record tablelisting; add edit-domain button in ssl-editor
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-10-15 11:11:05 +02:00
Michael Kaufmann
6953d0f883 minor fixes to fpm/php resources-forms and language-strings
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-10-13 16:53:36 +02:00
Michael Kaufmann
52857c208a fix standardSuccess language-replacer parameter; if hide-incompatible-settings is activated, also hide settings-overview-panel if incompatible
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-10-13 11:24:58 +02:00
Michael Kaufmann
a1b5f57f99 fix saving subdomain when only http2 flag has changed; fix superfluous comma in user/form.html.twig
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-10-10 15:22:00 +02:00
Michael Kaufmann
0757cc25ce fix ftp user passwords
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-10-07 17:56:51 +02:00
Michael Kaufmann
fb163f8006 minor adjustments in templates
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-10-07 12:29:11 +02:00
Michael Kaufmann
a37beef18e fix shell-select for customer ftp-accounts if shell is enabled; fix typo in UserCommand
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-10-06 14:23:56 +02:00
Michael Kaufmann
13c53b074c show search-text on listings with link to remove set filter
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-10-02 10:35:43 +02:00
dependabot[bot]
8bd133b488 Bump twig/twig from 3.4.1 to 3.4.3 (#1055)
Bumps [twig/twig](https://github.com/twigphp/Twig) from 3.4.1 to 3.4.3.
- [Release notes](https://github.com/twigphp/Twig/releases)
- [Changelog](https://github.com/twigphp/Twig/blob/3.x/CHANGELOG)
- [Commits](https://github.com/twigphp/Twig/compare/v3.4.1...v3.4.3)

---
updated-dependencies:
- dependency-name: twig/twig
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-09-30 20:20:31 +02:00
Michael Kaufmann
e944a886b6 add default-sorting of listings in frontend
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-09-30 09:44:11 +02:00
Michael Kaufmann
fa826aa87e format diskspace and traffic correctly in recalculate resources
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-09-26 17:45:46 +02:00
Michael Kaufmann
4701f41e67 fix typo in actions_links merge in form-template
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-09-26 13:07:06 +02:00
Michael Kaufmann
b1f7cf4bc7 minor language additions and css adjustments
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-09-20 08:09:53 +02:00
Michael Kaufmann
fd596801e2 use correct classes and not 0.10.x format
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-09-17 17:20:58 +02:00
Michael Kaufmann
5591bc41b4 add missing update steps of 0.10.x to (last) 0.10.38; more darkmode adjustments
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-09-17 17:17:09 +02:00
Michael Kaufmann
8f2fbe675a color adjustment for tables rows in darkmode
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-09-17 12:12:22 +02:00
Michael Kaufmann
11b1688ae6 minor adjustments for darkmode and formfields mandatory-flag for checkboxes
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-09-16 10:36:06 +02:00
Michael Kaufmann
04a485ca77 minor fixes in darkmode
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-09-14 20:44:30 +02:00
Michael Kaufmann
7687b27e13 work on darkmode
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-09-14 11:48:42 +02:00
Michael Kaufmann
8660afc010 adjust ftp and mail to new traffic-data too
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-09-13 08:53:56 +02:00
Michael Kaufmann
ddedce1671 more work on traffic and npm dependencies update
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-09-12 21:52:32 +02:00
Michael Kaufmann
15a1ff2f83 translate welcome-screen for unconfigured installations
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-09-11 17:08:24 +02:00
Michael Kaufmann
589f2b8124 adjust awstats default paths
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-09-08 16:45:21 +02:00
Michael Kaufmann
2e8e09cb2c rework search-result-window
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-09-08 15:05:19 +02:00
Michael Kaufmann
5f2f3bee0a DirectoryMatch the start of the folder, not every folder in any subdirectory
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-09-08 13:13:23 +02:00
Michael Kaufmann
9decb077d3 fixing icons
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-09-08 13:13:06 +02:00
Michael Kaufmann
1290cbea15 update npm requirements
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-09-08 10:29:06 +02:00
Michael Kaufmann
bc7e4be47a more work on new traffic view
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-09-08 10:27:03 +02:00
dependabot[bot]
21c0e27f2f Bump node-forge from 1.2.1 to 1.3.1
Bumps [node-forge](https://github.com/digitalbazaar/forge) from 1.2.1 to 1.3.1.
- [Release notes](https://github.com/digitalbazaar/forge/releases)
- [Changelog](https://github.com/digitalbazaar/forge/blob/main/CHANGELOG.md)
- [Commits](https://github.com/digitalbazaar/forge/compare/v1.2.1...v1.3.1)

---
updated-dependencies:
- dependency-name: node-forge
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-09-07 14:39:09 +00:00
Michael Kaufmann
6f2652f9dd start work on traffic-view refactoring
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-09-07 12:56:02 +02:00
Michael Kaufmann
5f95293e0d cleanup language file
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-09-02 10:11:12 +02:00
Michael Kaufmann
3fdc034f17 minor enhancements in dns-editor
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-09-02 09:50:18 +02:00
Michael Kaufmann
a7454b00b4 add icon to show admin/customer custom-notes in overview
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-09-01 15:44:38 +02:00
Michael Kaufmann
754b56aba0 fix missing use-statement for new subdomains in php-config setting
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-08-29 19:03:45 +02:00
Michael Kaufmann
5c7f5be5b9 fix generated json for config-services script after install
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-08-26 16:59:43 +02:00
Michael Kaufmann
05634adc66 display which is the default password-hash; fix language selection on login
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-08-26 16:07:40 +02:00
Michael Kaufmann
f47d203215 block access to more folders to enhance security
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-08-26 14:14:00 +02:00
Michael Kaufmann
546040541c add possibility to show subdomains fully in php-settings listing; UI adjustments
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-08-26 09:54:06 +02:00
Michael Kaufmann
7f6ea29e15 correction for mandatory fields in forms
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-08-26 09:06:42 +02:00
Michael Kaufmann
8f64460647 set new beta version for the new major release this year
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-08-25 21:49:26 +02:00
Michael Kaufmann
e5620b22e0 fix preselected values in customer-edit form; adjust version checking to include '-beta' and drop long unused '-svn'
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-08-25 21:42:53 +02:00
Michael Kaufmann
5525b927c1 various minor fixes for issues found by community member awsome
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-08-25 21:02:54 +02:00
envoyr
402dc8cf42 Merge remote-tracking branch 'refs/remotes/origin/0.11-dev' into 0.11-dev 2022-08-21 17:49:21 +02:00
envoyr
b5f5c4f4b5 update admin traffic overview 2022-08-21 17:47:17 +02:00
Michael Kaufmann
bcda1d51c4 added new cli command froxlor:user for unlocking, password-changing and info-display of a user
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-08-21 12:47:20 +02:00
Michael Kaufmann
f389226aae fix styling of deactivated/locked customers in overview and 0-value in edit-form
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-08-21 11:43:25 +02:00
Michael Kaufmann
3ee04a6e75 install-finish-magic
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-08-20 13:44:44 +02:00
Michael Kaufmann
07094f231a minor fixes in installation process
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-08-20 11:21:49 +02:00
Michael Kaufmann
2c9b2c1d67 fixes for finishing installation correctly
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-08-20 10:44:05 +02:00
Michael Kaufmann
9dc95e086d correct Dropdown directory selection; fixes #1044
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-08-16 08:33:37 +02:00
Michael Kaufmann
94a19ee2b6 more minor fixes and code-cleaning
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-08-10 12:01:26 +02:00
Michael Kaufmann
e82d7b5d8b add missing namespaces, fix typo
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-08-10 11:15:06 +02:00
Michael Kaufmann
16a9b18dad fix type of parameter in Validate::validate()
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-08-10 11:06:38 +02:00
Michael Kaufmann
50e35e149c various minor bugfixes; composer requirements update
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-08-10 00:17:11 +02:00
Michael Kaufmann
31500522ce make froxlor_master_cronkjob a froxlor-cli command; secure files/folders in froxlor-virtualhost;
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-08-09 15:49:44 +02:00
Michael Kaufmann
293c0ceb9d move needed view() function declaration above first potential usage
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-07-31 16:45:05 +02:00
Michael Kaufmann
5b3ea24725 add paramter 'mail-notify' to froxlor:update CLI script to notify the system administrator via email about a new version (once per version)
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-07-31 16:26:39 +02:00
Michael Kaufmann
fabc68d13f pass mysql_server after adding to Mysqls.get command, do not validate in Mysqls.get if left empty on purpose
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-07-29 09:49:24 +02:00
Michael Kaufmann
dfb2d625c9 use correct target-dbserver to add db and user when using multiple database servers
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-07-29 09:35:11 +02:00
Michael Kaufmann
4d1a6728f6 fix first time updatecheck run when null is returned from Update::getUpdateCheckData()
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-07-24 11:51:32 +02:00
Michael Kaufmann
b6267e610a add interval for external update-check; add parameter 'force' to Froxlor.checkUpdate() API call; fix session/language update when changing language
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-07-24 11:47:10 +02:00
Michael Kaufmann
771d6c483a add onpage mini-search for listings
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-07-23 11:52:22 +02:00
Michael Kaufmann
b48c135d6d re-add image-logo upload in settings
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-07-22 11:44:01 +02:00
Michael Kaufmann
6b36508388 autofocus login field
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-07-22 09:01:21 +02:00
Michael Kaufmann
d6b97399d4 fix missing languages-array for change-language action
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-07-22 08:57:47 +02:00
Michael Kaufmann
8b930f7655 inject success-message to avoid re-sending of form
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-07-22 08:52:52 +02:00
Michael Kaufmann
72d14770de catch php errors to return valid JSON when invoking API, refs #1047
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-07-22 08:37:19 +02:00
Michael Kaufmann
cb3be2556b dont show section if section is not visible completely
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-07-22 08:36:40 +02:00
Michael Kaufmann
b5e613a794 re-add update paths from last 0.9.x 2022-07-22 08:09:18 +02:00
Michael Kaufmann
faba5b0715 update sql-users with their corresponding password-hash-algorithm; remove a few notices for empty values in str_replace and others
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-07-17 12:22:06 +02:00
Michael Kaufmann
430aefe0f7 added input-file option for automatic cli-installation
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-07-08 16:52:22 +02:00
Michael Kaufmann
7c812df4e0 re-enable quota and sieve plugins for dovecot in buster and bullseye config-templates, fixes #1042
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-07-07 15:29:10 +02:00
Michael Kaufmann
f1ad8b6cfd rework FileDir::makePathfield() is mode is 'dropdown' to show all directories correctly (depth limited); fixes #1044
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-07-07 15:28:50 +02:00
Michael Kaufmann
c8183fbbbf avoid accessing api_keys page if not allowed for loggedin user
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-06-30 14:53:58 +02:00
Michael Kaufmann
d4e94c0390 rearrange logfiles-view template contents to suite the overall layout better
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-06-30 14:02:21 +02:00
Michael Kaufmann
546a001092 fix passing complex passwords with special characters to mysqldump in backup-cron; fixes #1038
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-06-28 20:08:40 +02:00
Michael Kaufmann
7f546bb096 store userdata.inc.php when cli-install is finished and passthru config-services command so output can be seen
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-06-22 15:35:22 +02:00
Michael Kaufmann
fca80de995 fixes to install (mostly CLI)
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-06-02 20:33:27 +02:00
Michael Kaufmann
bbd754c198 add USERNAME replacer to all email templates; fixes #1032
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-06-01 14:07:01 +02:00
Michael Kaufmann
d545e7e09d add CLI install command (more testing tbd)
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-06-01 14:05:18 +02:00
Michael Kaufmann
f3b277237e add missing whitespace after channel-name fir update.noupdatesavail language string
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-05-26 14:06:32 +02:00
Michael Kaufmann
ceb621b9b5 set update-channel to testing for unittests as long as this branch is not main/stable
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-05-26 13:50:31 +02:00
Michael Kaufmann
75fedcb7e8 return more detailed message (include update_channel if testing)
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-05-26 13:46:44 +02:00
Michael Kaufmann
66c3694809 fix lng() usage in RunApiCommand-class; fix title-tag content if newerversion=0 in update-check
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-05-26 13:29:26 +02:00
Michael Kaufmann
282e6f4cd7 update UI version check via AutoUpdate class in Froxlor.checkUpdate()
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-05-26 13:14:43 +02:00
Michael Kaufmann
ac143b2bbf Merge branch '0.11-dev' of github.com:Froxlor/Froxlor into 0.11-dev 2022-05-26 13:13:57 +02:00
envoyr
3b1250f557 add install/*.json to .gitignore 2022-05-26 13:12:43 +02:00
Michael Kaufmann
3e3ced946f add styling classes to dnszone textarea
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-05-26 12:29:03 +02:00
Michael Kaufmann
2e72fa8445 use new Language class in formfields
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-05-26 12:24:44 +02:00
Michael Kaufmann
dbd1fe3846 corrected domain-formfields visibility flag for ssl-related settings
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-05-26 12:07:55 +02:00
Michael Kaufmann
c087ac18d5 fix wrong number of bound variables when customers_see_all == 0
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-05-25 18:57:50 +02:00
Michael Kaufmann
ab6a8fefd2 make test-hostname actually an invalid hostname when testing for invalid hostnames
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-05-24 20:24:37 +02:00
Michael Kaufmann
d8bcf52b3b add frontend for new MysqlServer API command
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-05-24 19:50:30 +02:00
Michael Kaufmann
7cbc14f4aa enhance MysqlServer.add(), implement MysqlServer.update(), adjusted MysqlServer.get() to be callable by customer if allowed access to the given dbserver
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-05-24 09:30:09 +02:00
Michael Kaufmann
d3a8c8628e add with_ips parameter to SubDomains.listing() and SubDomains.get(); add column ips/ports to domain tablelisting (admin and customer)
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-05-23 13:50:50 +02:00
Michael Kaufmann
9b5d3aed97 fix emails-edit formfield
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-05-23 13:07:59 +02:00
Michael Kaufmann
e02164049e add update cli-command; add update-channel setting (stable|testing)
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-05-22 20:18:18 +02:00
Michael Kaufmann
1de39ac39c minor fix in templates due to new Language class + other minor language fixes
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-05-21 17:29:14 +02:00
Michael Kaufmann
309abc6150 remove some already fixed todo markers
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-05-21 17:03:34 +02:00
Michael Kaufmann
f6c265dfa1 re-adding the different certificate sources for domains in overview
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-05-20 15:41:06 +02:00
Michael Kaufmann
fef416ce84 fix show-version check on login/footer-template
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-05-20 14:50:51 +02:00
envoyr
0311ced7c3 check/uncheck all-checkbox 2022-05-16 14:42:05 +02:00
envoyr
8e85437b4b align switch correctly to the right 2022-05-16 14:06:23 +02:00
Michael Kaufmann
a68db7c80d adjust css/js of global-search; added missing id fields for searchable entities
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-05-15 19:01:44 +02:00
Michael Kaufmann
e6916de532 do not list column to available columns list if not visible
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-05-15 18:44:16 +02:00
Michael Kaufmann
14d5c9da6c add more columns for custom-column selection (customer view)
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-05-15 18:39:36 +02:00
Michael Kaufmann
b12d9abaf2 add more columns for custom-column selection (admin view)
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-05-15 17:50:12 +02:00
Michael Kaufmann
a5115414a8 verify 2FA code once before storing secret and activation for login to be sure it works; fixes #1030
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-05-15 12:27:48 +02:00
Michael Kaufmann
dd896659ae dynamically load dns-record help-text for selected dns-type; fixes #719
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-05-15 11:45:50 +02:00
Michael Kaufmann
ed7faae947 output preflight-checks nicely
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-05-15 10:27:46 +02:00
Michael Kaufmann
07a1ad8c58 add date/datetime input fields to relevant formfields
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-05-15 10:07:25 +02:00
Michael Kaufmann
4d5473ff14 translate new install-language-string to german
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-05-14 14:10:29 +02:00
Michael Kaufmann
616334284b migrate old replacer format in lng files
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-05-13 16:50:27 +02:00
Michael Kaufmann
fb38e0e21d add basic/advanced switcher for installation-mode
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-05-13 15:15:20 +02:00
Michael Kaufmann
7e14e9edd7 minor ui/lang adjustments; add security question for backup-abort action
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-05-13 11:22:14 +02:00
Michael Kaufmann
cc11e2de51 avoid jumping through install steps by url-manipulating; fix pre-selections of select-multiple-settings values;
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-05-12 14:53:22 +02:00
Michael Kaufmann
300db4602b fixes to installation and sequence of events in there
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-05-12 13:38:34 +02:00
Michael Kaufmann
cb3143e76d possibility to specify both ipv4 and ipv6
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-05-11 16:51:27 +02:00
envoyr
4c9b6adb1f merge branch '0.11-dev' of github.com:Froxlor/Froxlor into 0.11-dev 2022-05-11 16:27:04 +02:00
envoyr
5cab0e46bd small fixes for error reporting 2022-05-11 16:26:41 +02:00
Michael Kaufmann
da0136650e base for simple/extended install-mode
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-05-11 16:26:09 +02:00
Michael Kaufmann
56e4739b98 fix wrong sql-field for cronjobs_run description
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-05-11 11:35:10 +02:00
Michael Kaufmann
3adc5dc119 remove config-templates for centos; unmaintained and rarely used - also voted on discord to be removed
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-05-09 08:51:45 +02:00
Michael Kaufmann
ed73dbb5f3 set default-ca for acme.sh after updating acme.sh
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-05-09 08:40:09 +02:00
Michael Kaufmann
7dd96ff6bd also adjust error messages when adding admins + fix phpunit tests
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-05-08 13:28:57 +02:00
Michael Kaufmann
31b79d6471 distinct error messages for loginname begins with customer.prefix and loginname exists on the system
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-05-08 13:22:14 +02:00
Michael Kaufmann
d42e71fa9f small adjustments to install when ssl is activated and gentoo-config-templates
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-05-07 13:23:32 +02:00
Michael Kaufmann
2ae67c39fd fix wrong checkbox markup for install-specific checkboxes
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-05-06 17:02:57 +02:00
Michael Kaufmann
008cbc964f fixes and adjustments (+ notes) to install (on gentoo)
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-05-06 16:23:11 +02:00
Michael Kaufmann
ac638041fa check for supported distribution in config-services parameter 'yes-to-all'
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-05-06 14:13:52 +02:00
Michael Kaufmann
b15d452981 enable re-selecting of system-distribution; move some distribution-related settings which are adjusted via installation to config-templates 'defaults'
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-05-06 10:19:19 +02:00
Michael Kaufmann
d0eaf12b34 fix checkbox-value for installation; fix session-initialization; preselect various guessable fields to ease installation
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-05-05 17:26:28 +02:00
Michael Kaufmann
65eeab299d set values for finishing json-parameter string for config-services call
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-05-05 16:12:36 +02:00
Michael Kaufmann
df6df4c5d3 validating input of install
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-05-05 15:02:09 +02:00
Michael Kaufmann
ad49a63eae use floating labels for installation, looks less confusing
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-05-04 15:35:48 +02:00
Michael Kaufmann
f67d596866 language enhancements and tiny fixes in new installation
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-05-04 14:15:19 +02:00
Michael Kaufmann
f8386062cf create self-signed certificate as last fallback if system-wide cert/key file cannot be found; add english translations for installation (wip)
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-05-02 19:16:58 +02:00
Michael Kaufmann
c4a2d87d70 use PhpHelper::parseArrayToPhpFile in new MysqlServer API command; show asterisk for mandatory fields in formfields; add ssl-flag for ssl-enabled ip in installation
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-05-02 10:00:59 +02:00
Michael Kaufmann
00a3424f65 resolve old lng-references
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-05-02 08:56:39 +02:00
Michael Kaufmann
7b6d5f1642 add Crypt::createSelfSignedCertificate; bugfix display of no-ssl-ip in domain-add formfield
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-05-02 08:33:42 +02:00
envoyr
82ea54863d added more fields and defaults 2022-05-01 18:27:00 +02:00
envoyr
fb8143991c merge branch '0.11-dev' of github.com:Froxlor/Froxlor into 0.11-dev 2022-05-01 17:27:36 +02:00
envoyr
86e01191d2 make a more complete version of the installer 2022-05-01 17:26:51 +02:00
Michael Kaufmann
0535420334 possibility to use complete string-identifier paths in standard_error and standard_success
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-05-01 17:08:22 +02:00
Michael Kaufmann
54b467887b use correct array-structure for output of preconfig
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-05-01 16:58:51 +02:00
Michael Kaufmann
c59c5efc11 migrate update/preconfig to a more OOP way and remove unnecessary file/dir complexity
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-05-01 16:48:43 +02:00
envoyr
1557482d17 merge branch '0.11-dev' of github.com:Froxlor/Froxlor into 0.11-dev 2022-05-01 13:48:12 +02:00
envoyr
b9bb689796 add array to string/file helper 2022-05-01 13:47:50 +02:00
Michael Kaufmann
e768d834c1 add new setting to preselect system distribution to ease configuration
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-04-30 14:01:49 +02:00
Michael Kaufmann
14c86d3d21 add cli parameter -s to froxlor:api-call to show possible command-parameters
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-04-30 13:11:33 +02:00
envoyr
98c7c81fb8 merge branch '0.11-dev' of github.com:Froxlor/Froxlor into 0.11-dev 2022-04-30 11:59:58 +02:00
envoyr
4ea31c7124 update installer class and ui 2022-04-30 11:59:38 +02:00
Michael Kaufmann
c7226a16d2 make selection of config-services downloadable as json e.g. for config-services script
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-04-30 11:26:39 +02:00
Michael Kaufmann
422950d386 add cli command to run API commands
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-04-30 10:18:09 +02:00
Michael Kaufmann
9b064cdcce more php8.1 compatibility
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-04-29 18:01:59 +02:00
Michael Kaufmann
3065b5fbf9 unittests / php8.1
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-04-29 17:51:31 +02:00
Michael Kaufmann
10313d9058 fix allowed_myserver parameter in unit-test
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-04-29 17:02:01 +02:00
Michael Kaufmann
449897039c add testing for mysql-server/customer-update of allowed_mysqlserver; beautify config-command/file details
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-04-29 16:53:01 +02:00
Michael Kaufmann
bff499caed hopefully the last language migrations needed
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-04-29 10:33:42 +02:00
Michael Kaufmann
9ab185a71c even more language migration/fixing
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-04-29 10:23:45 +02:00
Michael Kaufmann
6116dda9bb more language migrations
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-04-29 10:01:58 +02:00
Michael Kaufmann
0dc77997fe more language cleanup and adding mysql-servers to customer add/delete in UI
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-04-29 09:36:46 +02:00
Michael Kaufmann
fe747b321c fix unit-tests with new language-class; fix language access in standard_error/standard_success; add MysqlServer API command and possibility to allow/disallow customers available mysql-servers
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-04-29 08:55:07 +02:00
envoyr
4f4c71d79b major refactoring of almost all files 2022-04-28 20:48:00 +02:00
Michael Kaufmann
a2e95b960f use new language class in API
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-04-28 18:14:00 +02:00
envoyr
373dfa7ad9 merge branch '0.11-dev' of github.com:Froxlor/Froxlor into 0.11-dev 2022-04-28 17:43:36 +02:00
envoyr
3d7d03b1f5 fix language strings in formfiles, navigation and tablelisting 2022-04-28 17:43:12 +02:00
Michael Kaufmann
450c682e7f try to fix github actions with new install/froxlor.sql.php; migrate update-functions into class
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-04-28 17:42:41 +02:00
Michael Kaufmann
6cc8ab0fb4 additional removes for new language mgmt; combined pre-requirement checks for cli commands; removed updaters for 0.9.x and 0.10.x (the last 0.10.x will be upgradable to 0.11.x of course)
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-04-28 17:11:40 +02:00
envoyr
da89315a10 fix view function in init and update dirname level in install 2022-04-28 16:57:35 +02:00
envoyr
5d08d5235d major changes in language management and installer 2022-04-28 16:49:11 +02:00
Michael Kaufmann
f2ea821948 forgot to save one more file, again fix wrong visible-callback for ssl-editor in domain-listing
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-04-25 09:05:58 +02:00
Michael Kaufmann
0c647e0acb fix wrong visible-callback for ssl-editor in domain-listing; fix adding new certificate via form; don't show logs-icon when domain is email_only
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-04-25 08:36:11 +02:00
Michael Kaufmann
eb8b17efd7 update debian/ubuntu instructions
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-04-24 18:48:44 +02:00
Michael Kaufmann
57eeca5818 fix missing $ for a variable in Lighttpd-class
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-04-24 18:44:39 +02:00
Michael Kaufmann
1adb095918 corrections in config-templates
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-04-24 13:20:34 +02:00
Michael Kaufmann
b5794e463f add icon to display detailed commands/file-contents from config-templates in admin_configfiles
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-04-24 11:08:09 +02:00
Michael Kaufmann
000cb93def updating config-file xml's; prepare config-details view via ajax for config-commands/files to show in configuration
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-04-23 19:42:23 +02:00
envoyr
91d41af44a add button to restore table column defaults and ux improvements 2022-04-23 18:59:25 +02:00
envoyr
6ca071a31f merge branch '0.11-dev' of github.com:Froxlor/Froxlor into 0.11-dev 2022-04-23 16:11:51 +02:00
envoyr
3f17e893b5 add bootstrap to global variable 2022-04-23 16:11:43 +02:00
Michael Kaufmann
7178b49101 add security question when deleting api-key
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-04-23 10:00:41 +02:00
Michael Kaufmann
d267f408eb re-add contextual classes to domain-entry depending on deactivated/termination_date
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-04-22 14:29:36 +02:00
Michael Kaufmann
68fcfd2cf5 fix ajax responses; re-add statistics link to main-domains for customers
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-04-22 13:52:08 +02:00
Michael Kaufmann
8c1621cced fix deprecated jquery calls; move editapikey jq call to Ajax.php; fix edit of apikeys::allowed_from and allow cidr
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-04-22 13:17:09 +02:00
envoyr
a615b04eb4 add function to manage table columns 2022-04-22 10:59:56 +02:00
envoyr
03df082cf2 merge branch '0.11-dev' of github.com:Froxlor/Froxlor into 0.11-dev 2022-04-22 10:37:13 +02:00
Michael Kaufmann
b869c84f4d add new IPTools class; add new callback to show link to domain in domain-overview; validate possible allowed_ip-ranges in FroxlorRPC; fix possible duplicate ips for mysql-access-host in installation
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-04-22 10:36:46 +02:00
envoyr
5752222baa update alert ui 2022-04-21 20:02:14 +02:00
envoyr
d3ae4c5d72 improve error messages and language 2022-04-21 19:07:14 +02:00
envoyr
e638511826 merge branch '0.11-dev' of github.com:Froxlor/Froxlor into 0.11-dev 2022-04-21 18:20:13 +02:00
envoyr
cb7f180d8d update cron fpm config builder and webpack assets 2022-04-21 18:19:23 +02:00
Michael Kaufmann
f82d78ad5d add 'back to overview' links when adding/editing entities
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-04-20 17:08:49 +02:00
Michael Kaufmann
35a8fe7372 Merge branch '0.11-dev' of github.com:Froxlor/Froxlor into 0.11-dev 2022-04-20 17:06:57 +02:00
envoyr
16c38b4066 merge branch '0.11-dev' of https://github.com/Froxlor/Froxlor into 0.11-dev 2022-04-20 17:01:33 +02:00
envoyr
8c942178d2 fix font assets path, logo path, database installation and checks 2022-04-20 17:01:25 +02:00
Michael Kaufmann
74021ae142 fix ftp-action-links in listing; fix display of running/scheduled backup-job
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-04-20 16:51:40 +02:00
Michael Kaufmann
949f258f54 reflect same permission requirement for documentroot in Domains.add() and Domains.update()
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-04-20 16:18:02 +02:00
Michael Kaufmann
b1191917b8 avoid redirect-loop when displaying error in admin-autoupdate; fix description for 'move to domain to other customer'
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-04-20 16:12:42 +02:00
Michael Kaufmann
ebceab96b4 introduce static configs to enable/disable web-update (and possibly more later on)
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-04-20 15:18:50 +02:00
Michael Kaufmann
b362c1f232 remove unused IgnorantRecursiveDirectoryIterator and fix uninitialized variables
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-04-20 15:13:35 +02:00
Michael Kaufmann
58c646f59e allow api interaction via kind-of-RESTful style via api.php?/module/command/
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-04-17 20:59:25 +02:00
Michael Kaufmann
d1dda00a1c Merge branch '0.11-dev' of github.com:Froxlor/Froxlor into 0.11-dev 2022-04-17 17:18:13 +02:00
Michael Kaufmann
9f0253819b adjustments
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-04-17 17:18:09 +02:00
Dennis Dudek
25d9c52c58 remove unnecessary ternaries (#1027)
* remove unnecessary ternaries

* fix: !($id <= 0);

* remove ternary
2022-04-14 09:02:10 +02:00
Dennis Dudek
d90676a793 Optimised phpdoc and array value use in foreach (#1026)
* use array values by already destructed values in foreach
corrected php docs to use string|array

* use values by already desctructered array values in foreach
2022-04-13 10:37:25 +02:00
Dennis Dudek
7a13e4a421 remove nested dirname and use level parameter for better readability (#1025) 2022-04-13 10:14:03 +02:00
Michael Kaufmann
3fbf23cb47 switch from crypt() to password_hash() and password_verify(), thx to kapsonfire for the hint
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-04-10 14:35:20 +02:00
Michael Kaufmann
90682b774a fine-tuning configservices cli script
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-04-10 14:32:43 +02:00
envoyr
cf19331f75 Merge branch '0.11-dev' of github.com:Froxlor/Froxlor into 0.11-dev 2022-04-10 13:41:19 +02:00
envoyr
e9d1f9d68f update search 2022-04-10 13:41:07 +02:00
Michael Kaufmann
5081d6d916 fix php compatibility hopefully for real now
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-04-10 10:29:43 +02:00
Michael Kaufmann
f540ed4eb5 require correct version of symfony/console to be php7.4 compatible
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-04-10 10:15:29 +02:00
Michael Kaufmann
0f4325f68d migrate shell/helper scripts to symfony/console components
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-04-10 10:05:21 +02:00
Michael Kaufmann
7f0eb97f9b show apikey details in modal-overlay; todo: edit allowed_from and valid_until
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-04-09 13:32:08 +02:00
Michael Kaufmann
9272c15706 add advanced_mode flag to various settings; exclude from output and global-search when settings-mode is 'basic'
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-04-08 18:41:28 +02:00
Michael Kaufmann
578b2811a5 add new settings_mode setting to switch between basic and advanced view
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-04-08 15:53:20 +02:00
Michael Kaufmann
01c6096998 use correct (new) class to call getThemes()
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-04-03 23:00:14 +02:00
Michael Kaufmann
2bb5c31a0f use correct method to get CurrentUser data-field
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-04-03 20:04:55 +02:00
Michael Kaufmann
64994e6444 don't try to globalsearch specific 'settings' search
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-04-03 18:56:40 +02:00
Michael Kaufmann
a4b780e7f7 don't search setting when using specific search and not settings: specified
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-04-03 18:54:37 +02:00
Michael Kaufmann
7779ec376a remove unused lib/version.inc.php file; added module-specific search to global-search; added new table for user-column-settings
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-04-03 18:42:49 +02:00
Michael Kaufmann
07049909ef remove accidentally added character
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-04-03 14:44:13 +02:00
Michael Kaufmann
c7833beff4 fix exit statement in cli scripts
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-04-03 14:42:02 +02:00
Michael Kaufmann
d18fa771f4 respect domain.writeerrorlog and domain.writeaccesslog when using log-to-pipe
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-04-03 14:35:09 +02:00
Michael Kaufmann
1441ed9a99 make search-result links a filter/search for the overview instead of the direct edit-link; show number of total entries in overview; show 'back to overview' button when showing search-result
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-04-01 16:47:22 +02:00
Michael Kaufmann
0312548e88 don't rely on executable flag for php-sessionclean script
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-04-01 14:48:55 +02:00
Michael Kaufmann
ef04d6532a fix phpunit-tests for dev-versions
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-04-01 10:36:27 +02:00
Michael Kaufmann
eacf383928 set valid version
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-04-01 10:32:39 +02:00
Michael Kaufmann
5f0429ef77 set development version to 0.11.0-dev
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-04-01 10:27:37 +02:00
Michael Kaufmann
78a4c109e4 validate sql_search and sql_orderby API parameters, fix unit-tests as of new default skin is 'Froxlor'
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-04-01 09:37:07 +02:00
envoyr
6ce2afa6a4 remove compiled assets from git 2022-03-27 16:02:07 +02:00
envoyr
957f41ae87 update default theme in froxlor.sql 2022-03-27 15:36:13 +02:00
Michael Kaufmann
4e8fddadff fix filename of template
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-03-27 15:00:44 +02:00
Michael Kaufmann
60433358f6 remove Sparkle-theme (old template-engine)
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-03-27 14:59:17 +02:00
Michael Kaufmann
fb7091403c migrate recalc.resource-usage
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-03-27 14:58:52 +02:00
Michael Kaufmann
51ba6c757e migrate customer::backups
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-03-27 13:19:26 +02:00
Michael Kaufmann
943301e908 refactor error-reporting for admin/customer; remove now unused Froxlor\UI\Template class
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-03-27 12:44:44 +02:00
FliegenKLATSCH
2a91dafe20 Fix distro in postfix smtpd banner (#1014) 2022-03-27 11:11:05 +02:00
Michael Kaufmann
0b7443e875 refactor admin_acpuinfo
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-03-26 16:47:46 +01:00
FliegenKLATSCH
1d455ec4fb Set RC 1 if an exception occured (#1013) 2022-03-26 14:09:18 +01:00
Michael Kaufmann
439635d329 fix typo and re-add button to reset opcache in opcache-overview
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-03-26 14:09:16 +01:00
Michael Kaufmann
82fc148d8e migrate admin_opcacheinfo
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-03-25 09:32:33 +01:00
Michael Kaufmann
9a9089cde3 a few old session-variable leftovers
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-03-25 08:11:31 +01:00
Michael Kaufmann
2b53c4b918 migrate phpinfo page
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-03-24 15:10:00 +01:00
Michael Kaufmann
04a08f9095 add empty index.html file to all folders to avoid accidental folder-content disclosure if 'Options Indexes' is set for a (parent)folder containing froxlor in webserver-config
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-03-24 14:35:30 +01:00
Michael Kaufmann
bf41c84c6a migrate admin_settings::testmail
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-03-24 14:25:29 +01:00
Michael Kaufmann
25b9e5b540 migrated admin_messages; minor fixes in admin-listing and ipsandports::add defaults
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-03-24 13:40:43 +01:00
Michael Kaufmann
66f97738c2 added more entities to globalsearch (customer-side)
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-03-21 09:07:43 +01:00
Michael Kaufmann
59682ba620 added a few more entities to globalsearch (admin-side)
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-03-20 09:53:30 +01:00
Michael Kaufmann
860306b855 adjustments in ssl-certificates for customers; fix change-password for customers
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-03-18 19:25:25 +01:00
Michael Kaufmann
c1f4ee4e05 fully migrate admin_updates; removed unused Froxlor\UI\Paging;
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-03-18 16:11:56 +01:00
envoyr
69895943bd update ui class and traffic stats 2022-03-18 12:53:34 +01:00
Michael Kaufmann
ba0d33392c 2fa template migration; fix menu-active-state; removed unused code from UI/HTML-class
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-03-18 11:41:07 +01:00
Michael Kaufmann
12bf7db481 add language strings for configfiles
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-03-18 10:28:02 +01:00
Michael Kaufmann
406b9241ce fix user/form heading-icon; re-add button to set panel configured manually
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-03-18 10:04:33 +01:00
Michael Kaufmann
974e02694e first refactor of config-files
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-03-18 09:37:50 +01:00
Michael Kaufmann
dc798c63c7 migrate admin-autoupdate
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-03-16 14:32:10 +01:00
Michael Kaufmann
d30c9a2ff7 migrated ssl-editor; also usable as admin now
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-03-16 13:54:57 +01:00
Michael Kaufmann
401eb60062 admin-updates, settings-import and some minor ui tweaks
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-03-16 13:22:59 +01:00
Michael Kaufmann
d25c5ec4dd tiny fixes in customer_email
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-03-15 09:06:02 +01:00
Michael Kaufmann
6a9c2b8fdf remove old/unused javascript files
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-03-15 09:05:25 +01:00
Michael Kaufmann
0d282d29d8 move email settings to the top and hide then optional domain-settings when adding/editing domain as admin; fixes #1012
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-03-15 09:05:05 +01:00
Michael Kaufmann
af6b5f0ec5 correctly secure session-cookie
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-03-14 23:08:11 +01:00
Michael Kaufmann
164b46ece3 get rid of session variable in URL
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-03-14 22:51:59 +01:00
Michael Kaufmann
2972d95e8b use new form style for settings too
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-03-14 18:36:34 +01:00
envoyr
2c5c0258bf multiple ui improvements 2022-03-14 18:18:35 +01:00
Michael Kaufmann
31fbe434b4 domain import form
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-03-14 17:29:16 +01:00
Michael Kaufmann
21228b5359 style apikeys and integrity-check
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-03-14 12:36:53 +01:00
Michael Kaufmann
05cc08c376 add dns-editor in twig/tablelisting/formfield
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-03-14 11:13:21 +01:00
Michael Kaufmann
237476b30d add parsedown for markdown-usage in a few cases
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-03-13 16:33:57 +01:00
Michael Kaufmann
7e9e89e1fd handle speciallogfile-warning-note when editing domain as admin
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-03-13 16:16:48 +01:00
Michael Kaufmann
343339d510 generated css/js
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-03-13 12:21:10 +01:00
Michael Kaufmann
9a524da5b4 re-add some of the js/ajax actions
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-03-13 12:16:42 +01:00
Michael Kaufmann
b098dd1e15 correct alias-domainid for reverse-lookup-search
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-03-11 17:07:26 +01:00
Michael Kaufmann
e4144d8c6a logfiles view to twig
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-03-11 16:20:16 +01:00
Michael Kaufmann
9c60cf006f fomfields for admin/domains and some fixes in tablelistings
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-03-10 16:39:49 +01:00
Michael Kaufmann
5def8c1635 Merge branch '0.11-dev' of github.com:Froxlor/Froxlor into 0.11-dev 2022-03-09 14:10:47 +01:00
Michael Kaufmann
f236896764 use prepared statements for global-search
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-03-09 14:10:44 +01:00
envoyr
7e78bc6dd1 removed typeahead 2022-03-08 21:53:41 +01:00
envoyr
ba1a16b39e update search 2022-03-08 21:29:14 +01:00
Michael Kaufmann
1a40c9ba17 restructure searchresult
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-03-08 17:33:21 +01:00
Michael Kaufmann
218028de2b add userinfo to ajax calls; combine settings and global-search to one
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-03-08 16:57:55 +01:00
Michael Kaufmann
f758d0d943 fix installation for mariadb-10.5; minor fixes for global search later
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-03-07 18:43:06 +01:00
Michael Kaufmann
3c20fe4202 fix settings-search
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-03-07 10:37:00 +01:00
envoyr
958e783e77 add favicon 2022-03-06 20:55:04 +01:00
envoyr
bc64c82119 add language to ajax and typeahead 2022-03-06 20:54:36 +01:00
envoyr
3da11ca7fb remove incorrectly created files 2022-03-06 19:42:48 +01:00
Michael Kaufmann
3f9769103b function for setting-search
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-03-06 10:59:55 +01:00
Michael Kaufmann
a3a33c0da4 mail & filetemplates listing/forms
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-03-06 09:43:06 +01:00
Michael Kaufmann
54ce296018 some work on mail/file template formfields
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-03-05 11:46:35 +01:00
Michael Kaufmann
8256f31374 minor fixes in pagination and alertbox stuff
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-03-04 16:12:25 +01:00
Michael Kaufmann
30d64973c3 fix pagination back links
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-03-04 12:19:40 +01:00
Michael Kaufmann
7b28a33aba fix nav-sections to be open when active; show error if customer has no (email)domain assigned when trying to add a new address
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-03-04 10:47:22 +01:00
Michael Kaufmann
0c93a5166b admin_cronjobs form and admin/customer logger overview
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-03-04 10:21:45 +01:00
Michael Kaufmann
56f51703c7 testing api-key listing
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-03-03 19:19:18 +01:00
envoyr
7a26ade8de update preview image to english version 2022-02-28 19:08:28 +01:00
envoyr
49b77f9ed0 Merge branch '0.11-dev' of github.com:Froxlor/Froxlor into 0.11-dev 2022-02-28 18:54:29 +01:00
envoyr
289498296d update preview image 2022-02-28 18:54:07 +01:00
Michael Kaufmann
bd1e5c83e6 fix tablelisting in customer_extras; formatting js files
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-02-28 13:57:53 +01:00
envoyr
8742c9302e update icons 2022-02-28 13:54:39 +01:00
envoyr
95f2e63ac8 fix data when no field is set 2022-02-28 13:45:06 +01:00
envoyr
8f6f85ea8e update listing, handle fields with or without callbacks or callbacks only 2022-02-28 13:28:57 +01:00
Michael Kaufmann
8ff6e71729 tablelisting fpmdaemons
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-02-28 12:10:44 +01:00
Michael Kaufmann
5133d26f6f more tablelistings and php-related formfields
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-02-28 10:51:19 +01:00
envoyr
bebdb3a93f optimize spacing and imports of tabellisting 2022-02-28 09:33:32 +01:00
envoyr
4fc84652c5 forget to push spacing 2022-02-28 09:30:49 +01:00
envoyr
1c228c9ba9 fix class name and spacing 2022-02-28 09:28:13 +01:00
Michael Kaufmann
5b961be0f8 enhanced listing actions
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-02-28 09:21:04 +01:00
envoyr
2b771b11d6 fix usage info 2022-02-28 09:01:29 +01:00
envoyr
fb9dccc94a update naming 2022-02-27 21:10:23 +01:00
envoyr
639a262599 implement visible callbacks for tabellisting 2022-02-27 20:53:24 +01:00
envoyr
3186c2b37d rename tabellisting column to filed 2022-02-27 20:04:40 +01:00
Michael Kaufmann
f1e91af58a show note if no entries exist for a listing
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-02-27 18:54:36 +01:00
envoyr
1a6b899c67 refactoring callbacks, add class for table rows 2022-02-27 16:36:23 +01:00
Michael Kaufmann
d9f909150d more work on settings
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-02-27 16:03:24 +01:00
Michael Kaufmann
a73f6ffef5 forgot to save
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-02-27 14:37:32 +01:00
Michael Kaufmann
ab5ffc7545 beginning of rework/redesign of settings
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-02-27 14:34:05 +01:00
envoyr
c48a22a58e fix pagination and collections 2022-02-25 21:56:12 +01:00
envoyr
fb6660b78a add editorconfig 2022-02-25 21:25:15 +01:00
envoyr
d48baf0cb5 Merge branch '0.11-dev' of github.com:Froxlor/Froxlor into 0.11-dev 2022-02-25 21:17:45 +01:00
envoyr
7cfdf80a14 update listing and add pagination 2022-02-25 20:52:09 +01:00
Michael Kaufmann
6b5cabb125 more overview/actions-links
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-02-25 20:41:48 +01:00
Michael Kaufmann
fc4725cd61 more action-menu and info-box testing for overviews
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-02-25 20:13:13 +01:00
Michael Kaufmann
cdc4eccdd9 action-menu and info-box testing for overviews
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-02-25 19:36:22 +01:00
Michael Kaufmann
8c6452bb05 customer-extras overviews
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-02-25 17:17:29 +01:00
Michael Kaufmann
01798650fe fix unittests for FroxlorRPC-class round #3 (maybe)
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-02-25 15:51:26 +01:00
Michael Kaufmann
5d7649a274 fix unittests for FroxlorRPC-class again (maybe)
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-02-25 15:42:25 +01:00
Michael Kaufmann
bbc3644e23 fix unittests for FroxlorRPC-class (maybe)
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-02-25 15:32:05 +01:00
Michael Kaufmann
d933549646 don't send header() on CLI environment
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-02-25 15:16:59 +01:00
Michael Kaufmann
1faa9f17ab minor icon tweaks
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-02-25 14:30:38 +01:00
Michael Kaufmann
038b6f9510 customer ftp/mysql listing
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-02-25 14:25:58 +01:00
Michael Kaufmann
c7cc2d4357 email listing
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-02-25 11:22:00 +01:00
Michael Kaufmann
5b675c25a3 don't show SU link for yourself
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-02-25 10:10:47 +01:00
Michael Kaufmann
c2ec309a01 more work on tablelisting
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-02-25 09:52:35 +01:00
envoyr
5964c3b685 update listing, collections and callbacks 2022-02-24 21:39:31 +01:00
envoyr
703e436b32 Merge branch '0.11-dev' of github.com:Froxlor/Froxlor into 0.11-dev 2022-02-24 15:39:04 +01:00
envoyr
9b184a758e format href to link if it is a linker array 2022-02-24 15:38:10 +01:00
Michael Kaufmann
6c71bbbcb0 Merge remote-tracking branch 'origin/master' into 0.11-dev 2022-02-24 08:51:56 +01:00
Michael Kaufmann
84f5de42a9 move php-sessionclean script to scripts-dir instead of install/scripts/; add cronjob calling php-sessionclean if php-fpm is enabled; remove testing-note for let's encrypt in german language file
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-02-24 08:49:36 +01:00
Michael Kaufmann
dcdc63679c fix language for options in tables
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-02-24 08:32:58 +01:00
envoyr
92ba16aa7f Merge branch '0.11-dev' of github.com:Froxlor/Froxlor into 0.11-dev 2022-02-23 18:28:13 +01:00
envoyr
c4940897a3 add actions to the listing 2022-02-23 18:24:51 +01:00
Michael Kaufmann
af50eb5462 small enhancements to Collection
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-02-23 17:57:10 +01:00
Michael Kaufmann
511c219d19 forgot a line of old code
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-02-23 17:41:31 +01:00
Michael Kaufmann
8c2a4aeec4 add tablisting.ipsandports
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-02-23 17:40:36 +01:00
envoyr
04263cb69f update tabellisting and callbacks, make columns invisible 2022-02-23 17:33:54 +01:00
envoyr
4e4e4eca94 move html from callbacks to twig 2022-02-23 16:27:13 +01:00
Michael Kaufmann
9177273484 more progressbar stuff
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-02-23 09:55:23 +01:00
Michael Kaufmann
b11f466a0a progressbar callback to behave like 0.10.x
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-02-23 09:27:52 +01:00
Michael Kaufmann
fca96864c6 Merge branch '0.11-dev' of github.com:Froxlor/Froxlor into 0.11-dev 2022-02-22 19:31:32 +01:00
Michael Kaufmann
56519b4072 more work on add/edit forms
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-02-22 19:31:28 +01:00
envoyr
2317930263 add decimal places to numbers 2022-02-22 19:18:36 +01:00
envoyr
4af1dff6fd fix titles 2022-02-22 19:10:53 +01:00
envoyr
8f7876b850 update table listing and add callbacks 2022-02-22 19:07:04 +01:00
envoyr
855e220d14 update table and add listing and collection class 2022-02-22 17:09:36 +01:00
Michael Kaufmann
5f2550e19c Merge branch '0.11-dev' of github.com:Froxlor/Froxlor into 0.11-dev 2022-02-22 11:37:38 +01:00
Michael Kaufmann
1974cb5217 do updatecheck
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-02-22 11:37:30 +01:00
envoyr
51d441b4e9 update admins and customers page 2022-02-21 20:34:58 +01:00
envoyr
60029ba1c3 Merge branch '0.11-dev' of github.com:Froxlor/Froxlor into 0.11-dev 2022-02-21 19:29:48 +01:00
envoyr
ffe536a57f make tables more customizable 2022-02-21 19:29:34 +01:00
Michael Kaufmann
322719fec8 lot of formfield corrections; form-adjustments; implementing of add/edit for most customer_* pages
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-02-21 17:42:04 +01:00
envoyr
1e4da4850e hardening requests 2022-02-20 18:30:57 +01:00
envoyr
e057314795 update templates introduce request helper 2022-02-20 18:00:59 +01:00
Michael Kaufmann
e0540ceb7c more work on formfields and display
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-02-20 16:53:47 +01:00
Michael Kaufmann
e6d12be7b3 update some more formfields; improved formfields with wrapper fieldrow()-macro to reduce duplicate markup; enable next_to functionality for some fields
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-02-20 12:50:29 +01:00
envoyr
23ecc40b1a fix standard error response 2022-02-20 11:45:45 +01:00
envoyr
ddc53e87fa fix response 2022-02-20 11:42:52 +01:00
envoyr
424a00b39e update api and ajax handling and response 2022-02-20 11:38:08 +01:00
Michael Kaufmann
d5e53cc7db check session in lib/ajax if we're going to do more than just reading the newsfeed
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-02-19 13:58:12 +01:00
Michael Kaufmann
90d2333eef change port field in ipsandports to type-number
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-02-19 11:15:03 +01:00
Michael Kaufmann
0b61bd9a79 migrate ipsandports.add/edit
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-02-18 22:33:59 +01:00
Michael Kaufmann
ef4feb07e6 migrate admin.add/edit
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-02-18 22:19:36 +01:00
Michael Kaufmann
357e97e1ca fix padding-top of heading
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-02-18 21:54:54 +01:00
Michael Kaufmann
06f77b41fd fix install-requirement messages for php
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-02-18 21:14:06 +01:00
envoyr
36dbb3bdcc set minimum php version to 7.4 and fix templates 2022-02-18 18:50:45 +01:00
envoyr
e1b09e49fd add missing froxlor-details 2022-02-18 17:42:47 +01:00
envoyr
36b87971fb fix row cols 2022-02-18 17:28:26 +01:00
envoyr
8b2ba97823 update templates and base structure 2022-02-18 17:06:23 +01:00
Michael Kaufmann
14008d1432 dashboard-resource-items
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-02-18 14:44:26 +01:00
Michael Kaufmann
c1c09da18d more cleanup in admin_customers for add/edit form
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-02-18 12:41:49 +01:00
Michael Kaufmann
0fd7b9a551 forgot to add a file
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-02-18 10:46:39 +01:00
Michael Kaufmann
829b99bc06 first form-migrate tests with customer-add-form
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-02-18 10:42:02 +01:00
Michael Kaufmann
28526b4544 add change pwd|lang|theme; twig-ify standard_error()
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-02-17 22:03:09 +01:00
Michael Kaufmann
9dce16e5c7 kinda fix error-handlers; more work on admin-dashboard
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-02-17 17:23:04 +01:00
envoyr
b4d9b1037d add dark mode 2022-02-17 15:30:05 +01:00
Michael Kaufmann
5d80c40b25 a bit more dashboard work
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-02-17 14:57:08 +01:00
Michael Kaufmann
f836342ff2 newsfeed + more admin dashboard info
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-02-17 13:58:29 +01:00
Michael Kaufmann
402a91c841 minor adjustments for mobile in dashboard; color-adjustments
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-02-17 12:15:47 +01:00
Michael Kaufmann
181fa96431 first work on dashboard template (admin and customer)
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-02-17 12:01:54 +01:00
envoyr
96b2b2e065 add missing css 2022-02-17 08:13:32 +01:00
Michael Kaufmann
f930565d45 forgot-password function on login
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-02-16 21:08:25 +01:00
envoyr
14111583f1 merge changes into branch 2022-02-16 20:37:10 +01:00
envoyr
a4d6d183ff update base structure 2022-02-16 20:29:42 +01:00
Michael Kaufmann
0be8b9c313 beautification and mobile-fixes
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-02-16 16:47:18 +01:00
Michael Kaufmann
91197bcff2 update composer.json and fix dependencies for php <8.0 to stay 7.4 compatible
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-02-16 15:32:48 +01:00
Michael Kaufmann
2a3262ef45 actually show admin-dashboard
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-02-16 15:00:27 +01:00
Michael Kaufmann
759d11d1a0 add userarea-layout + sidebar and topmenu
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-02-16 14:54:06 +01:00
envoyr
4fd6ebf5b7 fix jquery 2022-02-16 12:37:28 +01:00
envoyr
f8a00a5f1e fix javascript and images, update css 2022-02-16 11:59:52 +01:00
Maurice Preuß
f7db5497af 0.11 dev (#1010)
* update layout and bootstrap package

* update templates

Co-authored-by: Michael Kaufmann <d00p@froxlor.org>
2022-02-16 09:57:17 +01:00
Michael Kaufmann
3ba196fec6 add dberrornice template for database-errors
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-02-16 09:25:27 +01:00
Michael Kaufmann
2ced9cdc2d add missing query-field
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-02-16 08:36:32 +01:00
Michael Kaufmann
407a1daebf first non-install template (login); mostly testing
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-02-15 20:37:27 +01:00
Michael Kaufmann
f37d9d000c make selecting the used OS actually do something (load default-setting-adjustments required/needed; TBD)
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-02-15 15:43:18 +01:00
Michael Kaufmann
96cdb34d71 first tiny fixes to get the installation running
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-02-15 11:31:49 +01:00
Michael Kaufmann
56a9a71248 preparing for re-design using new template-engine for future 0.11.x releases
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-02-15 11:18:19 +01:00
Michael Kaufmann
1d7d32130a setting version to 0.10.33 for upcoming release
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-02-04 13:24:41 +01:00
Michael Kaufmann
9babcde3e5 additional mkdir/chmod parameter fixes and cron-lock file adjustments
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-02-04 10:52:12 +01:00
Kris
9ec76c9fd6 Improve composer.json syntax (#1008)
* Improve composer.json syntax

* Run composer upgrade with PHP 7.4
2022-01-26 14:10:08 +01:00
Michael Kaufmann
61dfeb947f fix incorrect parameter type for mkdir() and chmod()
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-01-25 15:47:37 +01:00
Michael Kaufmann
6fdf2636fc update docs url for api-documentation
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-01-25 14:54:52 +01:00
Michael Kaufmann
0a38d1ab5f add workflow to automatically trigger api-docs generation in Froxlor/Documentation
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-01-21 17:02:35 +01:00
Michael Kaufmann
7c80dc3d1d add script for php-session cleanup
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-01-21 16:02:21 +01:00
Manuel
5ab49e3f50 Call PHP-FPM only when file exists (#1006)
Added `<If "-f %{SCRIPT_FILENAME}">` to load only PHP files that exists. This is to prevent `File not found` error from PHP-FPM and let Apache handle the error output. It removes also unnecessary PHP-FPM calls and `AH01071: Got error ‘Primary script unknown` in PHP error log.

Usually you can find the error whenever someone goes fishing for paths like wp-login.php.

The `<If>` directive is only available in Apache 2.4+ and not 2.2 or earlier.
2022-01-21 12:25:14 +01:00
Michael Kaufmann
06849133a8 modernize parameters of Cronjob::inserttask()
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-01-21 10:39:32 +01:00
Oskar Eisemuth
4a912e3902 Feature/crontaskid (#1005)
* Add \Froxlor\Cron\TaskId for fixed task id naming

* Replace Cronjob::inserttask numbers with \Froxlor\Cron\TaskId constants

* Use TaskId in Froxlor\Cron\System\TasksCron

* Use TaskId in Froxlor\System\Cronjob,
simplify getOutstandingTasks.
Rename lng['tasks'] cronjob task description.
WARNING: DELETE_DOMAIN_PDNS, DELETE_DOMAIN_SSL now use %domain%

* Remove Froxlor\System\Cronjob type 3 check
2022-01-21 10:03:45 +01:00
Michael Kaufmann
bcb95e9b7d check resource-usage for Mysql.add(), thx again to zerody
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-01-18 23:18:54 +01:00
Michael Kaufmann
c97f5f1e29 updated README; sanitize script parameter in index.php; sanitize description fields of entities (thx to zerody for pointing these out)
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-01-18 09:29:13 +01:00
timdeluxe
4d289e2a7f Improves text for global open basedir setting (#1004) 2022-01-13 19:50:39 +01:00
Michael Kaufmann
c491f2c03e put commands for cronjob setup at the end of the list (should be the last thing to execute)
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-01-13 18:42:40 +01:00
Michael Kaufmann
5832346f75 set version to 0.10.32 for upcoming release
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-01-07 15:38:12 +01:00
Michael Kaufmann
4b4770ab36 add missing change-check when ssl-specialsettings are changed
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2022-01-03 20:27:19 +01:00
Michael Kaufmann
8c998dd6f2 Update README.md 2022-01-02 14:53:59 +01:00
Michael Kaufmann
965359ec79 Update README.md 2022-01-02 14:35:36 +01:00
Michael Kaufmann
d1d42f2055 allow setting path to acme.sh installation; fixes #1002
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2021-12-31 10:38:49 +01:00
Michael Kaufmann
5f41b37770 test dns entry string without any whitespaces/tabs/etc.
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2021-12-27 16:08:46 +01:00
Michael Kaufmann
61265778a5 fix unit-test
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2021-12-27 16:01:45 +01:00
Michael Kaufmann
8f0f890145 fix too strict comparison for isemaildomain check in Dns-Zone generation; fixes #1003
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2021-12-27 15:38:59 +01:00
Michael Kaufmann
5ccae3f9bb do not check for allowed-phpconfigs if fpm/fcgid is not activated (no possibility to select a config anyway)
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2021-12-14 11:23:36 +01:00
Michael Kaufmann
f4d9e64804 set version to 0.10.31 for upcoming release
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2021-12-03 15:30:09 +01:00
Michael Kaufmann
149c0935fa fix Domains.update() with correct path and change_serversettings=0; refs #1001
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2021-11-27 22:06:29 +01:00
Michael Kaufmann
cb0b537f6c allow settings/updating documentroot (only relative to customer homedirectory) when change_serversettings permission is not granted; fixes #1000
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2021-11-27 18:04:36 +01:00
Michael Kaufmann
b54c012579 respect deactivated flag when createstdsubdomain's default falls back to 'true' if the customer has one (prior to deactivating); refs #998
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2021-11-15 20:24:55 +01:00
Michael Kaufmann
389d83f5a3 fix behaviour in Customers.update() in case 'createstdsubdomain' is not set when called via API (wrong default); fixes #998
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2021-11-15 20:04:01 +01:00
Michael Kaufmann
00771381e8 set correct php-version numbers for installation dependencies-check; fixes #997
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2021-11-13 20:20:05 +01:00
Michael Kaufmann
46df429909 set version to 0.10.30 for upcoming release
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2021-11-05 09:27:58 +01:00
Michael Kaufmann
eb841da007 avoid possible DivisionByZeroError in APCu info page, fixes #995
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2021-11-04 07:44:03 +01:00
Michael Kaufmann
c4a2db03be enable bind for testing-scenarios explicitly
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2021-11-03 14:16:21 +01:00
Michael Kaufmann
e5838f00cf add quota-plugin parameters to dovecot-config-templates; update standardcustomer index.html; set nameserver disabled by default
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2021-11-03 14:08:57 +01:00
Michael Kaufmann
bcde7e93df check whether the domain to clean from pdns actually still exists there; fixes #992
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2021-10-21 12:00:36 +02:00
Michael Kaufmann
bd8327afbe soften/correct permissions on pdns configs; fixes #991
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2021-10-21 11:56:34 +02:00
Michael Kaufmann
b961eba382 fix api documentation for Domains.add() and Domains.update(); fixes #987
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2021-10-20 16:51:16 +02:00
Michael Kaufmann
a552ea878e avoid undefined index of 'wwwserveralias' field if issueing/renewing lets encrypt certificate for froxlor-hostname
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2021-10-17 11:48:40 +02:00
Michael Kaufmann
4ad2a1da1c add complete list of nameserver-ips and given axfr-servers to allow-axfr-ips list for PowerDNS; fixes #985
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2021-10-14 19:07:05 +02:00
Michael Kaufmann
37ae69f07a correct language strings in phpconfig formfield for new setting; refs #980
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2021-10-14 17:13:55 +02:00
Michael Kaufmann
9870db2560 add possibility to assign new/edited php-config to all customer accounts; fixes #980
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2021-10-14 17:09:29 +02:00
Michael Kaufmann
724a5e172a don't remove 0-value parameter values from bulk-actions
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2021-10-12 16:29:04 +02:00
Michael Kaufmann
8e166cb842 adjust debian 11 config templates, fixes #982
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2021-10-12 14:25:42 +02:00
Michael Kaufmann
5e281cf486 fix allowed-phpconfigs check in SubDomains.add() and SubDomains.update()
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2021-10-11 19:26:13 +02:00
Michael Kaufmann
5d2f44ecd8 only validate custom database name if used at all
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2021-10-11 18:59:26 +02:00
Michael Kaufmann
5009c625d8 prep.statement cannot be used for create database query; regex-validate database_name
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2021-10-11 18:55:15 +02:00
Michael Kaufmann
eb592340b0 use prepared statement for creating databases to avoid sql injections in custom db-names
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2021-10-11 18:33:48 +02:00
Michael Kaufmann
c6f556c8d9 set version to 0.10.29.1 for bugfix release
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2021-10-10 14:45:17 +02:00
Michael Kaufmann
db1df84ef1 correct db-exists check in installation-process
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2021-10-10 14:32:02 +02:00
Michael Kaufmann
52135a1d3a set version to 0.10.29 for upcoming release
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2021-10-08 08:46:58 +02:00
Michael Kaufmann
7f13bd09da add optional ssl parameters to powerdns-config-template
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2021-10-08 08:39:22 +02:00
Nick Ufer
7ccbb37c4e feat: adds mysql tls support (#979) 2021-10-08 08:28:32 +02:00
Michael Kaufmann
7feddf0aec generate unpredictable unique session ids
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2021-10-02 12:38:17 +02:00
Michael Kaufmann
e73523531a let user decide whether an existing database should be backup'ed and removed when installing froxlor; dont rely on parse_ini_file for OS check; enhance mysqldump so there is no issues with complex passwords and bash-escaping
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2021-09-24 10:49:57 +02:00
Michael Kaufmann
a47b790e19 actually integrate the new czech language file; refs #976
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2021-09-04 09:30:44 +02:00
Michael Kaufmann
319eec6124 fix session for 2fa enabled logins
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2021-08-27 13:17:05 +02:00
Michael Kaufmann
21983f27b6 secure commonly used filename-variable against url manipulation
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2021-08-25 16:36:09 +02:00
Michael Kaufmann
5d375b784d login action always goes to index.php
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2021-08-25 16:30:56 +02:00
Michael Kaufmann
4b22470872 set php session security related settings (correctly in every case)
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2021-08-25 16:21:33 +02:00
Michael Kaufmann
ec1c37aa06 set version to 0.10.28 for upcoming release
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2021-08-20 09:23:23 +02:00
Nicolas
67351ec3c2 Adding support for PowerDNS-Replication (#974)
Adding support for powerdns-replication
2021-08-19 12:00:09 +02:00
Michael Kaufmann
f1887aaaf2 enable iterate_query in dovecot by default
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2021-08-13 09:28:10 +02:00
Michael Kaufmann
afd2d7b5e9 fix dns-validation in Domains.add() and Domains.update() when using Let's Encrypt DNS-check
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2021-08-08 11:14:57 +02:00
Michael Kaufmann
c967e585b5 avoid duplicate entries in mysql-access-host setting
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2021-08-06 08:11:06 +02:00
Michael Kaufmann
73e364d4ba fix compare of old/new value of aliasdomain when editing a domain as customer to avoid unnecessary regeneration of configfiles
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2021-08-04 14:55:22 +02:00
Michael Kaufmann
eb49331b21 remove superfluous inserttask when editing domain as it will be called when there are actually changes to the domain earlier
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2021-08-04 14:06:32 +02:00
Michael Kaufmann
0a1a3e023f check dns for lets encrypt when adding/editing domains and via cron; fixes #971
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2021-08-04 13:44:13 +02:00
Michael Kaufmann
bef5cedcd0 only add link to customername when editing domain when panel.allow_domain_change_customer is false
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2021-08-02 16:58:34 +02:00
Stefan Weil
f8e2bc7bff Fix some typos in code (found by codespell) (#970)
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-08-01 19:00:33 +02:00
Stefan Weil
09038ac7aa Fix some typos (found by codespell) (#969)
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-07-31 09:51:54 +02:00
Michael Kaufmann
4c507232c7 add setting for a custom system group for all customer-users (required libnss-extrausers); fixes #953
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2021-07-30 12:16:37 +02:00
Michael Kaufmann
86939a64da add buypass testing/staging ACME endpoint; create CAA entries accordingly if activated; refs #968
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2021-07-29 21:24:43 +02:00
Jens Meißner
926ce427fc Add Buypass to the list of ACME providers. (#968) 2021-07-29 21:15:49 +02:00
Michael Kaufmann
53401eebfb integrity check should allow utf8_* charachter sets and not only 'utf8', thx to lod
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2021-07-29 21:04:46 +02:00
Michael Kaufmann
bef580929e Update README.md 2021-07-27 08:14:08 +02:00
Michael Kaufmann
c7b7c67ff4 normalize ipv6 addresses to avoid possible comparison problems; fixes #965
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2021-07-26 17:53:44 +02:00
Michael Kaufmann
ed42d4e3df try to fix github action...
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2021-07-24 20:31:34 +02:00
Michael Kaufmann
69a2ebce36 create user as froxlor would create it for mysql-8.0
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2021-07-24 20:29:56 +02:00
Michael Kaufmann
15f08739fa add github action workflow for mysql
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2021-07-24 20:17:42 +02:00
nachtgeist
571690c8c5 admin_customers/edit domain: make customer login name a link (#962) 2021-07-23 16:35:31 +02:00
rex2630
b2005d7f29 [WIP] Czech language (#870)
* Update czech.lng.php
2021-07-21 20:41:07 +02:00
Michael Kaufmann
4354598c64 fix unittests
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2021-07-21 10:21:58 +02:00
Michael Kaufmann
05d4bdc499 restore behaviour for unittests as 'create stdsubdomain' default was yes in the settings but no for direct API usage
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2021-07-21 10:10:18 +02:00
Michael Kaufmann
25c6a37df2 fix wrong variable-name in Customers.delete()
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2021-07-21 10:03:20 +02:00
Michael Kaufmann
41a470fe36 added option to disable creation of default subdomain; fixes #960
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2021-07-21 09:53:54 +02:00
Michael Kaufmann
8a4aa2a721 fix lng strings
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2021-07-20 23:45:57 +02:00
Michael Kaufmann
1d903770fc have more power over theme logo, custom theme logo and uploaded logo; refs #958
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2021-07-20 20:35:54 +02:00
Nicolas
934be5a238 Fix SOA-Record (#959) 2021-07-20 19:29:06 +02:00
Michael Kaufmann
5608f0407f correct heredoc indentation in AcmeSh for php-7.1; fixes #957
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2021-07-20 08:11:32 +02:00
Kai
ce9d8dad7f Feature-request #672 - database name prefixes + custom name (#956)
* Fix makeoption function call

* Update formfield.mysql_add.php

Added database name

* Update formfield.mysql_add.php

* Update formfield.mysql_add.php

* Update Mysqls.php

* Update DbManager.php

* Update formfield.mysql_add.php

* Update german.lng.php

* Update formfield.mysql_add.php

* Update Mysqls.php

* Added field database_name (Feature #672)

* Added Testfunction for customer choosed database name

* Fixed test for customer choosed database name
Added docs for param $name

* Fixed mysql api command add
Removed doubled code

* Set settings for customer choosed db name

* Fixed wrong excepted for database name

* Renamed parameter database_name to custom_suffix

* Changed testCustomerMysqlsList
Added testCustomerMysqlsDBNameDelete
2021-07-19 19:10:12 +02:00
Michael Kaufmann
d6fe263e68 Update issue templates 2021-07-19 07:20:46 +02:00
Michael Kaufmann
156846a845 set version to 0.10.27 for upcoming release
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2021-07-18 10:57:38 +02:00
Michael Kaufmann
abe00b79a7 Update README.md
add github actions build badge
2021-07-17 14:16:29 +02:00
Michael Kaufmann
26ab659c6a Ga testing (#955)
* switch from travis-ci to github actions

Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2021-07-17 14:14:35 +02:00
Michael Kaufmann
b0273c68d2 remove debian jessie config-templates (outdated); set debian stretch as deprecated; add debian bullseye config templates
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2021-07-16 12:15:03 +02:00
Michael Kaufmann
720cf9d74f Merge branch 'master' of github.com:Froxlor/Froxlor 2021-07-13 09:01:25 +02:00
Michael Kaufmann
35cd567c48 check whether there was an image upload at all
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2021-07-13 09:01:22 +02:00
Michael Kaufmann
2332d5be7b Merge pull request #949 from bashgeek/custom-css
Custom CSS File in default theme
2021-07-13 08:38:23 +02:00
Daniel
14cdc3801a Merge branch 'Froxlor-master' into custom-css 2021-07-13 10:31:35 +08:00
Daniel
d85efe480e conflict 2021-07-13 10:31:24 +08:00
Daniel
4f2ceaa3ab wip 2021-07-13 10:29:36 +08:00
Michael Kaufmann
3b6792d548 Merge branch 'master' of github.com:Froxlor/Froxlor 2021-07-12 17:29:25 +02:00
Michael Kaufmann
36de6e09d4 remove beta notice from let's encrypt settings
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2021-07-12 17:29:21 +02:00
Michael Kaufmann
300c410b18 Merge pull request #948 from bashgeek/logo-custom-login
Custom Logo(s) via Image-Upload in Panel Settings
2021-07-12 17:28:42 +02:00
Daniel Schmitz
282d7d9101 migrate old image + fix versioning 2021-07-09 17:07:50 +08:00
Daniel Schmitz
48f6601003 check mime types 2021-07-09 16:42:21 +08:00
Daniel
c4c4279171 Merge branch 'Froxlor:master' into logo-custom-login 2021-07-09 16:32:59 +08:00
Michael Kaufmann
b88f9c1f18 allow defining php_value/php_admin_value for session.save_path when using php-fpm; fixes #954
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2021-07-09 08:23:46 +02:00
Daniel Schmitz
0dac045dc9 wip 2021-07-07 14:11:54 +08:00
Daniel Schmitz
80b5f97367 wip 2021-07-07 14:10:21 +08:00
Daniel Schmitz
7a8b39fad0 wip 2021-07-07 14:00:55 +08:00
Daniel Schmitz
9f5978e875 german translations 2021-07-07 13:33:33 +08:00
Daniel
155fd757bf Merge branch 'Froxlor:master' into logo-custom-login 2021-07-07 13:30:22 +08:00
Daniel Schmitz
518ec202ab wip 2021-07-07 13:26:15 +08:00
Michael Kaufmann
871083d613 Merge pull request #952 from bashgeek/install-warnings
Installer Cleanup & Bug Fixes
2021-06-28 08:06:59 +02:00
Daniel Schmitz
79f0c8d28f wip 2021-06-28 11:01:22 +08:00
Daniel
dfbb4127e2 Merge branch 'Froxlor:master' into logo-custom-login 2021-06-28 10:39:02 +08:00
Daniel Schmitz
b9b2f00f30 wip 2021-06-28 10:37:23 +08:00
Daniel Schmitz
6923f9d926 Revert "wip"
This reverts commit cacbf7fec7.
2021-06-28 10:35:15 +08:00
Daniel Schmitz
cacbf7fec7 wip 2021-06-28 10:34:21 +08:00
Michael Kaufmann
73991e855c Support ZeroSSL via acme.sh (v3); refs #946
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2021-06-27 09:00:44 +02:00
Michael Kaufmann
0208812013 prefer custom zone entries over automatically created ones when system.dns_createmailentry is enabled, fixes #944
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2021-06-27 08:41:16 +02:00
Michael Kaufmann
48bd2561f7 Merge pull request #947 from Froxlor/dependabot/composer/phpmailer/phpmailer-6.5.0
Bump phpmailer/phpmailer from 6.4.1 to 6.5.0
2021-06-27 08:37:38 +02:00
Michael Kaufmann
af12c4102b Merge pull request #950 from kruegerj/patch-1
Update focal.xml
2021-06-24 07:57:00 +02:00
kruegerj
d2efa3ecc4 Update focal.xml 2021-06-24 03:16:12 +02:00
Daniel Schmitz
acb04566f5 wip 2021-06-23 11:28:07 +08:00
Daniel Schmitz
abb98ae960 wip 2021-06-23 11:21:33 +08:00
Daniel Schmitz
0d202a7e4d wip 2021-06-23 11:20:18 +08:00
Daniel Schmitz
c69ef20b17 wip 2021-06-23 10:58:52 +08:00
dependabot[bot]
5872d0682a Bump phpmailer/phpmailer from 6.4.1 to 6.5.0
Bumps [phpmailer/phpmailer](https://github.com/PHPMailer/PHPMailer) from 6.4.1 to 6.5.0.
- [Release notes](https://github.com/PHPMailer/PHPMailer/releases)
- [Changelog](https://github.com/PHPMailer/PHPMailer/blob/master/changelog.md)
- [Commits](https://github.com/PHPMailer/PHPMailer/compare/v6.4.1...v6.5.0)

---
updated-dependencies:
- dependency-name: phpmailer/phpmailer
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-06-22 15:20:44 +00:00
Michael Kaufmann
c4fa8feb8c update dev tools
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2021-06-17 08:25:43 +02:00
Michael Kaufmann
61a50cc657 add setting for default serveralias value for new domains, refs #944
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2021-06-16 15:10:52 +02:00
Michael Kaufmann
3df3261ac0 switch from freenode irc network to libera.chat irc network as freenode is dead
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2021-06-16 11:57:38 +02:00
Michael Kaufmann
f2636e14f0 Merge pull request #945 from MisterDuval/patch-1
Deny all robots
2021-06-01 15:06:31 +02:00
MisterDuval
a23f22f561 Deny all robots
Search engine and all Robots should be denied to the whole Froxlor directory. This file will help!
2021-06-01 14:45:47 +02:00
Michael Kaufmann
8cf3f4ee24 set version to 0.10.26 for upcoming maintenance releasae
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2021-05-14 08:21:53 +02:00
Michael Kaufmann
e83f7634f8 Merge pull request #938 from Froxlor/dependabot/composer/phpmailer/phpmailer-6.4.1
Bump phpmailer/phpmailer from 6.2.0 to 6.4.1
2021-05-04 19:57:10 +02:00
dependabot[bot]
6eb6595a46 Bump phpmailer/phpmailer from 6.2.0 to 6.4.1
Bumps [phpmailer/phpmailer](https://github.com/PHPMailer/PHPMailer) from 6.2.0 to 6.4.1.
- [Release notes](https://github.com/PHPMailer/PHPMailer/releases)
- [Changelog](https://github.com/PHPMailer/PHPMailer/blob/master/changelog.md)
- [Commits](https://github.com/PHPMailer/PHPMailer/compare/v6.2.0...v6.4.1)

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-04 17:43:20 +00:00
Michael Kaufmann
bd48fb7328 catch exception of password-complexity check when changing account password; fixes #935
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2021-04-14 08:59:44 +02:00
Michael Kaufmann
769525bb56 do not touch/chown error/access log if log is disabled, fixes #934
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2021-04-12 09:42:25 +02:00
Michael Kaufmann
9195fb3c98 additionally sort by length of username for libnss-extrausers passwd file to have the main user as first in result in any case; fixes #933
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2021-04-12 09:37:36 +02:00
Michael Kaufmann
82922f7aea add new settings for legal-notes; terms-of-use and privacy-policy; fixes #930
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2021-03-24 14:36:48 +01:00
Michael Kaufmann
db1a39b6d9 match composePhpOptions() definition everywhere
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2021-03-24 13:49:58 +01:00
Michael Kaufmann
7fbbc2ea0b add vhost replacer {FPMSOCKET} for custom vhost configs; fixes #931
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2021-03-24 13:46:24 +01:00
Michael Kaufmann
91d4432108 check rr against possible existing CNAME entries, fixes #927
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2021-03-15 17:33:30 +01:00
Michael Kaufmann
c8914312aa Refactoring columns from large table to avoid '1118 Row size too large' error
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2021-03-11 09:45:52 +01:00
Michael Kaufmann
3fd89c48e8 set version to 0.10.25 for upcoming maintenance release
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2021-03-05 20:27:55 +01:00
Michael Kaufmann
eceb144a77 also trigger removal of domain in powerdns database if used; refs #923
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2021-03-04 12:09:03 +01:00
Michael Kaufmann
1d9651b18a trgger acme.sh removal for domains if customers is being deleted; fixes #923
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2021-03-04 12:07:20 +01:00
Michael Kaufmann
49db4e60cb escape passwords for email content (new email-account, new ftp-account and new database); fixes #905
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2021-03-03 11:25:58 +01:00
Michael Kaufmann
53e8ccbccb added 'deactivated' parameter to EmailAccounts.update() so admins can disable individual email-accounts, will be overridden if customer is deactivatd and re-enabled; fixes #921
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2021-03-03 10:59:16 +01:00
Michael Kaufmann
6d8fc215f1 add description field to panel_domains and mail_virtual table, API parameter 'description' for Domains.add()/Domains.update() and Email.add()/Emails.update(); fixes #910
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2021-03-03 10:25:42 +01:00
Michael Kaufmann
f94c303cb3 add API parameter 'show_usages' for Customers.listing() and Customers.get() to return number of domains, and diskspaced used split into webspace_used, mailspace_used and dbspace_used; fixes #912
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2021-03-03 09:50:30 +01:00
Michael Kaufmann
2be1873354 fix frontend issue with displaying correct options in domain listing when using php8, thx to cscholz
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2021-02-24 19:56:26 +01:00
Michael Kaufmann
d1d36c32fe Merge pull request #920 from RipClaw2971/patch-1
lowercase domain names for ssl-certificate file check (fallback)
2021-02-24 13:07:26 +01:00
RipClaw2971
3b3527348f Update AcmeSh.php
Renewed certificates are not recognized if the domain is in upper/lower case.
2021-02-24 13:00:31 +01:00
Michael Kaufmann
036d5f0713 Merge pull request #919 from nachtgeist/soa
dns: make mail address of SOA records configurable
2021-02-21 18:27:57 +01:00
Daniel Reichelt
a1b8807b0f dns: make mail address of SOA records configurable 2021-02-21 13:00:30 +01:00
Michael Kaufmann
356a087b6a Merge pull request #918 from nachtgeist/pns
dns: check NS entry to be used as primary NS
2021-02-21 09:14:37 +01:00
Michael Kaufmann
0a77fd7150 Merge pull request #917 from nachtgeist/pw
system: validatePassword(): also quote the delimiter ('/')
2021-02-21 09:13:02 +01:00
Daniel Reichelt
67d67a287f system: validatePassword(): also quote the delimiter ('/')
Quoting the default regex delimiter is required for the password
complexity check to work if '/' had been specified as special character
in Froxlor's account settings.
2021-02-21 02:33:46 +01:00
Daniel Reichelt
1f792466bf dns: check NS entry to be used as primary NS
Don't just blindly use the first custom NS entry for SOA, actually check
if it pertains to the domain in question
2021-02-21 02:33:23 +01:00
Michael Kaufmann
5a6343b47c php8 compatibility, fixes #916
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2021-02-16 12:38:01 +01:00
Michael Kaufmann
841c529107 fix check for required firstname/name/company in Customers.update(), fixes #915
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2021-02-15 23:26:18 +01:00
Michael Kaufmann
41c3f21f0b list only phpenabled and http-enabled domains in php-configuration overview; fixes #911
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2021-02-11 16:16:04 +01:00
Michael Kaufmann
b8c0688ba0 added possibility to use 'in' sql-operation in sql_where parameter for Api-calls; php-8 compat fix in admin_traffic
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2021-02-11 12:09:42 +01:00
Michael Kaufmann
24e02e99fb set version to 0.10.24 for upcoming maintenance release
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2021-02-05 15:46:08 +01:00
Michael Kaufmann
97bb7b6227 add filecontent to allowed form-fields to not be escaped
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2021-02-05 15:44:49 +01:00
Michael Kaufmann
5ceddc8c65 remove not (yet) used cli script
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2021-02-05 15:42:38 +01:00
Michael Kaufmann
3a17d03796 add option to specify (optional) fileextension/suffix for generated dkim-private keys; fixes #907
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2021-01-20 12:12:41 +01:00
Michael Kaufmann
57ae195930 for percentage calculation always use bytes so we don't compare KiB with GiB or similar
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2021-01-18 21:22:29 +01:00
Michael Kaufmann
9b86d576fa do not display usages on dashboard in fixed size-units but dynamically adjusted
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2021-01-18 20:49:55 +01:00
Michael Kaufmann
02a12eda13 add missing field 'include_default_vhostconf' to settings table for new installations
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2021-01-16 10:50:49 +01:00
Michael Kaufmann
a31da97d66 exclude some formfields from xss-cleaning as it could alter the wanted content
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2021-01-13 10:14:51 +01:00
Michael Kaufmann
9f13aa9a12 only pass binding variable for prepared sql statement if variable exists
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2021-01-13 08:52:00 +01:00
Michael Kaufmann
2841051649 correctly read in domain's ssl-ips for CAA entries if enabled, fixes #903
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2021-01-12 21:08:10 +01:00
Michael Kaufmann
acfbf55d15 Check return of validateFormField() just for non-falsey values and not expect boolean data-type; fixes #904
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2021-01-12 19:17:38 +01:00
Michael Kaufmann
5848df28fd Merge pull request #902 from bashgeek/master
Put in trailing slash to /awstats/ location in nginx config
2021-01-12 12:25:22 +01:00
Michael Kaufmann
21925f48c3 set minimum required php-version to 7.1 and recommended php-version to 7.4
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2021-01-06 13:36:35 +01:00
Daniel
17a64c58c2 Put in a trailing "/" for /awstats/ location 2020-12-31 16:01:42 +08:00
Daniel
0ca38cff31 Merge pull request #1 from Froxlor/master
up
2020-12-31 15:59:07 +08:00
Michael Kaufmann
5efc1849b4 fix hide-incompatible-settings feature
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2020-12-30 17:16:15 +01:00
Michael Kaufmann
f213d666e2 fix typo
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2020-12-30 16:46:01 +01:00
Michael Kaufmann
78495b6487 update link to perl-fastcgi wiki on nginx.com; added setting to hide incompatible settings (depending on webserver)
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2020-12-30 16:41:26 +01:00
Michael Kaufmann
ab1c76e104 set version to 0.10.23.1 for bugfix release
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2020-12-28 19:48:31 +01:00
Michael Kaufmann
a671223823 corrected too few arguments to function Froxlor\Cron\Traffic\TrafficCron::callAwstatsGetTraffic(); fixes #901
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2020-12-28 19:43:40 +01:00
Michael Kaufmann
3a99e10296 set version to 0.10.23 for upcoming maintenance release
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2020-12-28 11:09:56 +01:00
Michael Kaufmann
38031aaff9 add missing return-code in DomainZones.add which messes up the error handling when using API
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2020-12-23 13:42:36 +01:00
Michael Kaufmann
65773bce57 automatically set php-fpm default config to php-version that is used for the installation to avoid confusion
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2020-12-21 17:15:02 +01:00
Michael Kaufmann
ee5de56a94 also validate existence of ssl-key file in vhost generation
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2020-12-10 09:47:58 +01:00
Michael Kaufmann
aba97df9b2 added date-range parameters for Traffic.listing(), fixes #878
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2020-12-10 09:44:43 +01:00
Michael Kaufmann
79e670f797 trigger rebuild of cronjobs also if customer email is changed, fixes #896
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2020-12-10 09:41:35 +01:00
Michael Kaufmann
8670cb6742 Merge pull request #900 from heptalium/master
Protect only private keys and leave certificates world readable.
2020-12-10 09:29:51 +01:00
Michael Kaufmann
bde87950a5 fix optional parameters of phpErrHandler
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2020-11-27 14:07:01 +01:00
Jens Meißner
aa1d2ab01d Set certificate files explicitly world readable. 2020-11-24 17:38:49 +01:00
Jens Meißner
2a770a93b1 Protect only private keys and leave certificates world readable. 2020-11-23 20:32:24 +01:00
Michael Kaufmann
5b85a1c183 use Validate::validateEmail() also for PHPMailer::ValidateAddress() call
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2020-11-17 17:31:49 +01:00
Michael Kaufmann
caf8893558 use Validate::validateEmail() instead of pure filter_var
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2020-11-17 17:18:23 +01:00
Michael Kaufmann
a280461cf6 add unicode flag for filter-validate-email (>=php7.1)
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2020-11-17 10:39:11 +01:00
Michael Kaufmann
455c655580 corrected validation of idn-tld's, fixes #899
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2020-11-14 11:59:46 +01:00
Michael Kaufmann
ecd707424f change example of dhparams.pem folder so it does not conflict with default ssl-certificates-folder which gets purged by froxlor regulary
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2020-11-13 13:01:19 +01:00
Michael Kaufmann
60fe330de1 Merge pull request #875 from negrusti/patch-2
Data integrity - remove default values from some columns
2020-11-12 09:01:03 +01:00
Michael Kaufmann
cdb871b82b fix delete_userfiles flag not being passed via webinterface email-address-overview
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2020-11-12 08:54:52 +01:00
Michael Kaufmann
35c4e3d1b9 set version to 0.10.22 for upcoming maintenance release
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2020-11-06 14:47:20 +01:00
Michael Kaufmann
b3f82f0981 remove duplicate AXFR records as nameserver get added automatically in case they have also been added to the axfr list
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2020-11-01 21:00:27 +01:00
Michael Kaufmann
b1b68364be do not allow setting www as CNAME record if domain has automatic www-Alias enabled, fixes #895
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2020-10-31 16:16:05 +01:00
Michael Kaufmann
ea76ce8fcc secure requests; refs #893
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2020-10-31 15:57:59 +01:00
Michael Kaufmann
16eca628dd add Unittest for traffic-filtering by customer-name, refs #894
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2020-10-31 15:53:07 +01:00
Michael Kaufmann
6bf5eccc24 update dependencies and add voku\AntiXSS
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2020-10-31 15:50:16 +01:00
Michael Kaufmann
63d00cd453 forgot to add the language strings to the commit for avoid deletion of (super)admin
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2020-10-31 15:48:01 +01:00
Michael Kaufmann
c79cba26f3 avoid deletion of (super)admin with id 1 due to fallbacks in the code using it; fixes #886
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2020-10-31 10:02:11 +01:00
Michael Kaufmann
36eb3cc1aa [domainbulk] remove reqiurement for customer-select in webinterface as it is an API-parameter
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2020-10-31 09:45:50 +01:00
Michael Kaufmann
15a13a7783 append file-extension for dkim-private-keys as external tools may require it (rspamd e.g.); thx to rseffner for finding this
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2020-10-20 15:28:51 +02:00
Michael Kaufmann
816874872d make given documentroot of domain relative to customerroot of no absolute path if given; fixes #892
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2020-10-14 16:58:19 +02:00
Michael Kaufmann
0e8449f28d Merge pull request #891 from andlinger/patch-1
Fixed typo in contribution document
2020-10-14 14:26:48 +02:00
Michael Kaufmann
3dcbbb9e7b do not set description to empty value if not passed as parameter as it is optionally; fixes #890
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2020-10-14 14:25:23 +02:00
David Andlinger
5ab9e6865d fixed typo 2020-10-14 14:17:37 +02:00
Michael Kaufmann
3a47b2050e fix awstats/webalizer directory protection when using nginx; fixes #888
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2020-10-13 20:18:44 +02:00
Michael Kaufmann
907c475361 create quotatallies entry if it not exists, fixes #885; correction in api-doc for Ftps.update ftp_password parameter, fixes #889
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2020-10-13 19:52:29 +02:00
Michael Kaufmann
0dfb4bdcdb list dns entries after add/delete action handling so the table of entries always shows the current state withouth reloading the page; fixes #887
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2020-10-12 09:50:48 +02:00
Michael Kaufmann
a5dc7b93a2 unify customerid/loginname api-parameter-descriptions; fixes #883
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2020-10-05 19:59:02 +02:00
Michael Kaufmann
244d2823a6 Merge pull request #882 from heavygale/patch-3
Fix for notices "Trying to access array offset on value of type bool" in ReportsCron.php
2020-10-03 13:10:40 +02:00
heavygale
2f0251bb19 Fix for "Trying to access array offset on value of type bool"
Proper check for success of query before accessing the result array. This notices occures if there's no custom mail-template for trafficmaxpercent_subject or trafficmaxpercent_mailbody for the required language.
2020-10-03 12:55:14 +02:00
Michael Kaufmann
a37d795ff3 set version to 0.10.21 for maintenance release
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2020-10-02 18:01:53 +02:00
Michael Kaufmann
d9331cca61 check for fallback of ssl-certificate in ips/ports correctly of lets encrypt is used
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2020-09-18 11:49:26 +02:00
Michael Kaufmann
f169129e27 remove obsolete/unused table
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2020-09-07 21:53:18 +02:00
Michael Kaufmann
746548492b output traffic values correctly when not using bcmath and kind of fix wrong unit display on mouseover, fixes #425
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2020-09-07 21:51:24 +02:00
Michael Kaufmann
4ad8b62576 for ssl-fallback-check not only check for empty value but also for existence of certificate, thx to df8oe
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2020-09-06 14:12:25 +02:00
Michael Kaufmann
1eed3d1166 remove underscore from dkim-selector when creating the certificates too, refs #619
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2020-08-13 09:04:58 +02:00
Michael Kaufmann
6a32720c9a remove underscore from dkim-selector in the output certificate files too as (old) dkim-filter read the selector from this filename; refs #619
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2020-08-09 10:54:22 +02:00
Michael Kaufmann
e389ae4bf8 setting version to 0.10.20 for upcoming maintenance release
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2020-08-07 19:43:16 +02:00
Michael Kaufmann
970ecb469e use overridden limit_extensions and idle_timeout in vhost config when using fpm and not mod_proxy
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2020-08-07 17:16:56 +02:00
Grigory Morozov
92b6914610 Update froxlor.sql
Data integrity - under no circumstances the empty string is a valid value for these fields
2020-08-07 21:58:06 +07:00
Michael Kaufmann
7e57352bc0 remove underscore from dkim-selector, refs #619
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2020-07-30 07:59:22 +02:00
Michael Kaufmann
e3d42a3f62 show current count of results besides total count in listings, fixes #869
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2020-07-29 08:46:50 +02:00
Michael Kaufmann
456a287621 fix missing query-parameters for IpsAndPorts.listing() when using sql_search
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2020-07-29 08:36:55 +02:00
Michael Kaufmann
eff630da8d unset any limit as we do not have pagination when showing search-results, refs #869
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2020-07-29 08:28:04 +02:00
Michael Kaufmann
aa45a0302e fix permanent rebuilding of vhost configs, refs 0af655f106
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2020-07-29 08:23:49 +02:00
Michael Kaufmann
aa14487995 update jquery library, fixes #872
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2020-07-28 13:28:47 +02:00
Michael Kaufmann
10b52486b5 ups, forgot to save the file so it's missing a critical return :P
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2020-07-25 17:28:46 +02:00
Michael Kaufmann
0af655f106 fix permanent rebuilding of vhost configs due to always-true renew check of let's encrypt certificates
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2020-07-25 17:21:52 +02:00
Michael Kaufmann
665c87cca7 fix index on longtext field which is not working due to unknown length; fixes #868
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2020-07-25 17:21:13 +02:00
Michael Kaufmann
1c50838d37 Merge pull request #871 from tczaude/master
issue 868 : Add new performance indexes
2020-07-24 20:37:26 +02:00
tczaude
ac5bc78e12 fix showUpdateStep 2020-07-24 19:32:04 +02:00
tczaude
a5e6ef674f issue 868 : Add new performerce indexes 2020-07-24 14:35:55 +02:00
Michael Kaufmann
03bc94e69c insert task to sync certificates for all cases (issue and renew)
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2020-07-07 12:10:40 +02:00
Michael Kaufmann
37176c94a1 set version to 0.10.19 for upcoming release
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2020-07-03 14:12:48 +02:00
Michael Kaufmann
a141c83ad4 do not call strtotime on the validTo_time_t key of cert_data as it already is an UNIX-timestamp, refs #865
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2020-06-23 20:35:50 +02:00
Michael Kaufmann
7c3ff95d22 check for possible CNAME overrides of A/AAAA record in dns-editor, fixes #864
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2020-06-23 09:39:00 +02:00
Michael Kaufmann
d653f6842f check for acme.sh upgrade on every run; fix not running --install-cronjob without having an issue command
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2020-06-21 19:50:46 +02:00
Michael Kaufmann
35a69fbfe0 add missing parmeter customerid for SubDomains.delete() which is required when called as admin; fixes #862
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2020-06-18 13:05:17 +02:00
Michael Kaufmann
e733701459 trigger removal cronjob of lets encrypt certificate via acme.sh also when domain update removes letsencrypt flag from domain
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2020-06-17 14:09:26 +02:00
Michael Kaufmann
70677fced2 fix double-adding of _ecc to certificate folder when deleting let's encrypt certificate
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2020-06-17 12:08:54 +02:00
Michael Kaufmann
daa223ed42 return full domain object on Domains.update() call, fixes #861
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2020-06-17 09:29:02 +02:00
Michael Kaufmann
0398f4cdba set version to 0.10.18 for upcoming release
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2020-06-12 15:17:09 +02:00
Michael Kaufmann
1a0953e77e fix typo in response status message, fixes #858
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2020-06-08 11:42:44 +02:00
Michael Kaufmann
490704f8e1 Heredoc/nowdoc with an indented closing marker is not supported in PHP 7.2 or earlier.
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2020-06-06 20:57:24 +02:00
Michael Kaufmann
2748f1b633 also display error when domain does not resolv to any A or AAAA record in lets-encrypt-dns-validation
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2020-06-06 15:37:06 +02:00
Michael Kaufmann
8e60c6b201 update api documentation for Ftps.update(), fixes #857
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2020-06-05 16:23:41 +02:00
Michael Kaufmann
d4716b2376 correct documentation for Customers.add(), fixes #856
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2020-06-05 15:33:49 +02:00
Michael Kaufmann
2c98fc4c2d fix wrong certificate folder for fallback ceck (ecc/non-ecc)
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2020-06-04 07:42:13 +02:00
Michael Kaufmann
65e1f633ef Merge pull request #855 from daxara/detect_distr
Auto detection in CLI & checks
2020-05-31 20:59:26 +02:00
Ante de Baas
ed4dbba278 also perform checks in Install class 2020-05-31 20:46:27 +02:00
Ante de Baas
1a6082ca91 complete if statement 2020-05-31 20:36:52 +02:00
Ante de Baas
da1d94149a saet defaults and do some checks 2020-05-31 20:34:47 +02:00
Ante de Baas
e7cfceb65d add comment 2020-05-31 20:18:37 +02:00
Ante de Baas
1f48ca4711 autodeterct distribution in CLI 2020-05-31 20:10:07 +02:00
Michael Kaufmann
fe0fb8dd5f fix non-static method called statically in \Froxlor\FileDir
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2020-05-31 16:38:53 +02:00
Michael Kaufmann
4a5ab7d95d Merge pull request #854 from daxara/detect_distr
fix bugs in dist detection
2020-05-31 16:36:52 +02:00
Ante de Baas
0d44adf265 fix bugs is dist detection 2020-05-31 16:00:50 +02:00
Michael Kaufmann
0b63b4e110 Merge pull request #853 from daxara/centos7
[centos7] proftp requires epel, awstats needs install and awstats cron moved
2020-05-31 15:02:57 +02:00
Michael Kaufmann
ba7e9688c5 Merge pull request #852 from daxara/centos8
Centos8 config updated
2020-05-31 15:02:31 +02:00
Ante de Baas
443ae1df68 proftp requires epel, awstats needs install and awstats cron moved 2020-05-31 14:57:07 +02:00
Ante de Baas
b59aa6f140 undo dnf -y 2020-05-31 14:28:37 +02:00
Ante de Baas
4e9df61fef awstats cron is moved to cron.hourly 2020-05-31 13:15:55 +02:00
Ante de Baas
b350815aa0 install awstats and requirements 2020-05-31 13:11:58 +02:00
Ante de Baas
b672c722b9 no user interaction on package installation 2020-05-31 13:05:52 +02:00
Ante de Baas
db60606cfa proftpd requires epel 2020-05-31 12:52:31 +02:00
Ante de Baas
2524491883 centos8 uses 'dandified yum' 2020-05-31 12:47:28 +02:00
Ante de Baas
de061e7e36 add missing apacheconf_htpasswddir dir 2020-05-31 12:46:33 +02:00
Michael Kaufmann
9ecd182a91 Merge pull request #851 from daxara/master
rename rhel7 to centos7 for consistency
2020-05-31 11:26:12 +02:00
Ante de Baas
a7934bcb7b rename rhel7 to centos7 for consistancy 2020-05-31 11:17:43 +02:00
Michael Kaufmann
9dc2c09da7 Merge pull request #850 from daxara/rhel8
Add CentOS 8 configuration-templates
2020-05-31 09:30:51 +02:00
Michael Kaufmann
b23e4a4d85 Merge pull request #849 from daxara/detect_distr
Detect distribution upon installation and set setting-defaults (if any) for that distribution
2020-05-31 09:29:42 +02:00
Michael Kaufmann
394ec4cd4a fix ecc certificate paths
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2020-05-31 09:13:22 +02:00
Ante de Baas
6ccfb7efbb remove old code 2020-05-30 10:10:57 +02:00
Ante de Baas
1454d8d40f get defaults from configparser 2020-05-30 10:08:05 +02:00
Ante de Baas
0fde1ce7e9 remove dev comment 2020-05-30 09:15:15 +02:00
Ante de Baas
86155f7a9c use Distribution in german language 2020-05-30 09:11:43 +02:00
Ante de Baas
60578a5d31 rename to CentOS because its most likely to be used 2020-05-29 17:46:38 +02:00
Ante de Baas
7fcacb4637 rename to centos because its most likey to be used 2020-05-29 17:45:37 +02:00
Ante de Baas
fb35fb9a3a read distribution from xml and selection via selectbox 2020-05-29 17:33:48 +02:00
Ante de Baas
6128954231 rename propery to property 2020-05-29 15:54:37 +02:00
Ante de Baas
f4d4490d08 change property tagnames 2020-05-29 15:45:04 +02:00
Ante de Baas
27f0c4eb53 remove distribution names from language files 2020-05-29 15:42:38 +02:00
Ante de Baas
cb1df3a7e0 show failue as nice red message 2020-05-29 15:29:53 +02:00
Ante de Baas
a572ac3914 add rhel8 config file 2020-05-29 15:10:06 +02:00
Ante de Baas
498ff15e98 add redhat defaults 2020-05-29 14:59:48 +02:00
Ante de Baas
022ed1a9a8 add setting defaults per distribution when given 2020-05-29 14:59:40 +02:00
Ante de Baas
814339cc73 Merge branch 'master' into detect_distr 2020-05-29 13:54:36 +02:00
Ante de Baas
0bb48a3cdf fix nginx capitalisation. 2020-05-29 13:45:46 +02:00
Ante de Baas
67d74406bd add os distribution detection 2020-05-29 13:36:31 +02:00
Michael Kaufmann
d73d8da2fd read certificate data folder from acme.sh.env file, fixes #846
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2020-05-28 20:08:49 +02:00
Michael Kaufmann
3c7bdcb5e0 Merge pull request #847 from Froxlor/dependabot/composer/phpmailer/phpmailer-6.1.6
Bump phpmailer/phpmailer from 6.1.4 to 6.1.6
2020-05-28 10:47:26 +02:00
dependabot[bot]
c6ac73f74f Bump phpmailer/phpmailer from 6.1.4 to 6.1.6
Bumps [phpmailer/phpmailer](https://github.com/PHPMailer/PHPMailer) from 6.1.4 to 6.1.6.
- [Release notes](https://github.com/PHPMailer/PHPMailer/releases)
- [Changelog](https://github.com/PHPMailer/PHPMailer/blob/master/changelog.md)
- [Commits](https://github.com/PHPMailer/PHPMailer/compare/v6.1.4...v6.1.6)

Signed-off-by: dependabot[bot] <support@github.com>
2020-05-27 17:01:04 +00:00
Michael Kaufmann
fdcb294244 Merge pull request #844 from daxara/dns_rhel7
Named DNS for RHEL7
2020-05-25 22:02:40 +02:00
Ante de Baas
8898c7c165 add named dns config 2020-05-25 21:38:58 +02:00
Michael Kaufmann
d4c0acb353 Merge pull request #843 from rubo77/usage
show disk-usage also on unlimited accounts
2020-05-25 09:28:37 +02:00
Ruben Barkow-Kuder
9ea32b69cb show disk-usage also on unlimited accounts
Signed-off-by: Ruben Barkow-Kuder <github@r.z11.de>
2020-05-25 03:14:38 +02:00
Michael Kaufmann
0524c70d2b add config-templates for ubuntu focal (partly tested only for now)
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2020-05-24 12:16:17 +02:00
Michael Kaufmann
6ca7920147 fix missing language files in config-services cli script; set ubuntu xenial deprecated, remove Ubuntu trusty; fix a2dismod command in buster config-template as php7.3 is default
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2020-05-24 11:55:20 +02:00
Michael Kaufmann
65b2e4efa7 do not check for mariadb.sys user on mariadb-10.4 when testing with travis
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2020-05-23 21:17:43 +02:00
Michael Kaufmann
7000fd2c30 Merge pull request #841 from rubo77/patch-1
Don't suggest php5 during update as default
2020-05-23 21:16:39 +02:00
Ruben Barkow-Kuder
3b1ff03b33 Don't suggest php5 during update as default 2020-05-23 20:12:27 +02:00
Michael Kaufmann
ffa9205f95 fix sql query to remove duplicates before setting unique key in updater, fixes #840
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2020-05-18 20:48:56 +02:00
Michael Kaufmann
bc73ed0c75 adjust tls default value to tlsv1.2; refs #839
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2020-05-18 20:48:04 +02:00
Michael Kaufmann
17fd350d33 Merge pull request #839 from negrusti/patch-2
TLSv1 is deprecated
2020-05-18 20:07:30 +02:00
Grigory Morozov
c2e57dfd60 TLSv1 is deprecated 2020-05-18 05:18:42 +07:00
Michael Kaufmann
50f2047da3 set version to 0.10.17 for upcoming maintenance release
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2020-05-15 20:35:25 +02:00
Michael Kaufmann
ecb9470b65 fix including of language-strings in reports-cron, fixes #836
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2020-05-15 15:16:24 +02:00
Michael Kaufmann
6d90b5ba80 remove leftover GROUP BY from testing
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2020-05-15 09:56:24 +02:00
Michael Kaufmann
eb3590dc34 add unique-key domainid to domain_ssl_settings table
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2020-05-15 09:49:53 +02:00
Michael Kaufmann
bddf9b496c enable internal api-call to bypass customer_hide_options check in certain situations where it is needed, fixes #803
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2020-05-15 09:35:20 +02:00
Michael Kaufmann
edc702dafa check for required min version of php every time (frontend and cron), fixes #833
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2020-05-08 10:03:01 +02:00
Michael Kaufmann
85dfc1030a Merge pull request #832 from RipClaw2971/bugfix
Certificate file cannot be read to database
2020-05-04 16:11:42 +02:00
Andreas Grundler
c0dd432916 Certificate file cannot be read to database if the domain contains capital letters. 2020-05-04 12:08:20 +02:00
Michael Kaufmann
b3db4dd887 set version to 0.10.16 for upcoming release
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2020-05-01 16:27:23 +02:00
Michael Kaufmann
14413a3e8d try to fix travis irc notifications again
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2020-04-30 20:10:52 +02:00
Michael Kaufmann
a02a081c6b try to fix travis irc notifications
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2020-04-30 20:03:54 +02:00
Michael Kaufmann
43070e4808 remove possible trailing slash of apache DocumentRoot diretives as sugggested by the httpd-docs, thx to jonbert
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2020-04-30 19:49:20 +02:00
Michael Kaufmann
98c636c282 let send-to-alternative-email be optional if no address is given instead of displaying error that the email address is invalid; fixes #829
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2020-04-30 13:03:19 +02:00
Michael Kaufmann
8dace6eca5 remove special characters from name when generating extrausers file
add froxlor hostname to 2fa-qrcode; refs #814

Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2020-04-28 07:59:37 +02:00
Michael Kaufmann
78fc4f84b2 add optional dns validation for let's encrypt activated domains; fixes #817
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2020-04-14 10:28:33 +02:00
Michael Kaufmann
9018404faa Double check whether installation of acme.sh worked when not installed yet and do not continue if not; fixes #823
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2020-04-14 08:10:36 +02:00
Michael Kaufmann
8bdd843bd9 fix renew of froxlors own letsencrypt certificate; fix only variables should be passed by reference in BackupCron; fix possible notice or double inclusion of language file in ReportsCron
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2020-04-08 09:07:48 +02:00
Michael Kaufmann
0d35f5cb29 restructure acmesh implementation and let acme.sh take care of renewing the certificates itself; fixes #792, fixes #816
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2020-04-04 18:04:39 +02:00
Michael Kaufmann
6815c1c20b Merge pull request #821 from chrschn/master
Fix renewal of ECC/ECDSA certificates.
2020-03-29 23:52:34 +02:00
Christian Schneider
048e6c13ae Fix renewal of ECC/ECDSA certificates.
The ACME v2 implementation uses separate directoies for ECC and on-ECC
certificates. The renew command for a domain checks if an ECC directory
exists (having a "_ecc" suffix) and refuses the command unless the
"--ecc" flag was specified.

Confusingly, this flag is only required to *renew* an ECC certificate,
but not to issue it.

This fixes https://github.com/Froxlor/Froxlor/issues/820.
2020-03-29 22:36:26 +02:00
Michael Kaufmann
aedb829a74 Merge pull request #819 from HBerni/hberni-p0002
fixed parsing due to changes in dovecots default mail_log_prefix
2020-03-21 17:36:00 +01:00
HBerni
4745581720 fixed parsing due to changes in dovecots default mail_log_prefix
regex supports old and new default format now
(see https://wiki2.dovecot.org/Upgrading/2.3)
2020-03-21 16:39:01 +01:00
Michael Kaufmann
489ccbe07a fix removing ip address if ip is set as system-ipaddress but there are other entries of that ip with a different port
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2020-03-12 07:01:26 +01:00
Michael Kaufmann
a46e7a3bc4 set correct umask to create user config in installation
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2020-03-10 07:48:35 +01:00
Michael Kaufmann
a4431e25d3 remove ssl-certificates connected to domains that are being deleted when deleting a customer; fixes #818
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2020-03-10 07:36:22 +01:00
Michael Kaufmann
1fe9f1e9d6 fix language strings for cron cmdline setting and fallback to php binary if no setting is found
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2020-03-08 10:30:33 +01:00
Michael Kaufmann
13767df562 set version to 0.10.15 for bugfix release
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2020-03-08 07:39:39 +01:00
Michael Kaufmann
02c5f80854 correct chmod value for userdata.inc.php file to be written on installation; fixes #815
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2020-03-08 07:35:19 +01:00
Michael Kaufmann
d7550ae58a fix deactivated check in api
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2020-03-06 22:10:01 +01:00
Michael Kaufmann
cf2c7fa31c deny api access to deactivated users with valid api-key
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2020-03-06 22:03:41 +01:00
Michael Kaufmann
32b6285589 set version to 0.10.14 for upcoming release
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2020-03-06 20:47:20 +01:00
Michael Kaufmann
7e361274c5 forgot one escapeshellarg() and enhanced security on userdata.inc.php creation when installing
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2020-03-06 20:44:17 +01:00
Michael Kaufmann
62ce21c9ec secure shell-execution of mysqldump on installation if given database-name exists
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2020-03-04 19:35:57 +01:00
Michael Kaufmann
6b09720ef8 use unpredictable tmpfile-name in installation if lib/userdata.inc.php cannot be written due to permission
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2020-03-04 19:34:18 +01:00
Michael Kaufmann
8807ae7dad allow private ip ranges in ips-and-ports as some configurations require that; fixes #802
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2020-03-02 09:51:44 +01:00
Michael Kaufmann
5f3f208534 remove superfluous comma in sql query which causes invalid sql
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2020-03-01 09:16:47 +01:00
Michael Kaufmann
f11ceacf89 store ace-string of domain besides idn-converted string to have correct sorting in the frontend; fixes #809
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2020-02-29 09:50:29 +01:00
Michael Kaufmann
26e43077c2 make customer firstname,name,company and customer-no available for all templates; fixes #808
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2020-02-29 08:16:55 +01:00
Michael Kaufmann
d6c8b92523 add Froxlor.integrityCheck() API call to externally run integrity/consistency check, fixes #801
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2020-02-15 07:30:56 +01:00
Michael Kaufmann
03450dcfa2 fix listing of customer email addresses if 'domain' section is hidden via settings, fixes #803
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2020-02-15 07:25:23 +01:00
Michael Kaufmann
f39aab6f32 disable sslsessiontickets-option in domain-add/edit if globally disabled in the settings
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2020-02-15 07:11:28 +01:00
Michael Kaufmann
7f999302fa do not require enabled vhost-container for froxlor-vhost to change sslsessiontickets-setting
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2020-02-14 19:26:06 +01:00
Michael Kaufmann
8294985588 require set password complexity for admins too when resetting password; display correct error message if password complexity is not satisfied
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2020-02-08 10:03:41 +01:00
Michael Kaufmann
a7653551b2 set version to 0.10.13 for upcoming maintenance release
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2020-02-07 16:37:06 +01:00
Michael Kaufmann
734c02e33f update php-fpm defaults; update paths for current stable php-7.3; read froxlor default php.ini from file rather then using phpconfig with id=1; fixes #796
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2020-01-31 13:17:49 +01:00
Michael Kaufmann
ace18cb7c9 use correct default-versions for configuration-step to disable mod_php for debian buster and ubuntu bionic
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2020-01-31 12:58:04 +01:00
Michael Kaufmann
1270204cd9 fix wrongly initialized resource-usage when re-calculating it; fixes #797
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2020-01-31 09:49:29 +01:00
Michael Kaufmann
2831923708 Merge pull request #795 from lpedretti/master
Fixed the case that the spf record is not inserted with it's quotes, and so the condition fails and 2 spf records are inserted in the domain
2020-01-24 16:58:10 +01:00
Leonardo Pedretti
6b1ae648b4 Fixed the case that the spf record is not inserted with it's quotes, and so the condition fails and 2 spf records are inserted in the domain 2020-01-23 11:59:28 -03:00
Michael Kaufmann
6c43f1bc56 fix Domains.update() if called as admin/reseller without change_serversettings privileges, thx to rseffner
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2020-01-22 09:14:07 +01:00
Michael Kaufmann
2e273a41b5 fix IpsAndPorts when checking for system.ipaddress in update() and delete()
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2020-01-19 10:45:48 +01:00
Michael Kaufmann
2004bbe38d dont access db result arrays directly without checking whether it's false due to an error (php7.4 related)
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2020-01-19 10:13:28 +01:00
Michael Kaufmann
e44e07784f validate nameserver ip-addresses for binds allow-transfer block; fixes #791
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2020-01-19 10:08:06 +01:00
Michael Kaufmann
8d6275e1aa set version to 0.10.12 for upcoming maintenance release
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2020-01-10 17:41:20 +01:00
Michael Kaufmann
f21d4f8770 when not using awstats, disable awstats-related settings; add minor tweaks to unit-tests
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2020-01-10 16:44:13 +01:00
Michael Kaufmann
fc97b4d4e9 Merge pull request #786 from patschi/logformat-awstats
Allow configuring awstats LogFormat
2020-01-10 16:32:33 +01:00
Patrik Kernstock
05051309c7 Merge branch 'master' into logformat-awstats 2020-01-09 23:24:26 +00:00
Patrik Kernstock
0f025a6627 Language file update
Signed-off-by: Patrik Kernstock <patrik@kernstock.net>
2020-01-09 23:21:11 +00:00
Michael Kaufmann
f6f5765b54 avoid settig more than one catchall address for one domain in Emails.update(), thx to mrairstone
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2020-01-09 14:45:51 +01:00
Michael Kaufmann
ac82aa80d2 correct logfiles_format migration; only needed if setting is non-empty
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2020-01-09 14:14:04 +01:00
Michael Kaufmann
57503d9c6e try to touch logfile from settings in order for is_writable to work correctly, thx to rubberduck
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2020-01-09 14:10:50 +01:00
Michael Kaufmann
f55ad16d82 Merge pull request #785 from patschi/logformat
Allow using more advanced webserver LogFormat
2020-01-09 09:16:03 +01:00
Patrik Kernstock
ea7834c1d1 Added small notice to lng for awstats LogFormat
Signed-off-by: Patrik Kernstock <patrik@kernstock.net>
2020-01-08 22:08:15 +00:00
Patrik Kernstock
b355711de9 Improvements as suggested by @d00p
Signed-off-by: Patrik Kernstock <patrik@kernstock.net>
2020-01-08 22:08:15 +00:00
Michael Kaufmann
a5287726a4 fix issue in PhpHelper::trimArray() returning an empty array, fixes #751
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2020-01-03 23:32:21 +01:00
Patrik Kernstock
b393c7d6e6 Merge branch 'master' into logformat 2020-01-03 22:32:45 +01:00
Michael Kaufmann
dd2782771a set version to 0.10.11 for upcoming maintenance release
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2020-01-03 13:24:31 +01:00
Michael Kaufmann
25d0bbb766 switch from algo26-matthias/idna-covert to our own fork as we cannot update to >2.1 without having a minimum requirement for php-7.2 but we need a few fixes for php-7.4 support later on
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2020-01-03 12:48:01 +01:00
Michael Kaufmann
b4dedca3db Update README.md 2020-01-02 13:53:22 +01:00
Patrik Kernstock
09aed61dbf Merge branch 'master' into logformat-awstats 2020-01-02 12:44:35 +01:00
Patrik Kernstock
ca39501530 Fixed awstats_logformat field for new installs
Signed-off-by: Patrik Kernstock <patrik@kernstock.net>
2020-01-02 12:39:25 +01:00
Patrik Kernstock
28fd88e53e Merge branch 'master' into logformat 2020-01-02 12:31:51 +01:00
Michael Kaufmann
e01c2e02fb fix update query for new fpm-custom_config value, refs #783
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2020-01-02 12:28:48 +01:00
Michael Kaufmann
762bfae61a Merge pull request #783 from patschi/phpfpm-custom-settings
Ability to add custom config to PHPFPM version
2020-01-02 10:19:19 +01:00
Patrik Kernstock
a4d4e16efc Small comment added to escaping double-quote
Signed-off-by: Patrik Kernstock <patrik@kernstock.net>
2019-12-31 22:46:03 +01:00
Patrik Kernstock
7f83ad31f4 Fixed dbversion in SQL/Froxlor.php
Signed-off-by: Patrik Kernstock <patrik@kernstock.net>
2019-12-31 22:30:54 +01:00
Patrik Kernstock
e143ba4577 Allow configuring awstats LogFormat
Signed-off-by: Patrik Kernstock <patrik@kernstock.net>
2019-12-31 22:29:29 +01:00
Patrik Kernstock
6799a56ba1 Allow using more advanced LogFormat
Signed-off-by: Patrik Kernstock <patrik@kernstock.net>
2019-12-31 20:18:52 +01:00
Patrik Kernstock
484fe8acbc Fixed db_DBVERISON in Froxlor.php
Signed-off-by: Patrik Kernstock <patrik@kernstock.net>
2019-12-31 17:22:37 +01:00
Patrik Kernstock
550af5b943 Fixed german lng, fixed db_version in SQL
Signed-off-by: Patrik Kernstock <patrik@kernstock.net>
2019-12-31 17:18:17 +01:00
Patrik Kernstock
7ae59477af New update step, changed order of lang strings
Signed-off-by: Patrik Kernstock <patrik@kernstock.net>
2019-12-31 16:14:26 +01:00
Michael Kaufmann
acefa41806 Merge pull request #781 from patschi/accesslog-logtype
Use logtype for access_log for IPsAndPorts too
2019-12-31 16:01:42 +01:00
Patrik Kernstock
b39c8029cd Merge branch 'master' into phpfpm-custom-settings 2019-12-31 15:51:27 +01:00
Patrik Kernstock
69ff416361 Fixed SQL, minor comments/lng updates
Signed-off-by: Patrik Kernstock <patrik@kernstock.net>
2019-12-31 15:34:46 +01:00
Michael Kaufmann
3eb1718fe0 add option to disable SSL sessiontickets globally for older systems, fixes #784
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-12-31 12:27:35 +01:00
Michael Kaufmann
37c434d4fc testsystem does not listen on socket for mysql
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-12-31 09:29:09 +01:00
Michael Kaufmann
1eb14d7564 update composer-dependencies; add connection-test to Mysqls.update() when changing passwords; validate ssl-certificates to avoid private/public key mismatch and a failed webserver start, fixes #778
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-12-31 09:23:28 +01:00
Michael Kaufmann
1c17df69d2 Merge pull request #782 from patschi/fix-dhparams-indent
Fix dhparam indent
2019-12-31 08:11:40 +01:00
Patrik Kernstock
c61b3b73bd Ability to add custom config to PHPFPM version
Addresses #643

Signed-off-by: Patrik Kernstock <patrik@kernstock.net>
2019-12-31 05:48:36 +01:00
Patrik Kernstock
18c87baec8 Fix dhparam indent 2019-12-31 03:53:12 +01:00
Patrik Kernstock
631b2b59a5 Use logtype for access_log for IPsAndPorts too 2019-12-31 03:51:19 +01:00
Michael Kaufmann
1e0510a43d fix SysLog.delete(), SysLog.listing() and SysLog.listingCount() when called as admin/reseller withouth customers_see_all permission
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-12-21 15:12:51 +01:00
Michael Kaufmann
e62f675c4c apply 'notryfiles', 'writeaccesslog' and 'writeerrorlog' flags to subdomains when editing a domain
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-12-18 08:44:02 +01:00
Michael Kaufmann
fe389ab208 setting version to 0.10.10 for upcoming maintenance release
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-12-13 16:23:43 +01:00
Michael Kaufmann
63d915804a lowercase domainnames when adding new (sub)domain to avoid issues with certificates on filesystem
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-12-11 20:12:51 +01:00
Michael Kaufmann
466c09137b add new 'ssl-enabled' flag for domains and subdomains so ssl can be deactivated (by a customer too) even if there are ssl-ip/ports assigned; introduce new honorcipherorder and sessiontickets flags for more control over ssl-related settings on a per domain base (admin only); fixes #767 and fixes #769
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-12-10 10:21:35 +01:00
Michael Kaufmann
3a738b7070 fix mysql8 issue with group by and sorting within; fixes #774
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-12-08 10:43:12 +01:00
Michael Kaufmann
5ee9d3064a add new API function Froxlor.generatePassword() to return a random password based on froxlor settings regarding min-length, included characters, etc.; fixes #768
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-12-06 11:51:40 +01:00
Michael Kaufmann
adb5c6734a set version to 0.10.9 for upcoming maintenance release
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-12-06 10:20:01 +01:00
Michael Kaufmann
7dff46b63e set production Lets Encrypt endpoint as default in settings like the installation does; do nat-sorting only on username-related fields, fixes #765
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-12-05 07:52:11 +01:00
Michael Kaufmann
12883bafd6 check for valid result when reading database usage from information_schema; fixes #766
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-12-04 07:15:28 +01:00
Michael Kaufmann
c2b88200f0 Merge pull request #763 from RipClaw2971/bugfix
SQL error in lib/Froxlor/Api/Commands/Certificates.php
2019-11-29 19:52:13 +01:00
Andreas Grundler
634199780b Bugfix 2019-11-29 19:22:43 +01:00
Michael Kaufmann
e0275840ab set version to 0.10.8 for upcoming maintenance release
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-11-29 17:14:02 +01:00
Michael Kaufmann
bae8c86901 fix removing of ssl-ip-relation to domain if no ssl-ip is selected via interface, thx to Patient Nr0
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-11-27 18:32:27 +01:00
Michael Kaufmann
e8be3ee643 use correct apiendpoint for lets encrypt; pass debug-flag onto acme.sh; fixes #762
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-11-27 07:42:23 +01:00
Michael Kaufmann
35ecdfa2f5 fix searching for alias-domains by link in customer_domains
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-11-24 12:52:25 +01:00
Michael Kaufmann
3e4a3ef4b0 fix duplicate domain entries in customer-domain-list when domain has aliases, thx to crazy4chrissi
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-11-24 11:33:10 +01:00
Michael Kaufmann
cdf02ceab6 set version to 0.10.7 for upcoming maintenance release
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-11-22 16:14:13 +01:00
Michael Kaufmann
d24056c925 fix vhost-merging of specialsettings in nginx; fixes #757
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-11-22 16:12:11 +01:00
Michael Kaufmann
d2852fbd5d add new setting to set default value of domain-edit-setting 'Apply specialsettings to all subdomains' and 'Apply php-config to all subdomains'
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-11-22 16:10:27 +01:00
Michael Kaufmann
d76ebc7c06 fix sort-ordering parameter for pagination
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-11-20 13:08:36 +01:00
Michael Kaufmann
4fbaacb159 fix domain listing for admin-domains
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-11-20 12:20:20 +01:00
Michael Kaufmann
2d43a8714d let's try to fix the mysql-user-create/update issue, fingers crossed; refs #758
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-11-20 11:06:21 +01:00
Michael Kaufmann
620a22bf3e fix listing of subdomains for customers, fixes #759
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-11-20 09:33:28 +01:00
Michael Kaufmann
5e01018f30 fix typo in SysLog.delete(), thx to Wolfgang
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-11-18 14:47:56 +01:00
Michael Kaufmann
c84732a0cd fix issue when adding new database users with already-hashed passwords, refs #758
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-11-18 10:48:31 +01:00
Michael Kaufmann
dfce1fea3c re-add \Froxlor\UI\Paging as it's still required for api_keys.php because they are not (yet) listable via API
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-11-17 15:20:46 +01:00
Michael Kaufmann
e6dad6c6d0 Use authentication_string for mysql-5.7 and mysql-8 (not password-field) - let's see what happens
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-11-17 14:29:37 +01:00
Michael Kaufmann
605d2340d1 first unittest for mysql-users and their password, refs #758
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-11-17 13:42:35 +01:00
Michael Kaufmann
d5df4dd7a4 set version to 0.10.6 for upcoming maintenance release
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-11-15 16:43:36 +01:00
Michael Kaufmann
57497bd03f if no ssl IP/port is selected when editing a domain within the webinterface, set the remove_ssl_ipandport parameter to true to not fallback to defaults
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-11-15 16:36:14 +01:00
Michael Kaufmann
1a3cc52188 fix parameters defaults for Domains.update() and add new parameter 'remove_ssl_ipandport' to clear ssl ip/port instead of defaulting to the current set value; fixes #756
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-11-15 15:11:24 +01:00
Michael Kaufmann
21f6874a61 check whether there actually is quota read for a user if newly created, thx again to J-BBB
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-11-15 12:58:28 +01:00
Michael Kaufmann
b34e66dfd6 fix install-dir replacement in configfiles, thx to J-BBB
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-11-15 08:02:46 +01:00
Michael Kaufmann
a77f890462 Merge branch 'master' of github.com:Froxlor/Froxlor 2019-11-15 07:20:38 +01:00
Michael Kaufmann
3cc5352c01 implement EmailForwarders.listing(); fixes #754
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-11-15 07:20:16 +01:00
Michael Kaufmann
d01d470119 Merge pull request #755 from danielrona/patch-1
enabled autofocus for 2fa_code
2019-11-14 12:58:18 +01:00
Daniel
a97ce74cc8 enabled autofocus for 2fa_code 2019-11-14 12:31:29 +01:00
Michael Kaufmann
fe7bfcc7c2 fix update of hosting plans via interface; fixes #753
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-11-13 15:28:08 +01:00
Michael Kaufmann
cff0ac72d0 optimize varchar fields in admin/customer table; fixes #752
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-11-13 08:57:53 +01:00
Michael Kaufmann
e8dcb29b69 keep searching code in ssl_certificates if something was searched and no results were returned, thx to Ithariel
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-11-12 12:53:38 +01:00
Michael Kaufmann
2b3b68efa3 remove testing code
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-11-12 08:17:54 +01:00
Michael Kaufmann
d937029bf7 implement [ApiModule].listing() in frontend-module as sorting/limiting/searching is now possible via API call (partly untested)
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-11-10 18:35:32 +01:00
Michael Kaufmann
1955b5dd32 add task to remove certificate from acme.sh when removed in froxlor; fix issue when mode of certificate generation was not reset to 'issue' and kept trying to 'renew' instead
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-11-10 18:34:02 +01:00
Michael Kaufmann
c2a9880616 add new Api-Module 'SysLog' to query froxlor logs; set default value for api_allowed to the value of api.enabled setting when adding new customer via frontend to behave like Customers.add() API method
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-11-09 11:37:45 +01:00
Michael Kaufmann
dfedc478f7 check for given customer loginname/id before anything happens in Mysqls.add/update/delete when called as admin; fixes #749
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-11-07 15:53:30 +01:00
Michael Kaufmann
6efe500cee validate that the admin/reseller has customers in SubDomains.listing(); return all domain fields for admins/resellers in SubDomains.listing()
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-11-05 11:21:49 +01:00
Michael Kaufmann
9c3549c604 lowercase domain-names in AcmeSh implementation to avoid https://github.com/Neilpang/acme.sh/issues/2556
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-11-04 11:39:06 +01:00
Michael Kaufmann
50755f4399 set phpunit to fixed 8.4.1 in favor of https://github.com/sebastianbergmann/phpunit/issues/3793 to not break jenkins testing for now
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-11-02 13:26:38 +01:00
Michael Kaufmann
ef11ad8da7 fix broke count sql-queries
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-11-02 11:12:49 +01:00
Michael Kaufmann
1b2c186c07 introduce search, limit, offset and orderby possibilities for (almost) all API listing() functions; added listingCount() function in preparation to replace the old UI\Paging class later on
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-11-02 10:58:52 +01:00
Michael Kaufmann
b162324ff0 fix renew-check of let's encrypt implementation, set version to 0.10.5 for bugfix release; fixes #747
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-11-01 14:19:06 +01:00
Michael Kaufmann
6cd061d74c set version to 0.10.4 for upcoming maintenance release; minor code formatting + adjustments
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-11-01 11:16:13 +01:00
Michael Kaufmann
53b7420dc9 fix stripping of escape-sequences in api-endpoint; fixes #746
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-11-01 07:39:28 +01:00
Michael Kaufmann
aa85c648a3 check for renewal of certificates not only if there's a task to regenerate vhosts but everytime the letsencrypt cronjob runs (which is basically obsolete due to the integration into the tasks cron but perfect for checking renewal dates
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-10-31 21:37:54 +01:00
Michael Kaufmann
35e228ff09 Merge pull request #745 from pquerner/unittests/564
Add UnitTests for #679
2019-10-30 13:01:02 +01:00
Pascal
62236da496 changed method name 2019-10-30 12:50:16 +01:00
Pascal
e1cc896b6c add unit tests for Validate::is_ipv6 2019-10-30 12:39:56 +01:00
Pascal
36595baa65 Merge remote-tracking branch 'Froxlor/master' 2019-10-30 12:14:39 +01:00
Michael Kaufmann
ec3fd1d105 Create SECURITY.md 2019-10-30 11:00:08 +01:00
Michael Kaufmann
e39dcfbfe2 Update FUNDING.yml 2019-10-30 10:50:20 +01:00
Michael Kaufmann
ef6254b307 Merge pull request #679 from pquerner/#564
Allow CIDR and Netmask in mysql_host_access; fixes #564
2019-10-30 10:40:26 +01:00
Michael Kaufmann
44bf211ab5 Merge pull request #743 from kionez/fix_split_path_info
Correct fastcgi_split_path_info; fixes #744
2019-10-29 16:09:44 +01:00
kionez
b0e920104f Fix fastcgi_split_path_info as https://www.nginx.com/resources/wiki/start/topics/examples/phpfcgi/ 2019-10-29 16:00:14 +01:00
kionez
299e201142 Fix fastcgi_split_path_info 2019-10-29 15:47:28 +01:00
Michael Kaufmann
46982ad2dc validate that a customer gets the default ftp account created even if the admin/reseller has no more resource for ftp accounts; fixes #741
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-10-29 07:52:00 +01:00
Michael Kaufmann
c0e07fd659 fix undefined variable in hosting-plans frontend, fixes #742
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-10-28 20:06:14 +01:00
Pascal
5c11eecbd7 remove code for checking ipv6 mapped ipv4 notation 2019-10-28 17:27:39 +01:00
Pascal
9689afc759 change method signature of \Froxlor\Validate\Validate::validate_ip2 2019-10-28 16:58:34 +01:00
Pascal
d76f4108e5 dont need $result if we're expecting an exception 2019-10-28 16:40:22 +01:00
Pascal
9c4d619840 remove inner if statement
check ipv6 when cidr>netmask flag is set
2019-10-28 16:32:52 +01:00
Pascal
7774e7606d dont check notated ips again 2019-10-28 16:29:53 +01:00
Pascal
2ed0cad27b #564:
cidr notation can only be 1 through 32
2019-10-28 16:27:54 +01:00
Pascal
686c2ae534 fix comparison 2019-10-28 16:00:43 +01:00
Pascal
faf3abe800 introduce new parameter to allow automatic convert cidr notation to netmask notation 2019-10-28 15:33:26 +01:00
Pascal
220b493a1b better readability 2019-10-28 14:16:27 +01:00
Pascal
e8d67f9711 check if ipv6 first 2019-10-28 14:07:31 +01:00
Pascal
83e932b068 switch join with implode 2019-10-28 13:26:32 +01:00
Pascal
84d1be538e block ipv6 addresses in cidr notation (mysql can't handle it) 2019-10-28 13:25:34 +01:00
Pascal
c97cdb1c0e make it more readable 2019-10-28 13:15:48 +01:00
Pascal
ffefe85fb4 Merge branch 'master' into #564 2019-10-28 12:18:55 +01:00
Pascal
27341ca490 Merge remote-tracking branch 'Froxlor/master' 2019-10-28 12:17:51 +01:00
Michael Kaufmann
822bb2bd4d fixed deletion of default-ftp-user possible via API (not through the interface though); refs #741
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-10-27 16:02:32 +01:00
Michael Kaufmann
88ee76e4c9 setting version to 0.10.3 for upcoming release
Signed-off-by: Michael Kaufmann <michael.kaufmann@aixit.com>
2019-10-25 14:48:13 +02:00
Michael Kaufmann
90d921ebb5 preserve downward compatibility for 0.10.1 updaters regarding specialsettings for ssl-enabled domains; fixes #739
Signed-off-by: Michael Kaufmann <michael.kaufmann@aixit.com>
2019-10-24 18:14:51 +02:00
Michael Kaufmann
7b162c4bd0 added tls-settings per domain for admins with change_serversettings-flag set; fixes #519
Signed-off-by: Michael Kaufmann <michael.kaufmann@aixit.com>
2019-10-22 16:45:03 +02:00
Michael Kaufmann
32e2d48aed fallback to /tmp/froxlor.log if file-log is activated but no file given or not writeable; fixes #737
Signed-off-by: Michael Kaufmann <michael.kaufmann@aixit.com>
2019-10-22 15:06:41 +02:00
Michael Kaufmann
1fdc524171 correct permissions
Signed-off-by: Michael Kaufmann <michael.kaufmann@aixit.com>
2019-10-19 11:08:55 +02:00
Michael Kaufmann
4704798379 setting version to 0.10.2 for upcoming maintenance release
Signed-off-by: Michael Kaufmann <michael.kaufmann@aixit.com>
2019-10-18 13:39:23 +02:00
Michael Kaufmann
e5c1e8350d set default_theme value in settings-array to 'Sparkle' as it is in install/froxlor.sql; improve language strings for adding php-configurations and fpm-versions
Signed-off-by: Michael Kaufmann <michael.kaufmann@aixit.com>
2019-10-17 18:40:53 +02:00
Michael Kaufmann
f0b36c03ad fix registration and termination date to flip between empty-value and 0000-00-00, thx to dxd
Signed-off-by: Michael Kaufmann <michael.kaufmann@aixit.com>
2019-10-17 09:35:33 +02:00
Michael Kaufmann
79056f20ee display API in the list of features the customer is allowed to use; display total diskspace used by customer (web, mail and mysql) on customers dashboard, fixes #733
Signed-off-by: Michael Kaufmann <michael.kaufmann@aixit.com>
2019-10-16 12:44:23 +02:00
Michael Kaufmann
5d6aa4d2bb Merge pull request #732 from TimoStramann/patch-1
fixing typo
2019-10-16 06:32:13 +02:00
Timo Stramann
f803276ca2 fixing typo
wrong variable name
2019-10-16 00:11:30 +02:00
Michael Kaufmann
5cf2d32e8a reverse parameter for Domains.add() into so users have to explicitly pass the parameter if they do NOT want the default ssl-ip to be used if left empty, so it behaves like the non-ssl ipandport parameter - if left empty, the system default is being used, thx J-BBB
Signed-off-by: Michael Kaufmann <michael.kaufmann@aixit.com>
2019-10-15 14:35:42 +02:00
Michael Kaufmann
9430f77c2e Setting system.leapiversion exists and just needs to be updated, no added
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-10-15 07:22:41 +02:00
Michael Kaufmann
302fe994b7 adjust ip/port settings for downward compatibility when adding new ssl-specialsettings related settings
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-10-14 14:26:13 +02:00
Michael Kaufmann
9b122bc003 order tasks by type descending to create bind and webserver configs at the end of the run; cleanUp configs files after creation of certificates to minimize downtime, thx to SCD for testing
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-10-14 13:56:55 +02:00
Michael Kaufmann
9410356bc7 fix output of acme command when upgrading
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-10-14 10:12:26 +02:00
Michael Kaufmann
5d5cc3dda3 fix array to string conversion
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-10-13 22:49:03 +02:00
Michael Kaufmann
a7ccb7007f add Unit-test for DomainZones.listing()
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-10-13 14:47:39 +02:00
Michael Kaufmann
5680c88da0 implement DomainZones.listing() to actually return custom stored dns entries for a given domain, fixes #731
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-10-13 14:40:04 +02:00
Michael Kaufmann
cf01a587c7 fix typo in updater
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-10-12 14:53:13 +02:00
Michael Kaufmann
b6367e1be1 forgot to add the ssl-default-vhostconf-domain fields in ipsandports
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-10-12 14:39:58 +02:00
Michael Kaufmann
93aa8bff1e add default-ssl-vhost settings and optionally allow including of non-ssl default-vhost settings, fixes #727
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-10-12 14:34:18 +02:00
Michael Kaufmann
15fa035dc4 check for minimum required php version in autoupdater
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-10-12 14:04:43 +02:00
Michael Kaufmann
057f4aaa10 Passing the and parameters in reverse order to implode has been deprecated since PHP 7.4
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-10-12 10:22:11 +02:00
Michael Kaufmann
f588927bc5 check for existence of certificate files created by acme.sh
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-10-12 08:17:04 +02:00
Michael Kaufmann
03d2a76dd0 clean up language and code for dropped let's encrypt ACMEv1 support
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-10-11 20:53:34 +02:00
Michael Kaufmann
0d0e557715 force Let's Encrypt ACMEv2 API, fixed #728
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-10-11 18:17:05 +02:00
Michael Kaufmann
fb54b887f2 remove unneeded apihelp-page code in admin/customer_index; set explicit version to api-doc URL; check for acme.sh cronjob and uninstall it, as froxlor manages that itself
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-10-10 16:42:32 +02:00
Michael Kaufmann
9167608794 set version to 0.10.1 for maintenance release
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-10-10 14:55:45 +02:00
Michael Kaufmann
050af61082 show success in updater when there are no more old files to delete and exec() is disallowed (showed empty list)
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-10-09 12:05:04 +02:00
Michael Kaufmann
2c23431daf show on API keys page wether api access is allowed
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-10-09 11:52:55 +02:00
Michael Kaufmann
4543c73b4f add possibility to enable/disable api access on a per user base
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-10-09 11:43:22 +02:00
Michael Kaufmann
88d85fc02e fix curly bracket array access (deprecated)
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-10-09 07:59:38 +02:00
Michael Kaufmann
6102fabcb6 allow setting http2 flag for (sub)domains in customer view, fixes #725
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-10-09 07:59:11 +02:00
Michael Kaufmann
d7a7412973 Merge pull request #724 from kionez/add-ssl-expirationdate
Add expiration date to SSL certificates loaded via API request, fixes #723
2019-10-08 18:59:27 +02:00
kionez
1b3029b826 Fix typo 2019-10-08 18:50:10 +02:00
Michael Kaufmann
26cb53c8fb correctly validate that a domain has not a certificate in Certificates.add(), refs #722
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-10-08 18:44:42 +02:00
Michael Kaufmann
b4999fcc83 Throw exception if domain used to call Certificates.get() does not have a certificate, fixes #722
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-10-08 18:01:59 +02:00
kionez
05f602d457 Fix for null expiration date and coding style 2019-10-08 17:44:41 +02:00
Michael Kaufmann
89b95d61d2 return empty array in FroxlorAPI.php example class if last call was unsuccessful, fixes #722
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-10-08 17:36:42 +02:00
kionez
9ec03bade7 Add expiration date to SSL certificates loaded via API request 2019-10-08 17:32:03 +02:00
Michael Kaufmann
20699a15a6 update composer dependencies
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-10-08 12:54:15 +02:00
Michael Kaufmann
9b8a6e7e67 more php-7.4 compatibility
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-10-08 12:38:22 +02:00
Michael Kaufmann
3a8d5a9517 correct Mysql.add phpDoc to produce correct api-doc, fixes #721
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-10-08 12:11:00 +02:00
Michael Kaufmann
557b28a69d more php-7.4 compatibility
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-10-08 12:08:36 +02:00
Michael Kaufmann
0f1c5506e2 do not create username@domain ftp user if the default-ftp-user is being created in Ftps.add, fixes #720
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-10-08 12:04:10 +02:00
Michael Kaufmann
c6a93fa336 fix possible php-7.4 notice 'Trying to access array offset on value of type bool'
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-10-08 11:26:05 +02:00
Michael Kaufmann
466ea0fa99 show update steps for version updates (forgot that once or twice); add fallback for file deletion if exec() is not allowed; fix php7.4 warnings
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-10-08 10:54:08 +02:00
Michael Kaufmann
8f850ee7f3 simplify config-templates for cronjob setup
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-10-06 22:54:54 +02:00
Michael Kaufmann
55d21e475d set low timeout for version-check and output message if check is not possible (due to connection error, downtime of server, etc.)
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-10-06 18:53:30 +02:00
Michael Kaufmann
fa3e3da7ac only flush privileges if anything at all happened
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-10-06 14:47:04 +02:00
Michael Kaufmann
05d66c034e update min-required version of php in composer.json
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-10-06 09:04:18 +02:00
Michael Kaufmann
98f0839664 Merge branch 'master' of github.com:Froxlor/Froxlor 2019-10-06 09:01:15 +02:00
Michael Kaufmann
4d52c6b6d0 Update README.md 2019-10-04 21:48:10 +02:00
Michael Kaufmann
eb5ea51da1 add explicit tlsv1.3 ciphersuite setting (used for apache-only as of now) 2019-10-04 17:43:11 +02:00
Michael Kaufmann
4b555b4ef2 set version to 0.10.0 for upcoming stable release
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-10-03 12:35:42 +02:00
Michael Kaufmann
1657af8719 updating external libraries prior to release
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-10-03 12:31:27 +02:00
Michael Kaufmann
c9d30654e0 update link to openssl-ciphers manual, thx to lod
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-10-02 09:12:06 +02:00
Michael Kaufmann
47ca350127 increase php requirement to 7.0 as 5.6 is way too old
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-09-27 12:55:14 +02:00
Michael Kaufmann
cc04e44031 add possibility to add customer using a hosting-plan instead of specifying resources
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-09-27 12:54:43 +02:00
Michael Kaufmann
eabad4917b correct try_files in NginxFcgi, fixes #717
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-09-26 09:50:13 +02:00
Michael Kaufmann
6188e5b0e3 Merge pull request #716 from Bobselp/patch-1
fix MysqlHandler user field
2019-09-25 20:18:22 +02:00
Bobselp
13ab7a598b fix MysqlHandler user field
See lib/Froxlor/FroxlorLogger.php:152
2019-09-25 20:03:16 +02:00
Michael Kaufmann
bf2584da65 Merge pull request #714 from Bobselp/patch-1
Get mailbox size with maildirsize file
2019-09-24 19:16:58 +02:00
Bobselp
31cebccd5d fix calc, add check if quota is enabled 2019-09-24 18:16:07 +02:00
Michael Kaufmann
3728e9b22c Merge pull request #715 from z3dm4n/master
lng/english.lng.php: fix typo
2019-09-24 12:55:45 +02:00
Erik Zettel
8a145eca92 lng/english.lng.php: fix typo 2019-09-24 12:44:33 +02:00
Bobselp
14914fce44 Get mailbox size with maildirsize file 2019-09-23 21:08:16 +02:00
Michael Kaufmann
6e3fdc1cf9 Merge pull request #713 from Bobselp/patch-1
fix missing namespaces in PowerDNS cron
2019-09-22 18:05:48 +02:00
Bobselp
6ca68f6a2d fix missing namespaces in PowerDNS cron
Some getDB calls were missing the `\Froxlor\Dns\` prefix
2019-09-22 17:59:21 +02:00
Michael Kaufmann
fd4d3cbcfd specify pop3_logout_format explicitly for dovecot to satisfy maillogparser
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-09-19 13:06:32 +02:00
Michael Kaufmann
75f49e2ee2 added HostingPlans ApiCommand + unit-tests
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-09-16 12:31:02 +02:00
Michael Kaufmann
aca22a9c94 only add lets encrypt certificate if cert is valid; display acme.sh output if --debug is specified
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-09-15 15:40:13 +02:00
Michael Kaufmann
5a8ae0f75f do not log multiple times due to pushing log-handlers multiple times
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-09-15 13:49:40 +02:00
Michael Kaufmann
6ef2be8c1a fixed typo
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-09-15 13:42:32 +02:00
Michael Kaufmann
1b968c885b remove old files from 0.9.x to avoid conflicts and errors; change mod_proxy-usage and ACMEv2 default values to true
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-09-15 10:28:19 +02:00
Michael Kaufmann
dc3f159c90 correctly trigger re-generation of let's encrypt certificates
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-09-15 10:22:25 +02:00
Michael Kaufmann
6ebb8dabc4 re-create certificate if SAN list or domain changes
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-09-12 12:30:47 +02:00
Michael Kaufmann
9e2dcf51d7 also remove let's encrypt certificate for froxlor-hostname when updating to acme.sh; make installation more mysql/mariadb compatible
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-09-09 17:16:41 +02:00
Michael Kaufmann
2d8b0181b3 add gitter notifications for travis-ci
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-08-22 16:20:42 +02:00
Michael Kaufmann
accd6e7416 Update README.md 2019-08-22 16:15:17 +02:00
Michael Kaufmann
f5027695dd Create FUNDING.yml 2019-08-22 15:45:00 +02:00
Michael Kaufmann
34696df700 Merge pull request #711 from TimoStramann/patch-1
Remove unnecessary slash for SSL redirect
2019-08-18 16:15:50 +02:00
Timo Stramann
8e9ddd3d50 Remove unnecessary slash for SSL redirect
Remove slash after hostname since requests directly to the hostname do not require a slash at the end and all other content goes to `$request_uri` which starts with shlash, hence no longer doubleslashes on hostname only queries.
2019-08-18 16:07:59 +02:00
Michael Kaufmann
eca941bdae Merge pull request #710 from TimoStramann/patch-1
Updating another fastcgi_param SCRIPT_FILENAME
2019-08-18 15:19:42 +02:00
Timo Stramann
bd6aba8875 Updating another fastcgi_param SCRIPT_FILENAME
Use $request_filename instead of $document_root$fastcgi_script_name as described in: https://www.nginx.com/resources/wiki/start/topics/tutorials/config_pitfalls/#use-request-filename-for-script-filename
2019-08-17 13:04:18 +02:00
Michael Kaufmann
58f6b558df Merge pull request #709 from TimoStramann/patch-1
Updating fastcgi_param SCRIPT_FILENAME
2019-08-17 07:51:12 +02:00
Michael Kaufmann
7ba72269a4 add dovecot stats service and use correct permissions
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-08-11 11:12:53 +02:00
Michael Kaufmann
76c4486d26 fix subcanemaildomain parameter for Domains.update(); allow exec() in froxlor default vhost php.ini or logfiles-viewer feature
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-08-11 10:31:33 +02:00
Michael Kaufmann
69d7889f02 do not require codecoverage to pass checks
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-08-09 17:55:39 +02:00
Timo Stramann
04898c6114 Updating fastcgi_param
Use $request_filename instead of $document_root$fastcgi_script_name as described in: https://www.nginx.com/resources/wiki/start/topics/tutorials/config_pitfalls/#use-request-filename-for-script-filename
2019-08-09 09:40:55 +02:00
Michael Kaufmann
7364dca53d fix homedir of automatically added ftp-user for new customers, thx Gamerboy59 for finding this
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-08-07 14:01:05 +02:00
Michael Kaufmann
90e7f7af0c correct language-array and minor formatting in serversettings.caa_entry_custom
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-07-30 10:05:26 +02:00
Michael Kaufmann
878be08563 Merge pull request #706 from makuser/master
Implement CAA DNS records
2019-07-30 09:53:46 +02:00
Michael Kaufmann
a98ae562b2 change mysql-username-test so it generates a loginname that fails depending on the mysql/mariadb version
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-07-30 08:48:44 +02:00
Michael Kaufmann
2aec6a10ed argh, mixed up the If statement for mysql-version check
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-07-30 08:31:03 +02:00
Michael Kaufmann
70ac914a86 fix drop database on mysql-5.6 as there is no 'if exists' for 'drop user' prior to mysql-5.7
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-07-30 07:34:42 +02:00
Michael Kaufmann
169353c429 Merge branch 'makuser-travis-test' 2019-07-30 07:30:56 +02:00
Marc-André Kolly
ede19946c2 Tell ant to fail the build when a php unit test fails 2019-07-29 16:29:39 +02:00
Marc-André Kolly
dd488106af Remove lib/userdata.inc.php.bak 2019-07-29 16:09:11 +02:00
Marc-André Kolly
2489658353 Extrawurst 2.0. 2019-07-29 16:03:27 +02:00
Marc-André Kolly
61b12e3f25 Extrawurst. 2019-07-29 15:47:45 +02:00
Marc-André Kolly
c2ffb6d6bd Update Travis CI to run database tests on MySQL 5.6, 5.7 and 8.0 and on MariaDB 10.3 and 10.4. 2019-07-29 15:12:35 +02:00
Marc-André Kolly
4ef78df27f Update Travis CI 2019-07-29 15:07:18 +02:00
Marc-André Kolly
84d80d695a Add Url and Domain validation for CAA records using native Froxlor function 2019-07-29 15:02:13 +02:00
Marc-André Kolly
3cba61a8d8 Simplify unit tests for CAA entry validation 2019-07-29 14:30:39 +02:00
Marc-André Kolly
16ccc273a9 Don't actually enclose CAA records in brackets 2019-07-29 14:27:44 +02:00
Marc-André Kolly
95d47eb6c9 Add unit tests for CAA entry validation 2019-07-29 11:53:00 +02:00
Marc-André Kolly
bfb3fb0a92 Add Regex to check for invalid CAA entry 2019-07-29 11:36:34 +02:00
Marc-André Kolly
78ef2a4e23 Fix serversettings field 2019-07-29 07:41:09 +02:00
Marc-André Kolly
a377c1e6c5 Split l18n string into title and description 2019-07-29 07:39:21 +02:00
Marc-André Kolly
e67e2a85de Implement test for Domain Zone CAA record 2019-07-28 20:05:55 +02:00
Marc-André Kolly
be0470aec1 Revert per-domain CAA settings 2019-07-28 19:49:56 +02:00
Marc-André Kolly
240178eba7 Implement global CAA settings 2019-07-28 19:49:32 +02:00
Marc-André Kolly
358ca61a26 Implement validators to prevent breaking DNS server when adding newly introduced RR types 2019-07-28 18:47:47 +02:00
Marc-André Kolly
b427212b00 Properly implement migrations for caa field in TABLE_DOMAIN_DNS using showUpdateStep() and lastStepStatus() 2019-07-28 18:12:00 +02:00
Marc-André Kolly
5eef98fdfd Bump DB Version to 201907270 2019-07-28 18:10:01 +02:00
Marc-André Kolly
57ac337ef7 Add a few more commonly used RR types to DNS editor 2019-07-28 16:52:05 +02:00
Marc-André Kolly
64fe300e42 Implement general CAA DNS records for all issuers 2019-07-28 16:28:29 +02:00
Marc-André Kolly
d4e5e32c14 Implement CAA DNS record for letsencrypt.org 2019-07-27 17:36:31 +02:00
Michael Kaufmann
d5e4182878 beautification and minor fixes
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-07-26 07:49:17 +02:00
Michael Kaufmann
dd87a7374e fix ftp-group not added correctly when new customer is added
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-07-26 07:45:38 +02:00
Michael Kaufmann
7bc57ed269 set password directly when adding new mysql user
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-07-26 07:34:32 +02:00
Michael Kaufmann
5658717653 fix wrong parameter for acme.sh --delete when ecc certificates are used
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-07-19 11:43:14 +02:00
Michael Kaufmann
6c0fb007e4 travis changed the default OS to xenial, set it to the previous trusty which works
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-07-19 08:43:42 +02:00
Michael Kaufmann
0b898b9936 Merge branch 'master' of github.com:Froxlor/Froxlor 2019-07-19 08:42:31 +02:00
Michael Kaufmann
a261e84830 Merge pull request #705 from MDXDave/patch-2
Disable mail redirections if customer is disabled, fixes #704
2019-07-19 08:28:40 +02:00
Dave
7e9b373a58 Update xenial.xml 2019-07-19 01:43:07 +02:00
Dave
5698f8360e Update rhel_centos.xml 2019-07-19 01:42:49 +02:00
Dave
de7c438315 Update gentoo.xml 2019-07-19 01:42:31 +02:00
Dave
0669450676 Update bionic.xml 2019-07-19 01:42:14 +02:00
Dave
507a62f52d Update trusty.xml 2019-07-19 01:41:54 +02:00
Dave
77a7037072 Update jessie.xml 2019-07-19 01:41:24 +02:00
Dave
577e9d3b70 Update buster.xml 2019-07-19 01:40:55 +02:00
Dave
2526512069 Update stretch.xml 2019-07-19 01:39:01 +02:00
Michael Kaufmann
e91debcbb1 buster dovceot has ssl enabled by default
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-07-14 09:41:46 +02:00
Michael Kaufmann
065fa0b58b do not store punycode-notation of email-account domain, fixes #703
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-07-13 09:09:39 +02:00
Michael Kaufmann
db3c95ea10 set last run of letsencrypt cron when called in webserver-cron
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-07-11 08:39:26 +02:00
Michael Kaufmann
8b417c044c let nginx auto-detect the best ecdh-curve to use, fixes #652
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-07-11 08:13:00 +02:00
Michael Kaufmann
5e3cfaf847 insert task to regenerate config files after removing old-format lets encrypt certificates
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-07-10 09:58:12 +02:00
Michael Kaufmann
0f0dd91246 combine Let's Encrypt cron with webserver-vhost-generation but allow manually execution using --debug/--force
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-07-09 07:50:11 +02:00
Michael Kaufmann
fd912dd161 combine webserver-reload command to parent class to avoid repeating code
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-07-09 07:13:02 +02:00
Michael Kaufmann
98325a0f40 don't need NSCD when using libnss-extrausers
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-07-03 18:07:02 +02:00
Michael Kaufmann
c43915c09d show task 12 in admin dashboard overview if active
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-07-03 12:00:47 +02:00
Michael Kaufmann
01bf814496 remove domain ssl information from acme.sh and filesystem on deletion to avoid trying to renew certificates
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-07-01 20:32:13 +02:00
Michael Kaufmann
2ce517e84a use Fts.add when adding new Customers to reduce duplicate code
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-06-28 15:15:17 +02:00
Michael Kaufmann
e209989f2a use EmailAccounts.delete API call in Emails.delete instead of repeating the code
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-06-28 11:07:29 +02:00
Michael Kaufmann
5dfb74701c improve error message display on missing vendor-folder
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-06-25 11:10:32 +02:00
Michael Kaufmann
bdd583d251 Merge branch 'drexlma-patch-2' 2019-06-25 10:59:06 +02:00
Michael Kaufmann
fd8a1d8dc2 Merge branch 'patch-2' of https://github.com/drexlma/Froxlor into drexlma-patch-2 2019-06-25 10:58:57 +02:00
Michael Kaufmann
d2818f8020 Merge branch 'drexlma-patch-3' 2019-06-25 10:58:20 +02:00
Michael Kaufmann
80a0a34b46 Merge branch 'patch-3' of https://github.com/drexlma/Froxlor into drexlma-patch-3 2019-06-25 10:57:45 +02:00
Michael Kaufmann
6e41c0ad2c add codecov.io to travis build for code-coverage stats - yay
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-06-17 14:11:40 +02:00
Michael Kaufmann
a07a9e6a88 more unit-testing, enhancements in Store-functions
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-06-11 12:10:56 +02:00
Michael Kaufmann
7a94a43053 started \Settings\Store unit tests
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-06-10 13:37:22 +02:00
Michael Kaufmann
028524291e test improvements and preparation for more tests later
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-06-10 11:38:47 +02:00
Michael Kaufmann
1ac304e5ac fix missing domainname parameter when manually adding ssl-certificates for a domain, fixes #700
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-06-10 11:36:05 +02:00
Michael Kaufmann
f266bb05c9 testing \Froxlor\Settings\FroxlorVhostSettings
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-06-06 13:04:43 +02:00
Michael Kaufmann
d8a8f76dc9 update dev-environment to use more recent versions, requries php-7.3 now (dev-only)
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-06-06 10:18:03 +02:00
Michael Kaufmann
0afbe3d13b add validation tests
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-06-05 20:52:37 +02:00
Michael Kaufmann
4917b9c057 added first validation tests
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-06-05 09:07:21 +02:00
Michael Kaufmann
13bfd62ac5 move validateUrl function to correct file
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-06-05 06:50:06 +02:00
Michael Kaufmann
97703e7a0c add a few tests for Settings
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-06-05 06:39:44 +02:00
Michael Kaufmann
13086d91d8 only validate and process ip-list if given at all
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-06-04 15:14:51 +02:00
Michael Kaufmann
b7a10fdeda fix vhost(parts)-merging in nginx cron, fixes #669
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-06-03 11:59:56 +02:00
Michael Kaufmann
6806f896d6 fix proftp path of rhel/centos config template, fixes #636
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-05-31 08:02:03 +02:00
Michael Kaufmann
87a2f86365 do not set default ssl-ips if the frontend values are left empty; if default ssl-ips are specified, preset them in the form when adding a domain, fixes #697
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-05-30 17:44:08 +02:00
Michael Kaufmann
a647d48fbe fix up testing/production switch and challengepath for lets encrypt, fixes #696
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-05-27 17:48:33 +02:00
Daniel Drexlmaier
6ea91f55e5 Update install.php 2019-05-27 15:47:30 +02:00
Daniel Drexlmaier
fb87129e29 Update init.php 2019-05-27 15:46:39 +02:00
Daniel Drexlmaier
79e5113e12 Update init.php 2019-05-27 15:28:08 +02:00
Daniel Drexlmaier
b75c9ddff6 Update install.php 2019-05-27 15:27:28 +02:00
Michael Kaufmann
35e14fde14 set version to 0.10.0-rc2 for second release candidate
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-05-27 11:47:58 +02:00
Michael Kaufmann
68f55f9596 dont allow bootstrap.php file from tests/ to be called via browser
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-05-27 08:33:36 +02:00
Michael Kaufmann
3fec579f85 Merge pull request #683 from discordier/hotfix/pcre-maillog
Fixes #682 - mail log parsing regex character group
2019-05-13 20:03:49 +02:00
Christian Schiffler
e2d69c664a Fixes #682 - mail log parsing regex character group
The mail log parsing regex was incorrectly using a character group of `\A`
2019-05-13 19:53:55 +02:00
Pascal
836b6f2fdb Merge remote-tracking branch 'upstream/master' 2019-05-10 02:54:33 +02:00
Michael Kaufmann
72016a5735 fix integrity-check language-file entries
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-05-07 14:03:37 +02:00
Pascal
f297058461 #564
fix wording
add validation for cidr syntax
add automatic transform of cidr to netmask for mysql
2019-05-04 00:39:12 +02:00
Pascal
0f4d8d76ae #564
fix wording
2019-05-03 23:31:31 +02:00
Pascal
12884c91a6 #564
fix #564 by allowing CIDR in mysql host validation. 
fix english and german field description accordingly
2019-05-03 22:32:57 +02:00
Michael Kaufmann
eba163fc4a Merge pull request #677 from pquerner/#646
allow auth basic in URL, fixes #646
2019-04-30 07:14:48 +02:00
Michael Kaufmann
8df6654ad0 Merge pull request #676 from pquerner/#675
use correct validate-ip function in \Froxlor\Validate\Validate::validateUrl, fixes #675
2019-04-30 07:09:20 +02:00
Pascal
1a5e43b6f7 fixes #646
change regex by using well tested regex from here:
https://mathiasbynens.be/demo/url-regex

by @diegoperini
https://gist.github.com/dperini/729294
2019-04-30 00:08:32 +02:00
Pascal
c4c7f4b636 fixes #675
fix call to static method
2019-04-29 23:39:10 +02:00
Michael Kaufmann
9aa0de16be Merge branch 'foliengriller-annotationsAPI' 2019-04-26 12:24:15 +02:00
Michael Kaufmann
cb636fe2c9 Merge branch 'annotationsAPI' of https://github.com/foliengriller/Froxlor into foliengriller-annotationsAPI 2019-04-26 12:23:58 +02:00
Michael Kaufmann
f93dc5643f fix error that wildcard-domains and lets-encrypt are not possible when using ACMEv2; fixes #674
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-04-25 14:20:02 +02:00
Michael Kaufmann
974b151d02 add Debian 10 (Buster) and Ubuntu 18.04 (Bionic) config-templates for TESTING
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-04-25 14:04:15 +02:00
Michael Kaufmann
8835dd0b65 remove deprecated config-templates for Ubuntu 12.04 (Precise); mark Debian 7 (Jessie) and Ubuntu 14.04 (Trusty) as deprecated
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-04-25 14:03:39 +02:00
Michael Kaufmann
626b791c67 remove recursor options in powerdns config template for gentoo, as recursion has been removed in pdns >=4.1.0; fixes #673
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-04-25 13:56:42 +02:00
Michael Kaufmann
82508587b3 update mysql-table engines to InnoDB; fixes #671
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-04-25 13:31:18 +02:00
Michael Kaufmann
0d7fa5728c fix auto-delete of cetificates when no domain exists anylonger, thx to an error-report
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-04-14 08:13:34 +02:00
Michael Kaufmann
29365838b3 set version to 0.10.0-rc1 for upcoming release candidate
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-04-10 08:24:04 +02:00
Michael Kaufmann
13ac7ef66c Merge pull request #666 from sokai/sokai-patch-1
logrotate snipet: (more) GDPR ‚compliant‘; fixes #665
2019-03-16 18:10:19 +01:00
Michael Kaufmann
6764747fa9 use system.defaultttl setting also for SOA record; fixes #667
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-03-16 18:09:21 +01:00
sokai
91df02916c logrotate snipet: GDPR ‚compliance‘
see: https://github.com/Froxlor/Froxlor/issues/665
2019-03-16 13:08:44 +01:00
sokai
bf400fc5f8 logrotate snipet: GDPR ‚compliance‘
see: https://github.com/Froxlor/Froxlor/issues/665
2019-03-16 13:07:49 +01:00
sokai
6cd73c9ebf logrotate snipet: GDPR ‚compliance‘
see: https://github.com/Froxlor/Froxlor/issues/665
2019-03-16 13:07:14 +01:00
sokai
ed9ab39c5e logrotate snipet: GDPR ‚complieance‘
see: https://github.com/Froxlor/Froxlor/issues/665
2019-03-16 13:05:54 +01:00
sokai
678bd1bcdc logrotate snipet: GDPR ‚complieance‘
see: https://github.com/Froxlor/Froxlor/issues/665
2019-03-16 13:05:11 +01:00
sokai
90fe548901 logrotate snipet: GDPR ‚complieance‘
see: https://github.com/Froxlor/Froxlor/issues/665
2019-03-16 13:04:26 +01:00
sokai
a158d4bfb9 logrotate snipet: GDPR ‚complieance‘
see https://github.com/Froxlor/Froxlor/issues/665
2019-03-16 13:02:01 +01:00
Michael Kaufmann
4028e3ba5c testing with new IdnaConverter seems to require php-7.1
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-03-10 17:16:59 +01:00
Michael Kaufmann
f7d24e8870 IdnaConverter repository changed url
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-03-10 17:13:51 +01:00
Michael Kaufmann
b1bbb1847d put log_format directive in correct context (http-context only); refs #663
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-03-08 13:23:38 +01:00
Michael Kaufmann
fb6e231f77 avoid passing non-variable as reference
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-03-01 10:40:01 +01:00
Michael Kaufmann
5786644c76 fix installation for current development for now; fixes #661
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-02-25 17:13:13 +01:00
Michael Kaufmann
51efba0a8d Check for SSL enabled vhost-container for ssl-related settings in froxlor-vhost-settings; fixes #642
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-02-24 09:03:03 +01:00
Michael Kaufmann
2f38de90e5 use DbManager for updating the password of a mysql-db
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-02-24 08:52:50 +01:00
Michael Kaufmann
410bfe2c97 fix typo in phpdoc
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-02-22 12:59:11 +01:00
Michael Kaufmann
cfae5b7516 fix deleting of certificate when certificate is froxor-vhost-certificate
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-02-21 14:18:00 +01:00
Michael Kaufmann
6e81c235d9 fix SAN domains for froxlor-vhost-aliases in let's encrypt
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-02-21 13:51:34 +01:00
Michael Kaufmann
0257149316 fix generation of serveralias in froxlor vhost
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-02-21 13:41:23 +01:00
Michael Kaufmann
ef331ccc81 Add setting to specify domain aliases for the froxlor-vhost (and add them to the SAN list of let's encrypt certificates if enabled)
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-02-21 12:54:53 +01:00
Michael Kaufmann
b187114c50 output real names in libnss-extrausers passwd file, fixes #659
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-02-21 10:31:05 +01:00
Michael Kaufmann
fdefd4f1fe fix re-enabling of database users after being deactivated, fixes #660
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-02-21 10:19:58 +01:00
Michael Kaufmann
4ec32c0972 set keysize to the former default and the default from installation
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-02-19 10:26:33 +01:00
Michael Kaufmann
111e9bf64b fix typo for getting Settings of lets encrypt keysize when not using ECC
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-02-19 09:58:28 +01:00
Michael Kaufmann
7d3577d649 fix superfluous ssl_key directive in dovoecot for stretch and xenial
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-02-18 19:14:48 +01:00
Michael Kaufmann
a8fb0a6d88 check for non-empty required field 'name' in hosting plans, which are still not fully migrated to API, refs #658
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-02-18 13:07:58 +01:00
Michael Kaufmann
8d628daf83 fix update of acmesh class in cronjobs_run
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-02-17 21:41:19 +01:00
Michael Kaufmann
010f30bc9e check for upgrade of acme.sh prior to issue/renew certifice, refs #657
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-02-17 20:48:11 +01:00
Michael Kaufmann
2273a11978 remove unneeded let's encrypt settings; self-update acme.sh only once a day
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-02-17 20:36:18 +01:00
Michael Kaufmann
5c36b79277 honor setting for let's encrypt key size if needed
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-02-17 19:47:51 +01:00
Michael Kaufmann
f5127eccd1 outsource acmesh-command to reduce duplicate code
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-02-17 19:43:12 +01:00
Michael Kaufmann
e962f76b32 Merge branch 'master' of github.com:Froxlor/Froxlor 2019-02-17 19:34:33 +01:00
Michael Kaufmann
6d8521d8dc Merge pull request #657 from patschi/patch-1
Run acme.sh upgrade just once when cron starts
2019-02-17 19:34:21 +01:00
Patrik Kernstock
7b231bb755 Run acme.sh upgrade just once when cron starts
Only run acme.sh upgrade command once when cronjob starts, and not everytime when there's a certificate going to be renewed.
2019-02-17 19:30:03 +01:00
Michael Kaufmann
459cbcc0dd keep re-use old-key setting for Let's Encrypt
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-02-17 19:25:23 +01:00
Michael Kaufmann
44433ef86e only variables can be passed by reference
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-02-17 18:24:31 +01:00
Michael Kaufmann
cb8e83bdfa use new AcmeSh class also in froxlor.sql
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-02-17 17:56:14 +01:00
Michael Kaufmann
84eec155de only empty the certificates if there's actually something to empty
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-02-17 16:57:03 +01:00
Michael Kaufmann
73a059b318 usinng acme.sh for issuing Let's Encrypt certificates now; please test thoroughly; fixes #651
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-02-17 16:17:35 +01:00
Michael Kaufmann
39d38eea8d fix missed cronlog variable usage in LetsEncrypt cron
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-02-15 13:58:29 +01:00
Michael Kaufmann
bfb7f28ff0 add linebreak after LogLevel
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-02-15 13:21:50 +01:00
Michael Kaufmann
036ec68651 fix unit-tests
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-02-13 21:59:01 +01:00
Michael Kaufmann
8cebcc8a5d allow DnsZone functions only if dns-editor is enabled AND the customer is allowed to use it
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-02-13 21:51:24 +01:00
Michael Kaufmann
fbcba3ef4e remove unnecessary if-statement in nginx when redirecting to https, thx to patschi; fixes #653
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-02-13 15:32:41 +01:00
Michael Kaufmann
fca7b95579 meh it's february already :P
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-02-12 17:42:36 +01:00
Michael Kaufmann
73c05fb231 add setting for customzing webserver error-log level, fixes #650
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-02-12 17:38:46 +01:00
Michael Kaufmann
d0fb77f3e9 Merge pull request #648 from princeofnaxos/Fix-english-typos
Corrections to the English texts
2019-02-11 16:18:50 +01:00
Edwin Boersma
32cf6dfaef Re-added missing line. 2019-02-11 16:17:17 +01:00
Michael Kaufmann
8ab86a05b2 disable settings in 'froxlor vhost settings' that wont have any effect if no IP/port has the 'create vHost container' option enabled; fixes #642
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-02-11 16:08:34 +01:00
Edwin Boersma
79b913131e Corrections to the English texts 2019-02-11 15:59:29 +01:00
Michael Kaufmann
8fd910a92e use correct settings-class
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-02-10 22:54:05 +01:00
Michael Kaufmann
2ce1a5abb5 ups, where did they go? :P
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-02-10 22:49:32 +01:00
Michael Kaufmann
8448a7141a do not add task 11 (delete domain from pdns db) if namserver is disabled and dns-server is not PowerDNS
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-02-09 11:56:15 +01:00
Michael Kaufmann
21f9a24780 remove 'change_date' field from pdns-records table as it is being removed in pdns >=4.2; fixes #645
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-02-08 07:59:02 +01:00
Michael Kaufmann
1b5e31e59d fallback to default froxlor newsfeed when no custom newsfeed (rss) is given if newsfeed is shown on customer dashboard
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-02-07 10:05:41 +01:00
Michael Kaufmann
03afbc902d fix static method not being declared as such
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-02-02 09:05:14 +01:00
Michael Kaufmann
83b760a43b add missing description for task 11
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-02-01 14:17:54 +01:00
Michael Kaufmann
c0e67dc240 fix incorrect usage of class-constant
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-01-30 12:32:06 +01:00
Michael Kaufmann
2166999fef fix logging in Nginx cron
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-01-26 10:23:56 +01:00
Michael Kaufmann
7bb7cc6a00 fix isbinddomain/zonefile field saving when editing domain, fixes #639
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-01-22 08:29:13 +01:00
Michael Kaufmann
8b96912ab4 correctly use system-setting of default-ttl, thx to K1rk
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-01-17 09:26:04 +01:00
Michael Kaufmann
de33ec509b move_to_admin is not a binary value, fixes #637
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-01-16 19:21:50 +01:00
Michael Kaufmann
5ecb43ba73 correct increasing/decreasing of admin-resources
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-01-16 15:14:22 +01:00
Michael Kaufmann
97ff3485b7 fix deletion of admins; fixes #638
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-01-16 10:59:32 +01:00
Michael Kaufmann
98daef7224 Merge pull request #635 from heavygale/patch-3
htpasswd only on configured paths
2019-01-14 06:31:42 +01:00
Max
2983aa5737 htpasswd only on given paths
Only apply htpasswd rules to (sub)domains if the rule's path begins with the domain's document root.
2019-01-14 00:18:26 +01:00
Michael Kaufmann
9a906427e7 ensure the replacing of the stdsubdomain url on update is encoded correctly
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-01-11 08:55:55 +01:00
Michael Kaufmann
7841eebf08 correct handling of storeSettingHostname when system.stdsubdomain is changed; refs #633
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-01-11 00:06:44 +01:00
Michael Kaufmann
b4597d54af create full dns zone if main-but-subdomain has dns enabled but maindomain to that domain does not, fixes #632
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-01-08 12:52:10 +01:00
Michael Kaufmann
19ffc9587a issubof Parameter in Domains.add and Domains.update is not boolean
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-01-08 11:18:53 +01:00
Michael Kaufmann
bbe0a0b3a5 Merge pull request #630 from princeofnaxos/master
Corrections to the Dutch translations
2019-01-07 11:12:37 +01:00
Edwin Boersma
0d30f71097 Corrections to the Dutch translations 2019-01-07 11:06:25 +01:00
Michael Kaufmann
0cc5693180 damn typo
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-01-06 08:54:49 +01:00
Michael Kaufmann
045a62a9db remove duplcate visible-field in admin-edit formfield; fixes #625
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-01-06 08:48:24 +01:00
Michael Kaufmann
725372b6ae add 4th parameter $step to Admins::increaseUsage(); fixes #628
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-01-06 08:45:24 +01:00
Michael Kaufmann
9e77fecc29 removed deprectated create_function statement; fixes #623
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-01-06 08:39:56 +01:00
Michael Kaufmann
44c47fa6eb Merge pull request #629 from PHPGangsta/composer_sugg
added ext-apcu and ext-readline to composer.json suggest block
2019-01-05 16:22:07 +01:00
Michael Kliewe
448de78ea5 added ext-apcu and ext-readline to composer.json suggest block 2019-01-05 13:31:26 +01:00
Michael Kaufmann
f3859052e5 fix getParamListFromDoc() for api doc
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-01-05 07:56:55 +01:00
Michael Kaufmann
2b4199e558 drop ADSP support, fixes #622
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-01-04 20:58:20 +01:00
Michael Kaufmann
b7585585dc also include table-definitions in external api.php
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-01-02 18:46:38 +01:00
Michael Kaufmann
92b133b11d fix Froxlor::listFunction() api-call after namespacing
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2019-01-02 18:36:01 +01:00
Michael Kaufmann
5dda57458a fix incorrect variable
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-28 15:18:56 +01:00
Michael Kaufmann
16efd1191a forgot to remove require of formfield-constants
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-26 21:12:58 +01:00
Michael Kaufmann
1c9d76725c get rid of last function file
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-26 20:54:00 +01:00
Michael Kaufmann
4ee735a81f Merge branch 'namespaces' 2018-12-26 20:38:05 +01:00
Michael Kaufmann
2ba8fa2785 Merge branch 'master' into namespaces 2018-12-26 20:37:47 +01:00
Michael Kaufmann
e64e8cafa6 define logger constants in logger class
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-26 15:51:26 +01:00
Michael Kaufmann
3949a6858b fixed to Cron
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-26 12:00:32 +01:00
Michael Kaufmann
792d25fdd8 add MysqlHandler for Monolog-Logger
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-25 08:48:28 +01:00
Michael Kaufmann
af5ef4b9dc Merge pull request #617 from JB1985/patch-3
Update logfiles_viewer.php
2018-12-25 07:54:10 +01:00
JB1985
bd79022475 Update logfiles_viewer.php
typo
2018-12-24 20:50:38 +01:00
Michael Kaufmann
684130871b forgot one function in Froxlor\PhpHelper
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-24 14:04:52 +01:00
Michael Kaufmann
7416a41a42 get rid of most of the checkstyle warnings
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-24 13:50:45 +01:00
Michael Kaufmann
30f5902b88 fix some more checkstyle issues
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-24 13:21:35 +01:00
Michael Kaufmann
35c631946d more and more checkstyle fixes
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-24 12:59:40 +01:00
Michael Kaufmann
585d42f1b8 more checkstyle fixes
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-24 12:02:26 +01:00
Michael Kaufmann
c3d44b4558 Minor enhancements and starting to comply with checkstyle
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-24 09:35:05 +01:00
Michael Kaufmann
04e87cce98 forgot to add a few statics... :p
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-23 19:49:10 +01:00
Michael Kaufmann
4cd005051b fixed last remaining function calls which are class-methods now
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-23 19:34:32 +01:00
Michael Kaufmann
e1987af34d [CI] add composer to build.xml; run PHPCompatibility check; run only phpunit in travis
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-23 10:39:27 +01:00
Michael Kaufmann
17c6b11a1b remove superfluous inserttask
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-22 21:11:43 +01:00
Michael Kaufmann
7170fab884 fix build-testing on jenkins
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-22 20:32:36 +01:00
Michael Kaufmann
7f82038255 fix up some cron related things
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-22 20:01:10 +01:00
Michael Kaufmann
c1cd0004bf fix saving of settings
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-22 15:52:20 +01:00
Michael Kaufmann
b43a63d665 also regenerate quota and cron.d if settings have changed
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-22 13:44:41 +01:00
Michael Kaufmann
3794003e63 minor fixes here and there
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-22 13:42:10 +01:00
Michael Kaufmann
13aa19e5f4 got rid of all global functions, I guess
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-22 13:28:51 +01:00
Michael Kaufmann
28bb614489 begin refactoring of form-stuff
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-22 11:57:54 +01:00
Michael Kaufmann
085d25346d remove unneeded include of functions.php
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-22 10:37:33 +01:00
Michael Kaufmann
685267d6fc fix CLI scripts
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-22 10:36:01 +01:00
Michael Kaufmann
0401e6971a Revert "refactor global array"
This reverts commit c5a58e3f36.
2018-12-22 08:15:31 +01:00
Michael Kaufmann
7e39a7bc60 Revert "refactor global array"
This reverts commit 370ccbdb74.
2018-12-22 08:15:31 +01:00
Michael Kaufmann
c800e89414 Revert "fix wrong usage of \Froxlor\User::getAll()"
This reverts commit 48ff2e6b6d.
2018-12-22 08:15:31 +01:00
Michael Kaufmann
e719731de0 Revert "argh..."
This reverts commit fed9efff41.
2018-12-22 08:15:30 +01:00
Michael Kaufmann
fed9efff41 argh...
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-21 21:00:35 +01:00
Michael Kaufmann
48ff2e6b6d fix wrong usage of \Froxlor\User::getAll()
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-21 20:56:47 +01:00
Michael Kaufmann
370ccbdb74 refactor global array
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-21 20:51:44 +01:00
Michael Kaufmann
c5a58e3f36 refactor global array
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-21 20:31:17 +01:00
Michael Kaufmann
5fa0f4b87e ugh, where was 2fa integration gone?
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-21 19:25:06 +01:00
Michael Kaufmann
7c68fa7bd0 fixed a few functions I've missed
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-21 19:16:49 +01:00
Michael Kaufmann
7563907df5 convert html-related functions
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-21 18:31:06 +01:00
Michael Kaufmann
def3d6d19e forgot generateDkimEntries()
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-21 17:56:23 +01:00
Michael Kaufmann
59453a47fa fix dns-related function calls
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-21 17:51:29 +01:00
Michael Kaufmann
1b090377ee even more function to class conversion
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-21 17:41:22 +01:00
Michael Kaufmann
b0e11f5708 and more and more and more
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-21 17:00:54 +01:00
Michael Kaufmann
a819d81ef2 more function reducing and fixing
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-21 16:53:04 +01:00
Michael Kaufmann
0a28ef2af6 minor changes for unit-tests
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-21 16:32:44 +01:00
Michael Kaufmann
1ba4164028 add new PHPMail Wrapper to avoid multiple setting of properties
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-21 14:49:55 +01:00
Michael Kaufmann
f9ad392e39 remove refactored functions
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-21 13:00:39 +01:00
Michael Kaufmann
97b5439c0d auto-format all files; add table-definitions to test-bootstrap file
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-21 12:24:07 +01:00
Michael Kaufmann
1ff784198c adjust paths to classes
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-21 11:31:41 +01:00
Michael Kaufmann
05402a4a1c add new namespaces branch to travis testing
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-21 11:26:25 +01:00
Michael Kaufmann
dd8fbf0900 add new namespaces branch to travis testing
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-21 11:25:48 +01:00
Michael Kaufmann
c0e89bbd05 refactor UI functions
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-21 11:22:03 +01:00
Michael Kaufmann
b0df4e46d6 convert validate/check functions
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-20 21:00:39 +01:00
Michael Kaufmann
5888927239 get rid of more functions
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-20 12:38:18 +01:00
Michael Kaufmann
f263175802 more function reduction
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-20 09:57:00 +01:00
Michael Kaufmann
bed069f269 more function moving
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-20 08:33:32 +01:00
Michael Kaufmann
8c896d60d6 get rid of some more functions
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-20 07:43:40 +01:00
Michael Kaufmann
adc627ca4e minor fixes to template engine for now
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-19 20:38:29 +01:00
Michael Kaufmann
d654b18517 get rid of storeSetting*-functions
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-19 19:58:14 +01:00
Michael Kaufmann
26510f0745 removing more ticket-stuff; update all unit-tests
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-19 19:42:50 +01:00
Michael Kaufmann
60f1db5caf LetEncrypt cronjob refactoring
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-19 17:31:03 +01:00
Michael Kaufmann
549ccda166 use safe_exec from class now
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-19 17:19:56 +01:00
Michael Kaufmann
c4024c8107 use correct makeCorrect(Dir/File) everywhere
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-19 17:13:41 +01:00
Michael Rosenberger
98f6ad183e Corrects annotations in API 2018-12-19 16:58:52 +01:00
Michael Kaufmann
8e84a4ff44 correct use of Database use
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-19 16:57:03 +01:00
Michael Kaufmann
2c893fef25 adjustments in settings-arrays
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-19 14:54:46 +01:00
Michael Kaufmann
e4a0cc73bd convert three more dns-related functions
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-19 14:38:45 +01:00
Michael Kaufmann
4c4b2a6df3 use TwoFactorAuth via composer
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-19 14:12:42 +01:00
Michael Kaufmann
28f24fda72 ported CLI stuff to namespaces-layout
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-19 13:59:11 +01:00
Michael Kaufmann
3ff20e327f removed ticketsystem; lots of work on cron stuff
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-19 13:09:14 +01:00
Michael Kaufmann
903b775f79 make cronjobs also classes and began to refactor the whole cronjob stuff
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-19 08:55:23 +01:00
Michael Kaufmann
a25150babf use correct Settings-class in templates
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-18 15:53:08 +01:00
Michael Kaufmann
a2f205bae3 Update class.SImExporter.php 2018-12-18 15:52:19 +01:00
Michael Kaufmann
a0125bb93e Update function.setCycleOfCronjob.php 2018-12-18 15:51:48 +01:00
Michael Kaufmann
6329042d40 use namespaces in modules
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-18 13:45:05 +01:00
Michael Kaufmann
9d314aaa3f use Monolog via composer instead of our own implementation, @TODO MySQL logging-handler
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-18 12:16:48 +01:00
Michael Kaufmann
fc0a495f2d use PHPMailer via composer
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-18 10:49:18 +01:00
Michael Kaufmann
c9ee2ae7e0 use IdnaConvert from composer
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-18 10:40:16 +01:00
Michael Kaufmann
4c27efa4ae put Api-Commands into namespaces
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-18 09:46:36 +01:00
Michael Kaufmann
c7e5df95e7 add psr-4 autoload to composer.json
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-18 08:40:04 +01:00
Michael Kaufmann
c3cc3d1f62 started to refactor functions to classes and use PSR-4 autoloader and namespacing
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-18 08:38:34 +01:00
Michael Kaufmann
ba93265ac6 Merge branch 'ServiusHack-write_no_log' 2018-12-17 12:22:02 +01:00
Michael Kaufmann
bf7df9a8d6 Merge branch 'write_no_log' of https://github.com/ServiusHack/Froxlor into ServiusHack-write_no_log 2018-12-17 12:21:49 +01:00
Michael Kaufmann
8b0966d332 do not generate ssl vhost with fallback ssl-certificate if file does not exist, fixes #614
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-16 20:21:53 +01:00
Michael Kaufmann
aa90747089 fix deleting of Certificates as admin with customer_see_all flag
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-16 09:27:31 +01:00
Michael Kaufmann
efe54d8b56 enhance config-services script a bit
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-15 22:22:37 +01:00
Michael Kaufmann
1e816de8cf refactor domainValidate() function; allow underscore in CNAME and SRV entries
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-14 11:51:19 +01:00
Michael Kaufmann
e3a78f0f84 Merge pull request #612 from foliengriller/install
Checks Mysql version only if no fatal error occured
2018-12-12 21:12:12 +01:00
Michael Rosenberger
d0c7706840 Checks Mysql version only if no fatal error occured
Otherwise it is not possible to install current master due to fatal error.
2018-12-12 20:54:56 +01:00
Michael Kaufmann
1a15cef76d when using --force on the cronjob it will now also re-set quotas if enabled
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-12 19:49:46 +01:00
Michael Kaufmann
dc44c67f86 do not show 'override fpmconfig' checkbox when not using php-fpm in php-configs
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-12 19:48:56 +01:00
Michael Kaufmann
ab819129dd return the subdomain-names in PhpSettings::listing() instead of only the amount
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-11 11:45:39 +01:00
Michael Kaufmann
8d966aebee Show number of subdomains that use a php-config; fixes #532
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-11 10:12:37 +01:00
Michael Kaufmann
4988600881 added new indicator whether services/system has been configured (on new installations); show alternative configuration possibility via config-services.php script
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-10 20:34:43 +01:00
Michael Kaufmann
d381528c06 reload fpm before nginx
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-09 11:51:43 +01:00
Michael Kaufmann
3d647a2c2e fix read in correct fpm-daemon config-id for nginx and lighttpd own-vhost, thx again to heavygale
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-09 11:05:36 +01:00
Michael Kaufmann
7e6180fed8 read in correct fpm-daemon config-id for nginx and lighttpd, thx to heavygale
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-09 10:45:22 +01:00
Michael Kaufmann
9e4ed645f7 use correct page title for php-fpm versions
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-09 10:29:19 +01:00
Michael Kaufmann
9522e0cfb1 fix typo and fix '"continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"' warning (as of php-7.3)
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-09 08:31:21 +01:00
Michael Kaufmann
db36d57683 fix an issue where the isemaildomain flag for a main-domain can be set to false when edited by customer
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-08 12:46:17 +01:00
Michael Kaufmann
ddddbdfb18 Merge pull request #609 from foliengriller/annotations
Improves annotations in /lib/classes/api/
2018-12-04 22:03:07 +01:00
Michael Rosenberger
df3ad9ed12 Improves annotations for API 2018-12-04 21:58:46 +01:00
Michael Kaufmann
456875905d set password compatibility for mysql8
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-04 19:52:18 +01:00
Michael Kaufmann
1707b5e7fd fix create user for mysql8 for good, thx to bimmer
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-04 17:33:58 +01:00
Michael Kaufmann
034d1b1c8e correct syntax for CREATE USER when using mysql8
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-04 15:42:05 +01:00
Michael Kaufmann
5dd915736b changed all boolean parameters to getBoolParam-function
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-04 14:40:11 +01:00
Michael Kaufmann
07d7908f6e added wrapper for boolean api-parameters, Domains-Module for now, more later; fixes #597
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-04 13:27:21 +01:00
Michael Kaufmann
cf53365007 update README and CONTRIBUTING files; added PULL_REQUEST_TEMPLATE; database user-creation fix for MySQL8
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-04 10:52:49 +01:00
Michael Kaufmann
1f2c1c1d2f Merge pull request #608 from foliengriller/openssl1
Ads missing extension openssl to composer.json
2018-12-03 21:41:30 +01:00
Michael Kaufmann
51390d8add Merge pull request #607 from foliengriller/caseMissmatch1
Corrects case missmatch of function calls
2018-12-03 21:37:35 +01:00
Michael Rosenberger
98120de7e1 Ads missing extension openssl to composer.json 2018-12-03 21:37:17 +01:00
Michael Rosenberger
88a2cb37c9 Case missmatch of function calls 2018-12-03 21:30:12 +01:00
Michael Kaufmann
ec4d34d37a let's see if that works :P
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-03 17:29:42 +01:00
Michael Kaufmann
0b3d532028 ups, how did these get lost?
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-03 17:18:44 +01:00
Michael Kaufmann
4a0be40f92 require php-5.6 for 0.10.0; fixes #606 and remove invalid value NO_AUTO_CREATE_USER in mysql-attributes for mysql8
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-03 17:15:54 +01:00
Michael Kaufmann
2da59f1055 do not rely on fixed order of import-file for domains-import; first line now has to be the names of the api-parameters used for Domains.add, see https://api.froxlor.org/doc/0.10.0/#v-Domains, fixes #544
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-02 20:06:53 +01:00
Michael Kaufmann
1ca1314ac4 fix typo in updater
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-02 19:27:50 +01:00
Michael Kaufmann
426e46a2df show registration date of domain (if given) in admin and customer domain-list, fixes #553
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-02 11:50:45 +01:00
Michael Kaufmann
212cb0140d ups minor CSS typo, refs #603
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-01 15:06:16 +01:00
Michael Kaufmann
8291c7d2ab Allow access to webserver logs via weinterface, if activated for customer; todo: view more content dynamically; fixes #603
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-12-01 13:33:08 +01:00
Michael Kaufmann
1bd4c00631 forgot to replace frontend variables with replacer
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-11-30 13:55:08 +01:00
Michael Kaufmann
69495b94af add 2FA mechanism, fixes #547
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-11-30 13:45:17 +01:00
Michael Kaufmann
29c754e700 add new CUSTOMER_HOMEDIR replacer for php-configs, thx to rubberduck for the hint
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-11-29 09:37:18 +01:00
Michael Kaufmann
fd69fc22db format composer.json and add php-7.0 as dev-requirement (phpunit6); add unit-test for Backup.add() when customer passes / as path value
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-11-28 13:17:44 +01:00
Michael Kaufmann
c7bee4edf2 update 0.9.x updater according to latest bugfix-release
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-11-27 18:53:37 +01:00
Michael Kaufmann
9756c792d7 disable sending of emails when running tests completely when run on travis
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-11-27 12:05:56 +01:00
Michael Kaufmann
a86f10a4b4 fix typo in function name, refs #601
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-11-27 11:49:32 +01:00
Michael Kaufmann
946c2507c5 last try before i branch for testing this - next time, really
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-11-26 22:00:50 +01:00
Michael Kaufmann
56ac4b5c26 last try before i branch for testing this :P
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-11-26 21:57:15 +01:00
Michael Kaufmann
e4becfb1dd add missing php-invoker stuff
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-11-26 21:50:35 +01:00
Michael Kaufmann
6129768711 actually use the required phpunit version pulled from composer
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-11-26 21:38:36 +01:00
Michael Kaufmann
72690e311f add specific phpunit version to dev-requirements
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-11-26 21:33:40 +01:00
Michael Kaufmann
2ef067e12d set a few settings according to the test-system
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-11-26 21:05:57 +01:00
Michael Kaufmann
ae71e3ad2a new try with travis-ci #last-really
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-11-26 20:29:27 +01:00
Michael Kaufmann
745621c416 new try with travis-ci #last
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-11-26 20:23:56 +01:00
Michael Kaufmann
069ccd24e6 new try with travis-ci #3
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-11-26 20:16:15 +01:00
Michael Kaufmann
76b5f813c5 new try with travis-ci #2
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-11-26 20:12:32 +01:00
Michael Kaufmann
9ad6616fa3 new try with travis-ci
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-11-26 20:09:27 +01:00
Michael Kaufmann
4dca2d6217 travis-ci testing...
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-11-26 20:00:40 +01:00
Michael Kaufmann
eab88abd54 Merge pull request #596 from foliengriller/composer-json
Adds first composer.json file
2018-11-26 20:00:08 +01:00
Michael Kaufmann
ea3c49befe Update composer.json 2018-11-26 19:56:39 +01:00
Michael Kaufmann
e1bfb2690d Update composer.json 2018-11-26 19:53:34 +01:00
Michael Kaufmann
091f92400b move integer-conversion of array to the place where the array is known
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-11-26 12:21:02 +01:00
Michael Kaufmann
18df961381 ensure allowed_phpconfigs parameter for Customers.add() and Customers.edit() is an integer-array, fixes #598
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-11-26 12:14:53 +01:00
Michael Kaufmann
18c49e4c48 Merge pull request #595 from foliengriller/gitignore
Improves gitignore and deletes unused .keep in /logs
2018-11-26 06:51:53 +01:00
Michael Rosenberger
4da9d4c7c0 Adds first composer.json file 2018-11-25 23:24:30 +01:00
Michael Rosenberger
9a528532d2 Improves gitignore and deletes unused .keep in /logs 2018-11-25 21:49:41 +01:00
Michael Kaufmann
96addebdf3 Merge pull request #594 from Broatcast/patch-1
Change formfield id for new admins
2018-11-25 17:42:06 +01:00
Michael Kaufmann
49adcb6886 Merge branch 'heavygale-master' 2018-11-25 17:38:05 +01:00
Michael Kaufmann
ed86c2a892 Merge branch 'master' of https://github.com/heavygale/Froxlor into heavygale-master 2018-11-25 17:37:52 +01:00
Robert Kuntz
7c7ef5be09 Change formfield id for new admins
little Bug, requested "new_loginname" instead of "loginname"
2018-11-25 17:30:48 +01:00
Michael Kaufmann
c269cd5c5c added unit-tests for version-check; implemented settings import/export in API; minor variable declarations
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-11-25 11:17:56 +01:00
Michael Kaufmann
f6e0298d25 more api-documentation and code-formatting
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-11-25 10:04:09 +01:00
Michael Kaufmann
983e1ce6ad add more api documenation
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-11-24 19:49:27 +01:00
Michael Kaufmann
a87f1c5561 trim ip-addresses for validation as they are invalid with leading/trailing spaces
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-11-24 07:53:08 +01:00
Michael Kaufmann
9d82f0d269 Merge pull request #593 from foliengriller/master
Improves CSS in installer
2018-11-23 14:55:14 +01:00
Michael Rosenberger
32b5bef221 Improves CSS in installer
Correct alignment of radio options
Fixes design-problem with chrome
2018-11-23 14:34:11 +01:00
Michael Kaufmann
50eec8d8a7 Merge pull request #592 from foliengriller/master
Some minor CSS improvements
2018-11-23 11:18:45 +01:00
Michael Kaufmann
fc8373f6b6 fix unit-test testCustomerEmailForwardersDelete() to comply with new testCustomerEmailForwardersAddWithSpaces()
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-11-23 09:06:23 +01:00
Michael Kaufmann
1d3d8d0f28 trim email address when added as forwarder, fixes #591
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-11-23 09:03:35 +01:00
Michael Rosenberger
b9e4adc634 Some minor CSS improvements
- Removes unit if value is 0
- Uses shorthand notation where possible

Signed-off-by: Michael Rosenberger <mr@simpelwebservice.de>
2018-11-22 23:38:54 +01:00
Michael Kaufmann
3a3b35b2eb add ipv6 support for resolving nameserver-hostnames
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-11-21 19:26:19 +01:00
Michael Kaufmann
8a565532b2 more api-doc
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-11-19 20:38:18 +01:00
Michael Kaufmann
02ba4b5f67 Merge branch 'master' of github.com:Froxlor/Froxlor 2018-11-18 20:35:47 +01:00
Michael Kaufmann
b032f5b2ba add dhparams for webserver/ssl, refs #519
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-11-18 20:35:27 +01:00
Michael Kaufmann
758111a7c1 Merge pull request #589 from heavygale/patch-2
Update list.tpl
2018-11-18 15:20:34 +01:00
Max
ba124c99af Update list.tpl 2018-11-18 15:09:59 +01:00
Michael Kaufmann
776bb56b24 add more phpdoc to DomainZones ApiCommand; minor fixes in DirOptions and DirProtections
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-11-18 15:07:06 +01:00
Michael Kaufmann
d2024e06ff more phpdoc in DirOptions and DirProtections
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-11-18 14:54:20 +01:00
Michael Kaufmann
8c8be45769 added more phpdoc for api-documentation
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-11-18 14:39:20 +01:00
Michael Kaufmann
892d259805 Also remove DNS zones of deleted Subdomains, refs #581
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-11-17 20:19:29 +01:00
Michael Kaufmann
13c624400e remove domain from pdns database if removed or updated so nameserver is disabled (remove) or update of db triggered when isemaildomain option is disabled, fixes #581
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-11-17 20:14:58 +01:00
Michael Kaufmann
e184201327 minor cosmetic changes and new create_customer api example
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-11-13 08:30:41 +01:00
Michael Kaufmann
059e36aa78 finish testing of Traffic ApiCommand
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-11-12 07:44:35 +01:00
Michael Kaufmann
18aa8eb5d2 added Traffic.listing ApiCommand; added first Unit-Tests for Traffic-Api; SQL IN-clause cannot be prepared, replaced all occurances accordingly; added --no-fork parameter to traffic-cron
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-11-11 21:51:39 +01:00
Michael Kaufmann
41acbc745c Merge remote-tracking branch 'origin/0.10.0' 2018-11-10 12:03:23 +01:00
Michael Kaufmann
ab81004bf2 Merge branch 'master' into 0.10.0 2018-11-10 11:58:17 +01:00
Michael Kaufmann
d80cf6525c Merge remote-tracking branch 'origin/master' into 0.10.0 2018-11-10 11:55:39 +01:00
Michael Kaufmann
247efb1c0a set version to 0.9.40 for upcoming release
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-11-10 11:34:50 +01:00
Michael Kaufmann
e1b62d3af4 outsource apihelp to api.froxlor.org
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-11-10 07:17:13 +01:00
Michael Kaufmann
b340221055 update Traffic Api-Command
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-10-29 08:56:23 +01:00
Michael Kaufmann
e16ea186dc add some more unit-tests for Cronjobs and PhpSettings
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-10-28 13:47:19 +01:00
Michael Kaufmann
ce2722d429 forgot to tell phpunit which files is being covered, stupid copy'n'paste
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-10-28 09:00:04 +01:00
Michael Kaufmann
e0a195e3bc forgot to add tests/Cronjobs to the unit-test directories
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-10-28 08:57:43 +01:00
Michael Kaufmann
899a7ac189 add Cronjobs API command ad unit-tests
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-10-28 08:53:25 +01:00
Michael Kaufmann
fb4d379047 Merge remote-tracking branch 'origin/master' into 0.10.0 2018-10-27 19:57:55 +02:00
Michael Kaufmann
98c55435ae Merge pull request #583 from heavygale/patch-1
Update archive.tpl
2018-10-27 17:14:28 +02:00
Max
981f5840b3 Update archive.tpl 2018-10-27 14:57:27 +02:00
Michael Kaufmann
4efdb0cd66 add example of API usage
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-10-27 10:56:42 +02:00
Max
06dcaeacb5 Update german.lng.php 2018-10-21 12:02:10 +02:00
Max
14112bf5d7 Update german.lng.php 2018-10-20 16:39:21 +02:00
Max
c55ef54937 Update german.lng.php 2018-10-20 16:37:24 +02:00
heavygale
2e65de176b Update lng/german.lng.php 2018-10-20 16:10:27 +02:00
Michael Kaufmann
3b31cd8432 Merge remote-tracking branch 'origin/master' into 0.10.0 2018-10-20 14:06:19 +02:00
Michael Kaufmann
c1809fc084 Merge pull request #579 from quthla/patch-1
Add TLSv1.3
2018-10-20 14:02:17 +02:00
quthla
090bdaaea8 Add TLSv1.3 2018-10-20 13:29:25 +02:00
Michael Kaufmann
611bec6849 Merge pull request #578 from stweil/lgtm
Fix warnings from LGTM
2018-10-17 11:55:36 +02:00
Stefan Weil
8cf797374d Add missing variable declarations
This fixes warnings from LGTM:

    Variable i is used like a local variable,
    but is missing a declaration.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-10-17 11:49:59 +02:00
Stefan Weil
20177e06fc Add missing semicolons
This fixes warnings from LGTM:

    Avoid automated semicolon insertion (91% of all statements
    in the enclosing function have an explicit semicolon).

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-10-17 11:45:25 +02:00
Severin Leonhardt
d76df274f4 Make writing AccessLog and ErrorLog optional 2018-10-11 19:07:09 +02:00
Michael Kaufmann
95b305b865 Merge remote-tracking branch 'origin/master' into 0.10.0 2018-10-11 14:57:53 +02:00
Michael Kaufmann
aa6f3d33eb clearify description and enhance validation for path-field in backup-job-planning
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-10-11 14:52:45 +02:00
Michael Kaufmann
b6e4dbd70a fix saving of apikey allowed-from setting
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-10-09 10:37:27 +02:00
Michael Kaufmann
854986abcb add some more function-doc; add setting to enable/disable api in system-settings; added last three api-command classes (empty so far)
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-10-08 09:35:15 +02:00
Michael Kaufmann
c35407bc94 fix undefined debug-flag if not present
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-09-30 10:18:19 +02:00
Michael Kaufmann
5752f7b64e Merge remote-tracking branch 'origin/master' into 0.10.0 2018-09-30 10:04:15 +02:00
Michael Kaufmann
23d4bee184 add override-required info to php-config edit formfields like in add formfields, refs #573
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-09-28 11:00:56 +02:00
Michael Kaufmann
37988fa645 forgot to add override_fpmconfig flag to panel_phpconfigs, refs #573
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-09-28 10:57:43 +02:00
Michael Kaufmann
6c7ee0c222 add possibility to specify pm-related settings per php-config (if override of fpm-daemon settings is set to yes), fixes #573
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-09-28 10:55:08 +02:00
Michael Kaufmann
108c4c25b3 move 'enable http/2' setting from froxlor-vhost-settings to webserver-settings, fixes #575
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-09-26 13:29:30 +02:00
Michael Kaufmann
095e54d88d fix missing update in version.inc.php
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-09-25 08:17:31 +02:00
Michael Kaufmann
70cb760862 fix missing update in version.inc.php
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-09-25 08:16:54 +02:00
Michael Kaufmann
738e629eec Merge remote-tracking branch 'origin/master' into 0.10.0 2018-09-25 08:14:16 +02:00
Michael Kaufmann
bd036a0fde remove unnecessary string-break; use standardlanguage-variable as fallback language for installer
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-09-25 08:12:21 +02:00
Michael Kaufmann
f766c6f920 Merge pull request #572 from markuspetermann/master
Fixed class.lescript_v2.php to work with ACMEv2
2018-09-25 08:09:16 +02:00
Markus Petermann
4588bc7f5c Merge branch 'master' of github.com:markuspetermann/Froxlor 2018-09-19 15:14:46 +02:00
Markus Petermann
9e289a2380 Fixed class.lescript_v2.php to work with ACMEv2
Account(kid) needs to be saved for future requests.
Install/Update part is untested.
2018-09-19 15:11:27 +02:00
Michael Kaufmann
f0edf97ac7 do not follow url location/redirect when using LE selfcheck
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-09-19 11:15:42 +02:00
Michael Kaufmann
91195fda89 check for all needed php extensions and mysqldump tool in setup process, fixes #569
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-09-19 11:15:03 +02:00
Michael Kaufmann
6161ad1bd3 make CURLOPT_FOLLOWLOCATION optional in HttpClient::urlGet
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-09-19 11:09:27 +02:00
Michael Kaufmann
f72d87228b restrict sending of emails when user is locked
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-09-19 11:07:54 +02:00
Markus Petermann
4f0acd176a Fixed class.lescript_v2.php to work with ACMEv2
Account(kid) needs to be saved for future requests.
Install/Update part is untested.
2018-09-18 02:20:17 +02:00
Markus Petermann
5f29b2cc4a Fixed class.lescript_v2.php to work with ACMEv2
When requesting a certificate for multiple Domains/SANs, the request must be done in a single order.
2018-09-18 00:53:51 +02:00
Michael Kaufmann
164f1a921e Merge pull request #570 from markuspetermann/patch-1
Fixed class.lescript_v2.php to work with ACMEv2
2018-09-15 13:25:01 +02:00
markuspetermann
94c4d52476 Fixed class.lescript_v2.php to work with ACMEv2
As GET /document never returns any Reply-Nonce Header, getLastNonce() caused an infinite loop.
The Content-Type for v2 must be application/jose+json.
2018-09-15 12:41:27 +02:00
Michael Kaufmann
174739bc0c Merge remote-tracking branch 'origin/master' into 0.10.0 2018-08-15 10:59:36 +02:00
Michael Kaufmann
b777053133 allow a higher amount of diskspace and traffic to be entered in the forms, fixes #560
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-08-15 10:59:16 +02:00
Michael Kaufmann
d0c2888508 Merge pull request #494 from xelaz/master
extend nginx letsencrypt (.well-known) redirect regex to https
2018-08-15 08:03:45 +02:00
Michael Kaufmann
ff8afef614 Merge pull request #563 from Froxlor/revert-561-patch-1
Revert "acme challenges can include hyphens (-)"
2018-08-12 18:11:45 +02:00
Michael Kaufmann
a28b2e8115 Revert "acme challenges can include hyphens (-)" 2018-08-12 18:11:36 +02:00
Michael Kaufmann
b0e348a2c5 Merge pull request #561 from oliverrahner/patch-1
acme challenges can include hyphens (-)
2018-08-12 17:09:03 +02:00
Oliver Rahner
512abda38d acme challenges can include hyphens (-)
made a small adjustment so that acme challenges like "CrgFuFZU-U7mwXxjjHZi8if851XGVjdPRtWN91LTWmM" also don't get redirected
2018-08-09 16:33:27 +02:00
Michael Kaufmann
963c7c4616 Merge remote-tracking branch 'origin/master' into 0.10.0 2018-07-10 09:47:20 +02:00
Michael Kaufmann
1690cadab9 show link to clear plaintext email account passwords if enabled; set store-plaintext-passwords default to 'off'; fixes #557
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
2018-07-10 09:47:01 +02:00
Michael Kaufmann
9e7715430b fix editing api-keys as customer
Signed-off-by: Michael Kaufmann <michael.kaufmann@aixit.com>
2018-06-23 09:27:56 +02:00
Michael Kaufmann
4f69571e1c do not reload current page after apikey modification to prevent unwanted actions being executed (addKey)
Signed-off-by: Michael Kaufmann <michael.kaufmann@aixit.com>
2018-06-22 10:13:48 +02:00
Michael Kaufmann
d4312fc481 update jquery/jquery-ui; fininshed api_key editing (needs a bit more validating); added PhpSettings-Unit-test
Signed-off-by: Michael Kaufmann <michael.kaufmann@aixit.com>
2018-06-22 10:05:04 +02:00
Michael Kaufmann
f1d91dfef8 interface adjustments for apikey interaction
Signed-off-by: Michael Kaufmann <michael.kaufmann@aixit.com>
2018-06-21 08:21:27 +02:00
Michael Kaufmann
f198833f8c Merge remote-tracking branch 'origin/master' into 0.10.0 2018-06-21 08:12:00 +02:00
Michael Kaufmann
da99398561 update jquery-ui
Signed-off-by: Michael Kaufmann <michael.kaufmann@aixit.com>
2018-06-21 07:55:35 +02:00
Michael Kaufmann
436d141bd1 fix ticket access when posting answer
Signed-off-by: Michael Kaufmann <michael.kaufmann@aixit.com>
2018-06-21 07:52:11 +02:00
Michael Kaufmann
aa881560cc deny access to tickets not owned by current user, thx to chbi
Signed-off-by: Michael Kaufmann <michael.kaufmann@aixit.com>
2018-06-19 21:46:11 +02:00
Michael Kaufmann
06ef81cc5b adjust year in copyright in std-customer-index file, thx to demlak
Signed-off-by: Michael Kaufmann <michael.kaufmann@aixit.com>
2018-06-17 09:41:31 +02:00
Michael Kaufmann
4a99e4ba57 Merge pull request #556 from nachtgeist/master
fix triggering an LE CSR when changing www on a main domain, fixes #526
2018-06-05 07:52:03 +02:00
Daniel Reichelt
2ba4137e7d fix triggering an LE CSR when changing www on a main domain
Prior to this, LE CSRs were triggered only when the wwwserveralias was
changed on alias domains, but not on main domains.

Fixes #526
2018-06-05 06:51:20 +02:00
Daniel Reichelt
72835c56ad trim trailing whitespace 2018-06-05 06:51:10 +02:00
Michael Kaufmann
d39cebc70e Merge remote-tracking branch 'origin/master' into 0.10.0 2018-06-01 08:01:09 +02:00
Michael Kaufmann
b80bdcbc4f forgot to add version file
Signed-off-by: Michael Kaufmann <michael.kaufmann@aixit.com>
2018-05-29 15:54:44 +02:00
Michael Kaufmann
c1e62e6be7 get rid of serialization completely to avoid possible code execution, fixes #555
Signed-off-by: Michael Kaufmann <michael.kaufmann@aixit.com>
2018-05-29 15:47:41 +02:00
Michael Kaufmann
10330f8a7a fix fallback redirect code when customredirect is enabled and default is selected
Signed-off-by: Michael Kaufmann <michael.kaufmann@aixit.com>
2018-05-24 17:44:36 +02:00
Michael Kaufmann
18fb422a69 correct order of settings
Signed-off-by: Michael Kaufmann <michael.kaufmann@aixit.com>
2018-05-24 14:50:52 +02:00
Michael Kaufmann
f8236dff7b fix not quite correctly webserver-log-piping
Signed-off-by: Michael Kaufmann <michael.kaufmann@aixit.com>
2018-05-24 14:44:59 +02:00
Michael Kaufmann
8ccb898aa9 Merge remote-tracking branch 'origin/master' into 0.10.0 2018-05-24 13:25:24 +02:00
Michael Kaufmann
bad680cfdb enhancements for webserver-log settings
Signed-off-by: Michael Kaufmann <michael.kaufmann@aixit.com>
2018-05-24 13:23:37 +02:00
Michael Kaufmann
5a070d6d91 add settings to customize webserver logs
Signed-off-by: Michael Kaufmann <michael.kaufmann@aixit.com>
2018-05-24 11:36:13 +02:00
Robert Förster (Dessa)
07a3f76568 remove wheezy configs 2018-05-10 16:42:27 +02:00
Michael Kaufmann
d07d63e240 Merge remote-tracking branch 'origin/master' into 0.10.0 2018-05-07 10:57:55 +02:00
Michael Kaufmann
67b95a301b check only for existing .conf files when trying to find out whether a fpm pool config directory is empty; fixes #543
Signed-off-by: Michael Kaufmann <michael.kaufmann@aixit.com>
2018-05-06 14:38:18 +02:00
Michael Kaufmann
926914788f Merge remote-tracking branch 'origin/master' into 0.10.0 2018-04-25 12:30:00 +02:00
Michael Kaufmann
6f9187d1bb Merge branch 'master' of github.com:Froxlor/Froxlor 2018-04-25 12:29:41 +02:00
Michael Kaufmann
84b8cda7ac allow usage of up to 255 characters in a txt record, fixes #548
Signed-off-by: Michael Kaufmann <michael.kaufmann@aixit.com>
2018-04-25 12:29:30 +02:00
Michael Kaufmann
75616cc727 fix typo in german language file
Signed-off-by: Michael Kaufmann <michael.kaufmann@aixit.com>
2018-04-25 12:27:59 +02:00
Michael Kaufmann
b3d018c506 corrected usage of default redirect code from settings; fixes #546
Signed-off-by: Michael Kaufmann <michael.kaufmann@aixit.com>
2018-04-25 12:27:40 +02:00
Robert Förster (Dessa)
2508d855e3 deprecate precise, as xenial configs are now available 2018-04-03 13:12:32 +02:00
Erik
a21f3c5a3f added xenial.xml (#533)
* added xenial.xml

* fixed touch commands as in commit 3c802038f2

* changed a2dismod php to a2dismod php7.0

* fixed overlooked a2dismod php to a2dismod php7.0
2018-04-03 12:59:14 +02:00
Michael Kaufmann (d00p)
060115c5e9 added new ApiParameterTest
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-04-01 10:35:55 +02:00
Michael Kaufmann (d00p)
697d972fba Merge remote-tracking branch 'origin/master' into 0.10.0 2018-04-01 10:35:33 +02:00
Michael Kaufmann (d00p)
3f69c97874 opzimize ApiParameter::getModFunctionString(); corrected FpmDaemons::update(); added a few more unit-tests
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-04-01 10:31:38 +02:00
Michael Kaufmann (d00p)
85407abfb4 optimize stats-folder-decision in Customers-ApiCommand
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-04-01 09:59:25 +02:00
Michael Kaufmann
20d9be537a Merge pull request #542 from d00p/patch-1
Update README.md
2018-03-29 13:11:11 +02:00
Michael Kaufmann
30d39d622d Update README.md 2018-03-29 13:10:33 +02:00
Michael Kaufmann (d00p)
e58192edc2 show whether curl extension is installed when trying to check for a new version in admin-dashboard
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-03-29 11:11:39 +02:00
Michael Kaufmann (d00p)
d15e4a8270 more unit-tests
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-03-27 14:43:24 +02:00
Michael Kaufmann (d00p)
45d7307a8f fix phpunit test for FpmDaemonTest
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-03-26 14:33:43 +02:00
Michael Kaufmann (d00p)
bf3ae3009f add tests/PhpAndFpm to phpunit-testsuite
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-03-26 14:28:32 +02:00
Michael Kaufmann (d00p)
cb3d5f3488 unit-test FpmDaemons-ApiCommand
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-03-26 14:26:05 +02:00
Michael Kaufmann (d00p)
efb416ae7c phpdoc for Admins-ApiCommand
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-03-26 10:13:51 +02:00
Michael Kaufmann (d00p)
c98be3c04f finished unit-tests for Mysqls-ApiCommand
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-03-26 09:53:09 +02:00
Michael Kaufmann (d00p)
6006b16c95 added first test for Mysqls-ApiCommand
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-03-25 12:38:57 +02:00
Michael Kaufmann (d00p)
c149cbacf7 more DomainZones unit-tests
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-03-23 13:35:50 +01:00
Michael Kaufmann (d00p)
48d7110779 add first unit tests for DomainZones ApiCommand
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-03-22 14:56:18 +01:00
Michael Kaufmann (d00p)
bd7f2c2654 add unit-tests for CustomerBackup-ApiCommand
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-03-21 20:22:43 +01:00
Michael Kaufmann (d00p)
5123b5fccd fix error-display in dns_editor.php
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-03-20 08:55:14 +01:00
Michael Kaufmann (d00p)
190c95baca created DomainZones ApiCommand
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-03-19 21:25:23 +01:00
Michael Kaufmann (d00p)
975d46044d added unit-tests for DirOptions
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-03-19 20:38:59 +01:00
Michael Kaufmann (d00p)
bf589cdec8 forgot to check for customer-id in CustomerBackups.delete()
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-03-19 10:52:38 +01:00
Michael Kaufmann (d00p)
715e5f7a64 fix update of domain as admin if domain is a std-subdomain; fix update of mysql-entry; add CustomerBackups-ApiCommand
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-03-19 10:45:12 +01:00
Michael Kaufmann (d00p)
dfcb7160cb fix global lng-array
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-03-18 08:45:20 +01:00
Michael Kaufmann (d00p)
f5654d5931 fix var-names in DirOptions-ApiCommand; fix pmd issues
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-03-18 08:42:22 +01:00
Michael Kaufmann (d00p)
2bf5fde0e5 Merge remote-tracking branch 'origin/master' into 0.10.0 2018-03-16 09:19:52 +01:00
Michael Kaufmann (d00p)
be0099bf01 add duplicate check to switch-server-ip script
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-03-16 09:18:02 +01:00
Michael Kaufmann (d00p)
7a68dfc450 DirProtections and DirOptions stuff
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-03-15 19:35:56 +01:00
Michael Kaufmann (d00p)
858a9ba6a4 added DirProtections.update() and various unit-tests
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-03-15 11:01:17 +01:00
Michael Kaufmann (d00p)
f2809c47ac finished DirProtections.add() and some basic tests
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-03-14 19:41:12 +01:00
Michael Kaufmann (d00p)
616fb77de5 check for installed/configured froxlor in api.php and return 404 if not
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-03-14 18:13:32 +01:00
Michael Kaufmann (d00p)
b03d41087a Merge remote-tracking branch 'origin/master' into 0.10.0 2018-03-14 11:41:42 +01:00
Michael Kaufmann (d00p)
724e88b94f rename handler php5-fastcgi to php-fastcgi, just cosmetics; fixes #536
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-03-14 11:37:45 +01:00
Michael Kaufmann (d00p)
3c802038f2 split touch-command for multiple files into single ones, fixes #535
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-03-14 11:35:03 +01:00
Michael Kaufmann (d00p)
fe385b7800 Merge remote-tracking branch 'origin/master' into 0.10.0 2018-03-13 10:41:01 +01:00
Michael Kaufmann (d00p)
38b57117e2 minor fixes in froxlor-sql file
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-03-13 10:40:45 +01:00
Michael Kaufmann (d00p)
7e47383ee3 ignore NumberOfChildren pmd warning
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-03-12 22:12:16 +01:00
Michael Kaufmann (d00p)
ae3d954766 started work on DirProtections-ApiCommand
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-03-12 22:07:51 +01:00
Michael Kaufmann (d00p)
52da7ad40f exclude some irritating pmd rules #2
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-03-12 21:47:14 +01:00
Michael Kaufmann (d00p)
309e613c83 exclude some irritating pmd rules
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-03-12 21:40:19 +01:00
Michael Kaufmann (d00p)
05857985f8 add more tests for Email-ApiCommands
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-03-12 21:29:03 +01:00
Michael Kaufmann (d00p)
a7523bbdea add domainid to result-list of Emails.get(); fix typo in EmailAccounts.add(); enhance debugging in Database-class
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-03-12 15:52:34 +01:00
Michael Kaufmann (d00p)
54deec87d0 add a few emails-apicommand unit-tests
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-03-12 15:41:08 +01:00
Michael Kaufmann (d00p)
f0e084ef0e minor fixes in EmailAccounts.update()
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-03-12 14:17:45 +01:00
Michael Kaufmann (d00p)
fa7bb53d58 added EmailAccounts-ApiCommand
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-03-12 14:13:35 +01:00
Michael Kaufmann (d00p)
6fc8cce8f5 add EmailAccounts.add; added wrapper function ApiCommand.getMailTemplate() to reduce code-duplication
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-03-12 13:44:44 +01:00
Michael Kaufmann (d00p)
2e597ef7d9 remove unused local variables
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-03-12 11:09:30 +01:00
Michael Kaufmann (d00p)
ff611fa8dc fix parameter for ApiCommand::getCustomerData()
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-03-12 10:57:31 +01:00
Michael Kaufmann (d00p)
c920bf6a63 some code-reduction
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-03-12 10:45:46 +01:00
Michael Kaufmann (d00p)
66ebfaf21b Merge remote-tracking branch 'origin/master' into 0.10.0 2018-03-12 10:23:53 +01:00
Michael Kaufmann (d00p)
349fa7a761 avoid possible undefined index if no issuer-organisation is set in a certificate
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-03-12 10:22:50 +01:00
Michael Kaufmann (d00p)
81bd9d945d fix parameter customerid for Emails.add() in unit-test
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-03-11 10:26:05 +01:00
Michael Kaufmann (d00p)
b205f8ea5d add EmailFowarders ApiCommand
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-03-11 10:24:17 +01:00
Michael Kaufmann (d00p)
7b52c0c78c fix default value of panel.no_robots settings; add phpdoc for Database-class-methods
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-03-08 17:03:17 +01:00
Michael Kaufmann (d00p)
164650adc3 added Emails.update() and Emails.delete() commands
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-03-08 11:49:28 +01:00
Michael Kaufmann (d00p)
9e97e82990 Merge remote-tracking branch 'origin/master' into 0.10.0 2018-03-06 21:08:02 +01:00
Michael Kaufmann (d00p)
cd5cef51e8 allow config and settings json file for config-services.php to be downloaded from a remote url
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-03-06 21:07:08 +01:00
Michael Kaufmann (d00p)
231159a6c6 added first methods of Emails ApiCommand
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-03-06 14:02:27 +01:00
Michael Kaufmann (d00p)
a83031504f implement generating of api-key for customer
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-03-06 12:43:24 +01:00
Michael Kaufmann (d00p)
893fd0774c implement deleting of api-keys via webinterface
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-03-06 12:26:41 +01:00
Michael Kaufmann (d00p)
704188fe27 Merge remote-tracking branch 'origin/master' into 0.10.0 2018-03-06 11:06:31 +01:00
Michael Kaufmann (d00p)
a621fd3b09 run cronjob at the end of config-services script (when using --apply), thx v3ng
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-03-06 11:05:26 +01:00
Michael Kaufmann (d00p)
0c43c5d2b5 backport config-services --import-settings parameter from 0.10.0
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-03-06 10:52:57 +01:00
Michael Kaufmann (d00p)
864331d371 code reduction; added unit-tests for Certificates-Command; minor fixes here and there
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-03-05 23:35:00 +01:00
Michael Kaufmann (d00p)
f5ec759d99 added Certificates-ApiCommand
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-03-05 14:21:36 +01:00
Michael Kaufmann (d00p)
b2e2590324 implemented SubDomains.update; minor fixes and enhancements in Domains-Command and validateUrl-function
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-03-05 12:13:01 +01:00
Michael Kaufmann (d00p)
ae4a7ff943 wrap ip-validating in Domains-ApiCommand to reduce duplicate code
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-03-05 08:12:08 +01:00
Michael Kaufmann (d00p)
a869bc58cd fix wrong variable-name in SubDomains.listing
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-03-04 19:47:48 +01:00
Michael Kaufmann (d00p)
cfa07bab47 simplified and wrapped internal api calls
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-03-04 18:30:16 +01:00
Michael Kaufmann (d00p)
b664917147 fix sql variable in Admins.delete
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-03-04 12:44:31 +01:00
Michael Kaufmann (d00p)
b12392f0a9 Merge remote-tracking branch 'origin/master' into 0.10.0 2018-03-04 12:40:55 +01:00
Michael Kaufmann (d00p)
b07d6ceeaa started UI api-key management
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-03-04 12:40:47 +01:00
Michael Kaufmann
aff6d82321 Merge pull request #531 from Crease29/patch-1
Link domains to HTTPS in certificate list
2018-03-04 12:11:12 +01:00
Kai Neuwerth
91cecf8c1e Link domains to HTTPS in certificate list
As an admin I want to check if the certificate of a website is working.
Therefore I click on the domain in the SSL certificate list and have to prepend "https" to the URL later.
In this case I'd link the domain to HTTPS initially.
2018-03-04 11:43:50 +01:00
Michael Kaufmann (d00p)
702b52d13e forgot to save again
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-03-03 21:42:34 +01:00
Michael Kaufmann (d00p)
bb3fddb08f optimize phpmd config
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-03-03 21:39:51 +01:00
Michael Kaufmann (d00p)
7cc17b9ca5 fix short variables
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-03-03 21:29:16 +01:00
Michael Kaufmann (d00p)
f30887e3c0 removed unused local variables
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-03-03 21:26:37 +01:00
Michael Kaufmann (d00p)
0d7afc5c24 fixes in move-domain-to-another-customer functionality in Domains.update
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-03-03 21:10:58 +01:00
Michael Kaufmann (d00p)
826f1378d2 minor fixes to Domains.update + another unit-test
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-03-03 15:55:23 +01:00
Michael Kaufmann (d00p)
6d8b22dccf Merge remote-tracking branch 'origin/master' into 0.10.0 2018-03-03 14:58:46 +01:00
Michael Kaufmann
26c3c8e6f0 Merge pull request #527 from JB1985/patch-2
Update german.lng.php
2018-03-03 14:58:38 +01:00
Michael Kaufmann (d00p)
0f6cc05089 Merge remote-tracking branch 'origin/master' into 0.10.0 2018-03-03 14:58:06 +01:00
Michael Kaufmann
08814f8c9a Merge pull request #530 from michaelzangl/fix-hostname-error-message
Fix hostname error message
2018-03-03 14:57:22 +01:00
Michael Kaufmann
632eb98df9 Merge pull request #529 from michaelzangl/fix-installer-path
Froxlor installer: Use same file path for chmod.
2018-03-03 13:05:59 +01:00
Michael Zangl
909c983aec Fix invalidhostname error message (de). 2018-03-03 11:49:58 +01:00
Michael Zangl
8642254175 Fix invalidhostname error message. 2018-03-03 11:48:26 +01:00
Michael Zangl
7e81b0bb5a Froxlor installer: Use same file path for chmod. 2018-03-03 11:18:28 +01:00
Michael Kaufmann (d00p)
22a48cac33 Merge remote-tracking branch 'origin/master' into 0.10.0 2018-03-02 19:37:32 +01:00
Michael Kaufmann (d00p)
20eaa7bc08 fix missing sql-prepared-statement parameter, fixes #528
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-03-02 19:36:56 +01:00
Michael Kaufmann (d00p)
1605d2af07 enhance phpdox config
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-03-02 18:25:06 +01:00
JB1985
abb94c9189 Update german.lng.php
Übersetzung Änderung von Lets Encrypt
2018-03-02 17:28:30 +01:00
Michael Kaufmann (d00p)
cadb6618ec list() is a reserved php keyword, changed ApiCommand::list() to ApiCommand::listing()
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-03-02 17:22:47 +01:00
Michael Kaufmann (d00p)
594512404f optimized CustomersTest and DomainsTest; minor fixes in SubDomains-ApiCommand; added more tests for SubDomains-Command
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-03-02 15:24:46 +01:00
Michael Kaufmann (d00p)
aeb8655cc3 fix sql query in Domains.get; minor fixes in Domains.update; first unit-test for Domains.update
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-03-01 19:59:27 +01:00
Michael Kaufmann (d00p)
601d16b17c minor fixes in Domains.add; added more tests
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-03-01 19:41:57 +01:00
Michael Kaufmann (d00p)
02616d3080 minor fixes and first tests for Domains-ApiCommand
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-03-01 16:46:47 +01:00
Michael Kaufmann (d00p)
2bf5e90a77 add testsuite parameter to phpunit to respect our required test-order; minor fixes in Domains- and SubDomains Command
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-27 18:07:43 +01:00
Michael Kaufmann (d00p)
75bc6d32ab minor fixes in SubDomains.add; first Unit-Tests for SubDomains-ApiCommand
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-27 17:10:52 +01:00
Michael Kaufmann (d00p)
3e0b551416 fix copy'n'paste fail
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-27 15:56:05 +01:00
Michael Kaufmann (d00p)
a038e35e45 added Subdomains.add; minor fixes and enhancements
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-27 15:54:07 +01:00
Michael Kaufmann (d00p)
6318e5514b ignore some more checkstyle rules
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-27 10:54:03 +01:00
Michael Kaufmann (d00p)
392db944a2 started work in SubDomains-ApiCommand; minor fixes
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-27 10:34:37 +01:00
Michael Kaufmann (d00p)
b097c19c0a correct phpcs config
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-27 09:30:57 +01:00
Michael Kaufmann
b46d3a3769 Update README.md
new test :)
2018-02-27 08:59:49 +01:00
Michael Kaufmann
a2172329cd Update README.md
added CI build-status
2018-02-27 08:50:54 +01:00
Michael Kaufmann (d00p)
309b70c0f8 completed Ftps-ApiCommand
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-27 08:23:19 +01:00
Michael Kaufmann (d00p)
4b9ed8ee39 use correct order
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-26 22:39:06 +01:00
Michael Kaufmann (d00p)
2599f61b32 add jenkins build.xml and more; added first unit-tests
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-26 22:35:04 +01:00
Michael Kaufmann (d00p)
9a4359e010 fix IpsAndPorts.delete
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-26 19:56:03 +01:00
Michael Kaufmann (d00p)
4d89f614e3 remove unnecessary checks as getParam() validates the existance already
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-26 18:08:43 +01:00
Michael Kaufmann (d00p)
4fad0def1e fix mailer variable and fix typo in Ftps.add and Ftps.delete
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-26 18:02:18 +01:00
Michael Kaufmann (d00p)
c093783904 forgot the mailobject :P
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-26 16:02:09 +01:00
Michael Kaufmann (d00p)
257855b43b fix typo in field-value for ApiCommand::getUserDetail()
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-26 16:00:54 +01:00
Michael Kaufmann (d00p)
55ec20be10 use Ftps.add in webinterface
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-26 15:55:49 +01:00
Michael Kaufmann (d00p)
b0f355ba2f fixed in Mysqls.add, added Ftps.add
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-26 15:49:41 +01:00
Michael Kaufmann (d00p)
ceb8619552 preparations for assign-multiple-ips-to-an-admin in Api, not in webinterface yet
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-26 12:15:48 +01:00
Michael Kaufmann (d00p)
6191ee6fba add Ftps.list and Ftps.delete
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-26 09:36:58 +01:00
Michael Kaufmann (d00p)
c9256c0020 add 'adminname' to result in Customers.get; fix Customers.move and return customer-data there instead of just true
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-26 09:01:13 +01:00
Michael Kaufmann (d00p)
592c9ed0b9 automatically trim() all parameters given
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-26 08:21:56 +01:00
Michael Kaufmann (d00p)
4a1decf359 do not update fields of customer a customer cannot even change; unset custom_notes when admin of customer set custom_notes_show to 0
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-26 07:51:44 +01:00
Michael Kaufmann (d00p)
ae42e87a64 fix in Admins.update; code-format Customers ApiCommand
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-25 21:26:51 +01:00
Michael Kaufmann (d00p)
5c330505ea correct Admins.update and Admins.delete
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-25 20:47:36 +01:00
Michael Kaufmann (d00p)
c65d95c1ef Merge remote-tracking branch 'origin/master' into 0.10.0 2018-02-25 18:29:28 +01:00
Michael Kaufmann (d00p)
2b366c8f23 add field for fullchain to be stored in ssl-certificates-table; create fullchain file if given (it's not used by froxlor); do not generate/renew certificates for disabled customers domains
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-25 18:22:15 +01:00
Michael Kaufmann (d00p)
e66dde2e64 id <> loginname, grrr
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-25 17:08:30 +01:00
Michael Kaufmann (d00p)
f32a1921c5 re-read admin/customer when adding/updating so we return the fields from the table, not the placeholders of the prepared-statement
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-25 17:03:49 +01:00
Michael Kaufmann (d00p)
0958d07f23 fixes in Admins and Customers ApiCommand
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-25 16:49:24 +01:00
Michael Kaufmann (d00p)
a222114d0a remove unnecessary parameter-checks as they will never happen; make Customers.update callable for customers
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-25 15:02:58 +01:00
Michael Kaufmann (d00p)
243b68cc37 minor changes for testing
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-25 11:47:28 +01:00
Michael Kaufmann (d00p)
2f30d85d32 minor changes in ApiCommand; added Ftps.get ApiCommand
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-24 20:52:21 +01:00
Michael Kaufmann (d00p)
ca07621de7 reduce mysql-usage counter for admins too when deleting a mysql-database
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-24 20:12:57 +01:00
Michael Kaufmann (d00p)
e5a1b504d7 consistency replace dbserver with mysql_server everywhere
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-24 16:52:14 +01:00
Michael Kaufmann (d00p)
20aac1ccd4 finish Mysqls.update, untested
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-24 16:46:56 +01:00
Michael Kaufmann (d00p)
bda652f947 tiny fixes in Domains.add and Domains.update
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-24 16:26:47 +01:00
Michael Kaufmann (d00p)
87912a9e07 refactored moveCustomerToAdmin() function to Customers.move ApiCommand
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-24 16:06:53 +01:00
Michael Kaufmann (d00p)
0bf430e0c1 let customers edit password, def-language and theme in Customers.edit
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-24 15:02:49 +01:00
Michael Kaufmann (d00p)
d2aaf84eff added Mysqls.add
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-24 12:13:47 +01:00
Michael Kaufmann (d00p)
b5ebe48715 forgot to save this one
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-24 11:01:29 +01:00
Michael Kaufmann (d00p)
9a61a56732 enhance phpdoc and add @access to specify which usergroup can use the ApiCommands; add --import-settings parameter to config-services.php CLI script to gain even more automatism when setting up
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-24 10:57:52 +01:00
Michael Kaufmann (d00p)
81d6a856d9 forgot to hit save :P
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-23 19:51:06 +01:00
Michael Kaufmann (d00p)
344ca827e4 beautify api-help in webinterface
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-23 19:46:57 +01:00
Michael Kaufmann (d00p)
1c4ecdffbf use correct dbserver for getting mysql-size info in Mysqls.get()
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-23 18:24:10 +01:00
Michael Kaufmann (d00p)
831ee221f6 make lng, version, dbversion and branding protected variables of ApiCommand to avoid the need of 'global' statement
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-23 18:18:31 +01:00
Michael Kaufmann (d00p)
6409fb2dbe started working on Mysqls-ApiCommand
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-23 15:17:22 +01:00
Michael Kaufmann (d00p)
662f537a0d fixes in Admins.update(); use ApiCommand for theme-, language- and password-change
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-23 12:48:17 +01:00
Michael Kaufmann (d00p)
8e0bfe9d09 add Admins.update()
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-23 11:57:29 +01:00
Michael Kaufmann (d00p)
8930d2a1bf check remote-ip when ip-restriction is set in api_keys table
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-23 11:08:24 +01:00
Michael Kaufmann (d00p)
d9ec214e17 secure included webinterface-modules; add settings-functions to Froxlor-ApiCommand
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-22 21:05:58 +01:00
Michael Kaufmann (d00p)
dfb5d33a56 add Admins.add()
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-22 16:51:56 +01:00
Michael Kaufmann (d00p)
b42a7b1b26 show basic api doc in webinterface (top-menu - options - API help)
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-22 13:41:28 +01:00
Michael Kaufmann (d00p)
a468fe50df filter deactivated users who want to use the API; fix error-output in Customers::update()
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-22 11:42:13 +01:00
Michael Kaufmann (d00p)
c1875132ef fix unchecked-checkbox value passed to API
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-22 11:34:40 +01:00
Michael Kaufmann (d00p)
332e29be24 lots of phpdoc; fix Customers::update()
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-22 11:16:55 +01:00
Michael Kaufmann (d00p)
c93e2678f7 make Customers::update() also work with loginname as an alternative to the id
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-22 10:47:14 +01:00
Michael Kaufmann (d00p)
f8fe4be3ef fix parameters for checkboxes when passed via webinterface
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-21 14:52:23 +01:00
Michael Kaufmann (d00p)
689ca853c3 minor fixes in Customers and Domains ApiCommands, added list() and get() for Admins-ApiCommand
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-21 14:38:27 +01:00
Michael Kaufmann (d00p)
8310e8554b enable usage of 'domainname' as an alternative to 'id' for Domains::get() and Domains::delete(); enable usage of 'loginname' as an alternative to 'id' for Customers::get() and Customers::delete()
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-21 13:14:54 +01:00
Michael Kaufmann (d00p)
b56414ed0e add sql-query of last statement to sql-debug for debugging purposes; fix default-ssl-ip setting and allow 'none' value
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-21 12:16:50 +01:00
Michael Kaufmann (d00p)
5480fcbf5d add default-ssl-ip setting
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-21 11:50:34 +01:00
Michael Kaufmann (d00p)
26b9c030b5 leave default-values for adding std-subdomain when adding customer from the parameters-array; do not require ipandports parameter when adding domain but rather default to system.defaultip if no ipandport is given
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-21 10:57:46 +01:00
Michael Kaufmann (d00p)
aef528bea1 Merge remote-tracking branch 'origin/master' into 0.10.0 2018-02-21 08:54:29 +01:00
Michael Kaufmann (d00p)
d5b9ad3452 darn, stay php-5.3 compatible, thx greppy
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-20 21:37:06 +01:00
Michael Kaufmann (d00p)
5437fcdc89 insert tasks to rebuild configs etc. after import of settings, thx to v3ng for noticing
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-20 19:15:55 +01:00
Michael Kaufmann (d00p)
b9653c5abd fix company-required check for good now :P
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-20 19:11:33 +01:00
Michael Kaufmann (d00p)
eabc78c84f enhance check for requirement of company field
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-20 14:21:40 +01:00
Michael Kaufmann (d00p)
033393880d fix typo in variable name
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-20 14:14:47 +01:00
Michael Kaufmann (d00p)
6bcfb81c6c Merge remote-tracking branch 'origin/master' into 0.10.0 2018-02-19 14:10:42 +01:00
Michael Kaufmann (d00p)
b2ac1fb593 add FpmDaemons ApiCommand
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-19 13:58:39 +01:00
Michael Kaufmann (d00p)
8c6ae4f3a3 add PhpSettings ApiCommand
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-19 13:36:15 +01:00
Michael Kaufmann (d00p)
131efc544d fix syntax error in lang file, fixes #522
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-19 12:27:00 +01:00
Michael Kaufmann (d00p)
5524ff7cae fixes in Customers::update()
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-19 11:36:01 +01:00
Michael Kaufmann (d00p)
603e14913b finished Customer::update(), untested
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-19 10:45:41 +01:00
Michael Kaufmann
160474f2b6 Merge pull request #521 from JB1985/master
Update german.lng.php
2018-02-19 09:03:32 +01:00
JB1985
168738b23a Update german.lng.php
Statt Benutze Lets Encrypt => SSL Zertifikat erstellen (Let\'s Encrypt)
2018-02-19 09:02:34 +01:00
Michael Kaufmann (d00p)
133af365bd enhance ApiCommand::getParam() to specify required and optional parameter
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-19 08:59:24 +01:00
Michael Kaufmann (d00p)
532551263d add new api-module to output list of possible modules/functions
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-18 10:19:17 +01:00
Michael Kaufmann (d00p)
bdfd601dae Merge remote-tracking branch 'origin/master' into 0.10.0 2018-02-18 10:17:38 +01:00
Michael Kaufmann (d00p)
9619abdad7 when importing settings with enabled ssl flag, validate that the target system has ssl enabled ip's to avoid unexpected behaviour, tthx v3ng for testing
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-17 16:00:50 +01:00
Michael Kaufmann (d00p)
fd287e7be4 add apache restart command after enabling modules in config-templates
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-17 14:51:04 +01:00
Michael Kaufmann (d00p)
5afdbae83a minor phpDoc fixes in Logger classes
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-16 15:50:31 +01:00
Michael Kaufmann (d00p)
7c96164770 fix lng availability; add returncode for not-found messages
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-16 15:39:59 +01:00
Michael Kaufmann (d00p)
60defd3cdf fix unlimited flags when adding customer; add debug flag to log all api-requests for testing purposes now
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-16 14:34:55 +01:00
Michael Kaufmann (d00p)
8978dd3a4b std-subdomain <> ip connection is already handled by Domains::add()
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-16 13:55:12 +01:00
Michael Kaufmann (d00p)
1e45da2410 more work on Customer-ApiCommand
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-16 13:27:31 +01:00
Michael Kaufmann (d00p)
2da2912c9c set update-check-urls to api-version; started working on Customers-ApiCommand
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-16 10:56:27 +01:00
Michael Kaufmann (d00p)
4d12a4f37b Merge remote-tracking branch 'origin/master' into 0.10.0 2018-02-16 09:24:14 +01:00
Michael Kaufmann (d00p)
350e3d733a do not check for options if field is disabled, unset enabled-ownvhost flags for fcgid/fpm if the corresponding other one is activated; fixes #518
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-16 09:22:34 +01:00
Michael Kaufmann (d00p)
81602f17be add Domains api module
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-15 14:44:48 +01:00
Michael Kaufmann (d00p)
df5fb963c1 make language strings the language the user uses
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-15 13:03:30 +01:00
Michael Kaufmann (d00p)
0fc2fbaf09 add language strings (english only currently)
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-15 12:59:34 +01:00
Michael Kaufmann (d00p)
a82d5cf764 minor fixes
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-15 11:37:38 +01:00
Michael Kaufmann (d00p)
2c1f76e6a4 definetly require json extension now
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-15 07:56:27 +01:00
Michael Kaufmann (d00p)
d068477a93 set version to 0.10.0
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-15 07:54:21 +01:00
Michael Kaufmann (d00p)
4663f8c6ec converted IpsAndPorts to API
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-15 07:48:03 +01:00
Michael Kaufmann (d00p)
dd371c72a2 start api implementation
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-15 07:47:35 +01:00
Michael Kaufmann (d00p)
6f91bece17 fix postfix config for postfix/courier on precise and trusty, fixes #516
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-15 07:44:54 +01:00
Michael Kaufmann (d00p)
5c30961d3c set version to 0.9.39.5 for bugfix release (imap/pop3 ticks not enabled if active in hosting plan when editing hosting plan)
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-14 13:31:39 +01:00
Michael Kaufmann (d00p)
edd5ef0ca0 fix correct display of selected checkbox imap/pop3 when editing hosting plan
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-14 07:40:39 +01:00
Michael Kaufmann (d00p)
6befe85656 fix add/edit domain due to wrong access to settings; setting version to 0.9.39.4 for bugfix release
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-13 12:23:05 +01:00
Michael Kaufmann (d00p)
27f8c8b438 show domains of disabled customers also as disabled
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-13 11:49:15 +01:00
Michael Kaufmann (d00p)
fc0c796b68 avoid undefined variables/indexes
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-13 10:58:06 +01:00
Michael Kaufmann (d00p)
482e8c9a11 set version to 0.9.39.3 for maintenance release and upcoming debian package so the new hosting-plan feature is included
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-13 09:06:49 +01:00
Michael Kaufmann (d00p)
7a664a9990 clean up panel_diskspace/panel_diskspace_admins when removing customer/admin
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-13 08:21:45 +01:00
Michael Kaufmann (d00p)
372ab5d9c8 add domain flag to avoid generation of nginx try_files directive in webroot which is not suitable for some applications; fixes #461
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-13 08:12:58 +01:00
Michael Kaufmann (d00p)
de70dbb888 fix checked-property when applying hosting-plan for allowed-phpconfigs
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-12 14:58:17 +01:00
Michael Kaufmann (d00p)
4d7ceb9efe add missing question-string
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-12 13:33:29 +01:00
Michael Kaufmann (d00p)
bb792f228f add new hosting-plans feature
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-12 13:28:13 +01:00
Michael Kaufmann (d00p)
017396197e set version to 0.9.39.2 for bugfix release
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-12 07:49:07 +01:00
Michael Kaufmann (d00p)
216f013c96 add script to automatically configure services from shell without the need of copy/paste from the interface
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-12 07:47:51 +01:00
Michael Kaufmann (d00p)
05f1bf0a1f meh, forgot to uncomment the settings storage for settings-import
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-12 07:46:38 +01:00
Michael Kaufmann (d00p)
295fbae6f5 create bash script to generate proftpd-certificates in case system does not use /bin/bash as shell
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-11 16:10:10 +01:00
Michael Kaufmann (d00p)
ca4c93ac92 set default dns server in config-templates; separate CmdLineHandler from switch-server-ip script for further usage
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-11 13:57:07 +01:00
Michael Kaufmann (d00p)
13b1503bf2 set version to 0.9.39.1 for maintenance release
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-10 16:06:57 +01:00
Michael Kaufmann (d00p)
2980397545 fix include path in lib/ajax.php
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-10 10:13:55 +01:00
Michael Kaufmann (d00p)
5612720342 only let admin select php-configs that the customer is allowed to use to avoid unwanted php-config changes when customer edits domain, refs #514
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-09 13:57:23 +01:00
Michael Kaufmann (d00p)
4d3fa6eca5 get rid of the need for allow_url_fopen
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-09 10:50:14 +01:00
Michael Kaufmann (d00p)
05b4c58aa8 fix updating wrong column when deleting a fpm configuration
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-09 09:20:46 +01:00
Michael Kaufmann (d00p)
f290497b64 fix selected phpfpm daemon when editing php-configuration, fixes #514
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-09 07:33:28 +01:00
Michael Kaufmann (d00p)
b4dd35eed2 correct description of nsswitch.conf file
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-08 07:35:06 +01:00
Michael Kaufmann (d00p)
ec21e28000 use md5() instead of base64_encode for dummy-fpm-socket name to avoid possible equal-sign in string which leads to an invalid socket, fixes #513
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-07 15:10:59 +01:00
Michael Kaufmann (d00p)
0aa707ebc9 set version to 0.9.39 for upcoming release
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-06 12:19:21 +01:00
Michael Kaufmann (d00p)
f38a0fd8b6 remove unnecessary and out-of-date info from README, fixed variable typo in lib/init.php
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-02-05 08:36:25 +01:00
Michael Kaufmann (d00p)
a6b2daa77d fix typo
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-01-30 14:41:56 +01:00
Michael Kaufmann (d00p)
7ae31496ac add requirement check for php-json as settings import/export uses json_decode/json_encode
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-01-30 07:58:24 +01:00
Michael Kaufmann (d00p)
c62dd2ecf4 fix mysql-strict-mode issue (hopefully for good), enhance error-reporting when importing froxlor.sql on installation
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-01-29 20:04:54 +01:00
Michael Kaufmann (d00p)
840b5ea229 add new feature: import/export of settings
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-01-28 14:33:00 +01:00
Michael Kaufmann (d00p)
d8a3015303 put le acme version setting right above the CA setting, less confusing
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-01-27 11:50:34 +01:00
Michael Kaufmann (d00p)
194b7863b8 fix invalid ipv6 value in mysql-access-host setting
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-01-27 11:37:06 +01:00
Michael Kaufmann (d00p)
f034695290 remove '/etc/postfix/master.cf: line x: using backwards-compatible default setting chroot=y' warning; set correct permission for dkim-public key as it should not be group or other writable
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-01-27 11:14:22 +01:00
Michael Kaufmann (d00p)
f896fe11a0 do not split dkim-entry content in generateDkimEntries(); re-add braces to enclose TXT record content
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-01-27 10:09:43 +01:00
Michael Kaufmann (d00p)
2603a9c869 add new setting to specify values for the PATH env-variable for php-fpm
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-01-26 17:30:20 +01:00
Michael Kaufmann (d00p)
fcd0dddfd5 Update phpMailer to 5.2.26
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-01-26 17:18:12 +01:00
Michael Kaufmann (d00p)
3fb92259a8 readd starting and ending quotes which got removed with the braces in #503
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-01-26 17:17:22 +01:00
Michael Kaufmann
54d7b01ac5 Merge pull request #506 from RipClaw2971/http2_fix
http2 could be set even if http2 is not enabled
2018-01-22 14:43:10 +01:00
Michael Kaufmann (d00p)
ca0ab1f97a add fixed dovecot/conf.d/10-ssl.conf template for debian stretch; update phpMailer to 5.2.26
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-01-21 23:37:09 +01:00
Michael Kaufmann (d00p)
f3733ca249 set apache-2.4 as default ON also in froxlor.sql; fix wrong DbManagerMySQL::disableUser, fixes #505
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-01-18 19:50:28 +01:00
Andreas Grundler
7442bf7347 http2 Konfiguration nur einfügen wenn http2 in den Einstellungen aktiviert ist 2018-01-18 18:30:38 +01:00
Andreas Grundler
6ac3cb2014 Revert "http2 Konfiguration nur einfügen wenn http2 in den Einstellungen aktiviert ist"
This reverts commit c3fb6f6a1c.
2018-01-18 18:23:08 +01:00
Andreas Grundler
ca76e572a2 http2 Option darf nur dann zu sehen sein wenn http2 in den Einstellungen aktiv ist 2018-01-18 18:18:30 +01:00
Andreas Grundler
c3fb6f6a1c http2 Konfiguration nur einfügen wenn http2 in den Einstellungen aktiviert ist 2018-01-18 18:16:53 +01:00
Michael Kaufmann
1796a8ff17 Merge pull request #503 from lonesomewalker/patch-1
Update class.DnsEntry.php
2018-01-17 07:54:57 +01:00
lonesomewalker
52c7839b9b Update class.DnsEntry.php
Klammerfehler bei Bind, PowerDNS braucht ja keinen Linesplit.
2018-01-16 14:57:42 +01:00
Michael Kaufmann (d00p)
d16a7b2089 on installation, set apache-2.4 as default if apache is detected; clearify that apache2 is 2.2; output complete folder where the userdata.inc.php file is to be put when necessary to avoid misunderstanding
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-01-15 07:45:50 +01:00
Michael Kaufmann (d00p)
9a00a67f71 apache2-suexec => apache2-suexec-pristine for debian stretch
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-01-13 11:33:20 +01:00
Michael Kaufmann (d00p)
6e651200ca Make php.ini flag/value possibilities dynamic (settings)
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-01-11 13:04:38 +01:00
Michael Kaufmann (d00p)
29968e6026 add stretch config-templates, testers/feedback welcome
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-01-11 10:44:42 +01:00
Michael Kaufmann (d00p)
8c61773280 fix usage of extensions from limit_extensions list in apache-cron
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-01-10 17:01:17 +01:00
Michael Kaufmann (d00p)
29433ce963 escape possible dots in extension (e.g. to allow .php.xml or similar)
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-01-10 15:49:07 +01:00
Michael Kaufmann (d00p)
eed3a91385 fix (not yet perfect) regex for limit_extension setting
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-01-10 15:45:21 +01:00
Michael Kaufmann (d00p)
62006d584e fix limit_extensions setting
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-01-10 15:42:11 +01:00
Michael Kaufmann (d00p)
bba872618a fix ssl-procotols in apache-cron; fix files-match regex in apache-cron
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-01-10 15:28:48 +01:00
Michael Kaufmann (d00p)
941dd14c72 read limit_extensions value from wrong array
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-01-10 15:22:22 +01:00
Michael Kaufmann (d00p)
f2a79d4d96 add new security.limit_extensions setting to fpm-daemon settings
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-01-10 15:20:19 +01:00
Michael Kaufmann (d00p)
281b131c62 ups, forgot to adjust version in lib/version.inc.php
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-01-10 10:21:02 +01:00
Michael Kaufmann (d00p)
4bcdfc0786 Added option to set the TLS protocol versions to be used in webservers
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-01-10 10:12:26 +01:00
Michael Kaufmann (d00p)
9312e4967e fix access to idle-timeout setting which moved from global settings to per-fpm-daemon setting, thx to gunnyst for pointing this out
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-01-10 08:45:20 +01:00
Michael Kaufmann (d00p)
6b44dfe9b2 well, we should also save the new settings :)
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-01-09 17:22:20 +01:00
Michael Kaufmann (d00p)
ba58991d11 allow per php-config setting of adding '-pass-header Authorization' / 'CGIPassAuth On' to the domains vhosts
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-01-09 17:14:57 +01:00
Michael Kaufmann (d00p)
84abb33e54 exclude wildcard-domains agains also vor ACMEv2 of LE2
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-01-09 17:12:55 +01:00
Michael Kaufmann (d00p)
07a4f045f1 do not advertise wildcard-certificates as it might never be possible in froxlor (no http-01 challenge)
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-01-09 16:08:13 +01:00
Michael Kaufmann (d00p)
f49cb81e49 disable wildcard-usage with Let's Encrypt as ACME-v2 only supports the dns-01 challenge for now (pity)
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-01-09 15:33:23 +01:00
Michael Kaufmann (d00p)
b2b9d4e31a add missing setting-strings for new acme-version setting; allow using let's encrypt with wildcard-alias when using ACME-v2
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-01-09 14:56:41 +01:00
Michael Kaufmann (d00p)
d40d1f30b6 make it a setting to switch between ACME v1 and v2
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-01-09 14:50:52 +01:00
Michael Kaufmann (d00p)
9aaadb1f8b implement lets-encrypt api-v02 (testing only currently; not activated in froxlor, test with 'php froxlor_master_cronjob.php --letsencrypt_v2 --debug' but set api endpoint to staging); no chain is returned currently, seems to be a known bug
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-01-09 14:40:36 +01:00
Michael Kaufmann (d00p)
3969ef63c5 do not check hide-options 'domains' in customer_tickets, fixes #502
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-01-09 11:18:03 +01:00
Michael Kaufmann (d00p)
d8abe30c44 create dummy pool-config whenever a fpm-daemons configdir is empty so it still restarts
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-01-09 09:25:56 +01:00
Michael Kaufmann (d00p)
eaa10ce6a5 add option to update php-configs for all subdomains when editing a domain as admin (default: yes)
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-01-08 15:31:27 +01:00
Michael Kaufmann (d00p)
c434249616 allow admin to set php-configs that can be used by customers
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-01-08 14:45:00 +01:00
Michael Kaufmann (d00p)
b849a5f29a preparations for php-config select for customers
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-01-08 13:59:30 +01:00
Michael Kaufmann (d00p)
3dc6a64252 fix pm select when editing fpmdaemon; fix saving of pm value
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-01-08 10:22:09 +01:00
Michael Kaufmann (d00p)
ebd636494a fix wrong table constant
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-01-08 10:11:38 +01:00
Michael Kaufmann (d00p)
07caf55f79 fixes to multi-fpm in cron
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-01-08 09:16:00 +01:00
Michael Kaufmann (d00p)
73868b7947 soften the file cleaning to reduce risk
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-01-07 23:31:39 +01:00
Michael Kaufmann (d00p)
af55fe5b82 add possibility to add multiple php-fpm instances
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2018-01-07 14:55:25 +01:00
Michael Kaufmann
de408347fc Merge pull request #500 from heavygale/patch-1
Update preconfig_0.9.inc.php
2018-01-05 18:26:57 +01:00
heavygale
ea96039128 Update preconfig_0.9.inc.php
fixed a typo
2018-01-05 18:11:23 +01:00
Michael Kaufmann
c49539258e Merge pull request #498 from RipClaw2971/fix
Added "nscd -i passwd" to clear user cache when using libnss-*
2018-01-01 17:45:23 +01:00
Andreas Grundler
64653a2bb1 nscd -i passwd in froxlor_master_cronjob.php eingefügt 2018-01-01 13:54:32 +01:00
Andreas Grundler
732c6e3a78 Added nscd -i passwd to clear user 2017-12-31 22:40:19 +01:00
Michael Kaufmann (d00p)
66a4309fe5 add setting to disable LE self-check; set version to 0.9.38.8 for maintenance/bugfix release
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2017-12-31 11:18:59 +01:00
Michael Kaufmann (d00p)
57277eb1e3 also add locked users to the passwd file for quota not to rage :P thx J-BBB
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2017-12-27 10:36:10 +01:00
Michael Kaufmann (d00p)
148b2fc1be validating config-template parameters; avoid URL misuse, thx to hyp3rlinx for noticing this
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2017-12-27 10:01:07 +01:00
Michael Kaufmann (d00p)
cf4f15a83c explicitly deactivate TLS (and auto-tls) when setting use-tls is OFF; fixes #496
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2017-12-19 08:00:39 +01:00
azerr
297f3f638c change sign direction 2017-12-08 17:47:09 +01:00
azerr
d2a9fa8632 extend nginx redirect regex to https 2017-12-08 15:39:05 +01:00
Michael Kaufmann (d00p)
a5251824ae try to reduce weird path-values when people are getting creative, fixes #487
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2017-11-27 08:14:31 +01:00
Michael Kaufmann (d00p)
cb31c5258d correct setting for php-fpm peardir, fixes #475
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2017-11-27 08:09:33 +01:00
Michael Kaufmann (d00p)
5540b02e35 do not remove Let's Encrypt token when self-check fails but rather give out the information as warning. The self-check fails for many users due to different local configurations and might not always be correct; fixes #480
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2017-11-27 07:54:41 +01:00
Michael Kaufmann (d00p)
e725b48c4c add default/global directory options in apache regardless of whether fcgid/fpm is being used or not; fixes #485
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2017-11-27 07:48:36 +01:00
Michael Kaufmann (d00p)
45c0915b59 fix ssl integration in lighttpd, thx to black-night for the info
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2017-11-17 15:15:09 +01:00
Michael Kaufmann (d00p)
1e03946df7 set sql_mode to disable STRICT_MODE usage for froxlor, thx to albech for the hint
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2017-11-08 07:49:40 +01:00
Michael Kaufmann (d00p)
dd3e5e9c6b fix wrong variable name typo, fixes #484
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2017-11-06 07:36:51 +01:00
Michael Kaufmann (d00p)
421c29c491 remove each() keyword as it is deprecated as of php-7.2, fixes #479
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2017-10-31 13:03:06 +01:00
Michael Kaufmann (d00p)
15b62aae04 add inserttask for config regeneration and fix aliasdomain NULL value if empty, fixes #478
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2017-10-06 09:29:49 +02:00
Michael Kaufmann (d00p)
181848290f move setting to enable usage of libnss-extrausers to 'system' category as mpm-itk + mod_php users might need this too
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2017-09-04 15:28:12 +02:00
Michael Kaufmann (d00p)
b263b211a5 generate multiline txt-record if content is too long, fixes #472
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2017-08-28 15:35:07 +02:00
Michael Kaufmann (d00p)
1753d2895b add simple smtp-settings test-page, fixes #464
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2017-08-25 10:34:59 +02:00
Michael Kaufmann (d00p)
64ebb0ca38 also add http2 flag to domain-import
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2017-08-24 15:27:47 +02:00
Michael Kaufmann (d00p)
bab982a0e6 add http2 support for froxlor-vhost and per-domain
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2017-08-24 13:21:21 +02:00
Michael Kaufmann (d00p)
c2c5178831 remove superfluous character in froxlor.sql file, fixes #471
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2017-08-23 14:03:39 +02:00
Michael Kaufmann (d00p)
56e8e32965 set correct permissions for extrausers files/folder, fixes #465
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2017-07-26 07:30:14 +02:00
Michael Kaufmann (d00p)
47cd30a45e use correct logging-level in customer_mail, thx to priority
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2017-07-19 12:06:36 +02:00
Michael Kaufmann
bd8f659272 Merge pull request #460 from pquerner/patch-libclass-lesscript-dontsendchallengewithouttoken
dont send uri to challenge, if no valid token could be fetched
2017-07-08 16:59:56 +02:00
Pascal Querner
82c719d786 dont send uri to challenge, if no valid token could be fetched 2017-07-07 22:50:39 +02:00
Michael Kaufmann (d00p)
dc22ff6aa3 fix rebuild of libnss-extrausers files when editing/deleting ftp account, fixes #454
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2017-06-20 16:48:11 +02:00
Michael Kaufmann
c68682b084 Merge pull request #450 from oliverrahner/master
nginx: add index directive to path options for secured directories
2017-06-10 11:47:53 +02:00
Oliver Rahner
aa8a7ee0a9 nginx: add index directive to path options for secured directories
`index` directives are now created for secured directory locations.
2017-06-10 10:59:41 +02:00
Michael Kaufmann (d00p)
e95a917812 allow non fqdn CNAME entries (froxlor appends zone's domain automatically if there's no trailing dot), fixes #434
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2017-06-04 11:29:21 +02:00
Michael Kaufmann (d00p)
332e627007 fix wildcard entries in dns editor, fixes #447; do not add extra dot at the end of SRV entries, fixes #446
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2017-06-04 09:31:55 +02:00
Michael Kaufmann (d00p)
a3201481f6 beatufication in generated vhost configs
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2017-06-04 09:30:32 +02:00
Michael Kaufmann (d00p)
dae233dd05 allow adding domains with multiple dashes, that are NOT punycode (xn--)
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2017-06-04 09:17:31 +02:00
Michael Kaufmann (d00p)
9aa2cc269b rename MYSQL_PASSWORD replacer to FROXLOR_MYSQL_PASSWORD in config-templates to avoid false replacement of couriers authmysqlrc, fixes #438
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2017-05-12 12:23:14 +02:00
Michael Kaufmann (d00p)
434f202832 minor fixes in traffic cron
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2017-05-12 12:22:04 +02:00
Michael Kaufmann (d00p)
552d58848c fix sql_mode=only_full_group_by in admin_admins.php; fix wrong webserver-user when using FCGID
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2017-05-09 13:17:50 +02:00
Michael Kaufmann (d00p)
bea1677d5d Add setting for libnss-extrausers to frontend
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2017-05-05 09:44:37 +02:00
Michael Kaufmann (d00p)
a2e0de23e1 add libnss-extrausers for debian/ubuntu users
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2017-05-05 09:35:06 +02:00
Michael Kaufmann
ebb33c9cee Merge pull request #436 from nachtgeist/master
doc: extend notes about contributing; add issue template
2017-05-01 21:26:26 +02:00
Daniel Reichelt
22414096ad doc: extend notes about contributing; add issue template 2017-05-01 21:24:48 +02:00
Michael Kaufmann (d00p)
9db7434876 add letsencrypt, HSTS settings, oscp-stapling and phpenabled-flag to Domain-import; fixes #416
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2017-04-18 16:55:55 +02:00
Michael Kaufmann
9fabfd539d Merge pull request #430 from mkhon/fix-apache24-ocsp-cache-path
Fix apache24_ocsp_cache_path definition
2017-04-18 12:50:40 +02:00
Michael Kaufmann
54f6c3e019 Merge pull request #431 from shyim/mysql-warning
Fixed MySQL Warning while creating a new user
2017-04-17 12:50:16 +02:00
Soner Sayakci
5930ab1c9d Fixed MySQL Warning while creating a new user 2017-04-17 12:34:20 +02:00
Max Khon
3870cc1002 Add default value for apache24_ocsp_cache_path, otherwise saving
SSL settings for !apache24 fails on apache24_ocsp_cache_path validation.
2017-04-17 15:55:49 +07:00
Michael Kaufmann
f880e1c9f1 Merge pull request #429 from mkhon/database-charset-skip-views
Skip views when altering table charsets
2017-04-15 11:28:27 +02:00
Michael Kaufmann
9285a169dd Merge pull request #428 from mkhon/fix-customer-logs
Fix customer logs
2017-04-15 11:27:15 +02:00
Max Khon
95b7b57fc6 Skip views when altering table charsets. 2017-04-15 16:12:29 +07:00
Max Khon
872928fb38 Fix customer logs:
- SQLSTATE[HY000]: General error: mode must be an integer
- customer_logger.php:78 Undefined variable $_actions
2017-04-15 15:58:50 +07:00
Michael Kaufmann
cb2f094e3d Merge pull request #426 from nachtgeist/master
readme: add section about contributing
2017-04-13 16:39:15 +02:00
Daniel Reichelt
b11b423217 readme: add section about contributing 2017-04-13 16:38:17 +02:00
Michael Kaufmann
567827e2cb Merge pull request #422 from nachtgeist/master
add OCSP stapling support for apache2 and nginx
2017-04-11 20:39:00 +02:00
Daniel Reichelt
ec1bd6e19a add OCSP stapling support for apache2 and nginx 2017-04-11 17:09:34 +02:00
Michael Kaufmann (d00p)
d4cd827284 update wiki-urls in language files
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2017-04-09 10:25:39 +02:00
Michael Kaufmann
50f85fb6d0 Merge pull request #417 from ianklemm/patch-1
Correct Wiki links
2017-04-03 20:32:24 +02:00
Vengance
9cc69e5b3d Update README.md 2017-04-03 20:31:50 +02:00
Vengance
d9e8f43298 Correct Wiki links
Correct the links of the no longer existing redmine to Github´s inbuild Wiki
2017-04-03 20:21:44 +02:00
Michael Kaufmann (d00p)
ad7cf52f21 Fix rowcount value for logger
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2017-03-17 13:05:39 +01:00
Michael Kaufmann (d00p)
398d45deae fix typo
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2017-03-14 13:46:07 +01:00
Michael Kaufmann (d00p)
541ab1fe6e clearify field label for domain termination date; fixes #1728
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2017-03-11 07:34:13 +01:00
Michael Kaufmann (d00p)
c0fddbce81 use correct pagination in admin-log/customer-log, fixes #1726
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2017-03-08 14:04:40 +01:00
Michael Kaufmann (d00p)
2284706e0c do not load mod_vroot in proftpd on centos
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2017-03-02 07:57:47 +01:00
Michael Kaufmann (d00p)
a4f72cbb40 do not show full path of file on php-error; fixes #1720
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2017-02-12 16:33:00 +01:00
Michael Kaufmann
d1c776b706 Merge pull request #414 from Douks08/patch-1
Update french.lng.php
2017-02-09 14:41:56 +01:00
Douks08
8ef315014c Update french.lng.php
Modification de "billets" en "tickets" qui est plus fréquemment utilisé
2017-02-09 10:19:32 +01:00
Michael Kaufmann (d00p)
2d59e569df fix phpenabled flag for new subdomains added by customers
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2017-01-30 22:46:53 +01:00
Michael Kaufmann (d00p)
202eb0931f fix auto-update of database in cronjob if activated
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2017-01-28 21:20:37 +01:00
Michael Kaufmann (d00p)
4cd1a8d656 Merge branch 'master' of github.com:Froxlor/Froxlor 2017-01-28 21:19:51 +01:00
Vengance
01a363456e Fix libnss config (#412)
* Fix libnss config
2017-01-28 15:47:19 +01:00
Michael Kaufmann (d00p)
8f4da0638e allow underscore in dns labels, fixes #1697
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2017-01-25 10:42:18 +01:00
Michael Kaufmann (d00p)
3e6c3d725b set version to 0.9.38.7 for upcoming bugfix release
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2017-01-24 09:43:20 +01:00
Michael Kaufmann (d00p)
95a18be5c5 do not use HTTP_HOST variable if mod_rewrite is not used
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2017-01-24 09:41:45 +01:00
Michael Kaufmann (d00p)
8030aae37a fix directory options for deactivated users, fixes #1704
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2017-01-23 23:53:01 +01:00
Michael Kaufmann (d00p)
0eaa81b503 use libnss-mysl deb package from froxlor repo as debians 1.5-5 package is not suitable for jessie
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2017-01-23 08:17:18 +01:00
Michael Kaufmann (d00p)
c2b864a20f enable/disable php for standard-subdomain when adding a new customer according to the customer-phpenabled value, fixes #1708
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2017-01-23 08:14:14 +01:00
Michael Kaufmann (d00p)
e00cb8926d set mail-sender to customer mail address when using mod_php, fixes #1707
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2017-01-23 08:12:44 +01:00
Michael Kaufmann (d00p)
afb2bce16d fix missing german language strings, refs #1705
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2017-01-23 08:05:48 +01:00
Michael Kaufmann (d00p)
1033f502b1 add missing language strings, fixes #1705
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2017-01-19 14:09:51 +01:00
Michael Kaufmann (d00p)
ab18d94053 fix PR #407 - only works for apache-2.4 and missed the entry for customer-vhosts
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2017-01-17 11:29:40 +01:00
Michael Kaufmann
9afbe7fb71 Merge pull request #407 from buffcode/ssl-compression
Disable SSLCompression (CRIME attack)
2017-01-17 10:40:19 +01:00
Laurens Stötzel
5e0270e6a8 Disable SSLCompression (CRIME attack)
https://raymii.org/s/tutorials/Strong_SSL_Security_On_Apache2.html#SSL_Compression_(CRIME_attack)
2017-01-17 10:33:22 +01:00
Michael Kaufmann (d00p)
c6962b0992 fix variable-typo to make phpenabled-flag work when adding new domains, thx to micw
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2017-01-16 08:43:54 +01:00
Michael Kaufmann (d00p)
9fdcd09089 fix install class, set version to 0.9.38.6
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2017-01-15 07:44:58 +01:00
Michael Kaufmann (d00p)
338cf161d2 fix undefined index if let's encrypt is used for the froxlor-vhost
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2017-01-14 18:06:04 +01:00
Michael Kaufmann (d00p)
044ce6662a set version to 0.9.38.5 for upcoming release
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2017-01-13 19:45:17 +01:00
Michael Kaufmann (d00p)
d574233f49 also reseller/admins who can't see all customers were able to delete arbitrary ssl certificates, refs #1699
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2017-01-13 19:21:34 +01:00
Michael Kaufmann (d00p)
02c6545c94 update download url for libnss-mysql for debian jessie, fixies #1700
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2017-01-10 19:11:01 +01:00
Michael Kaufmann (d00p)
c795cd3320 check for ownership of certificate when deleting as customer, fixes #1699
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2017-01-10 08:37:50 +01:00
Michael Kaufmann (d00p)
1ebde2e6a4 return correct default redirectCode when none is set, thx to J-BBB
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2017-01-05 11:58:11 +01:00
Michael Kaufmann
78ee141b26 Merge pull request #405 from lobeck/hsts_link_fix
fix hsts removal links
2017-01-02 07:32:45 +01:00
Christian Becker
d11ddd910f fix hsts removal links
without a protocol, they are treated relative which is annoying
2017-01-02 03:06:18 +01:00
Michael Kaufmann (d00p)
437446c49d update phpMailer to 5.2.21
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-12-29 10:54:25 +01:00
Michael Kaufmann (d00p)
7a603596c5 validate ip address on installation 2016-12-28 20:13:15 +01:00
Michael Kaufmann
c2a91ed623 Merge pull request #403 from pissbeutel/master
Changed SOA refresh intervall to be within recommended values
2016-12-17 15:16:46 +01:00
Michael Kaufmann
3dcd2b9a3e Merge pull request #402 from stweil/doc
Fix description in README.md
2016-12-17 15:16:10 +01:00
pissbeutel
75622d4737 Changed SOA refresh intervall to be compliant within recommended values
See: https://www.denic.de/fileadmin/public/documentation/DENIC-23p.pdf

The recommended values according to DENIC are:
refresh: 3600 - 86400
retry: 900 - 28800
expire: 604800 - 3600000
negTTL: 180 - 86400
2016-12-17 15:14:02 +01:00
Stefan Weil
7a617d0aa4 Fix description in README.md
The entry is called "System", not "Server".

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2016-12-17 14:33:28 +01:00
Michael Kaufmann
ccca077df7 Merge pull request #401 from stweil/html
Fix HTML code (unclosed tag)
2016-12-17 13:05:56 +01:00
Stefan Weil
5c008adf16 Fix HTML code (wrong tag)
`<span>` must be terminated by `</span>`.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2016-12-17 12:34:15 +01:00
Michael Kaufmann (d00p)
4502f7ddf5 fix Settings::Flush(), thx to Ithariel
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-12-16 10:17:48 +01:00
Michael Kaufmann (d00p)
f9101f880b use namserver IP's for axfr/pdns-config, also add placeholder AXFRSERVERS for axfr-servers setting; fixes #1691
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-12-14 09:54:49 +01:00
Michael Kaufmann (d00p)
5ed0c3f2f3 code-formatting and put phpenabled flag on a better position
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-12-11 09:50:22 +01:00
Michael Kaufmann (d00p)
9907775c0d fix installation sql
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-12-11 09:43:05 +01:00
Michael Kaufmann
ed9d4a5744 Merge pull request #392 from negrusti/patch-1
Prevent duplicates in ipsandports table
2016-12-11 08:55:47 +01:00
Michael Kaufmann
c1aea2795e Merge branch 'master' into patch-1 2016-12-11 08:55:37 +01:00
Michael Kaufmann (d00p)
3a8996aee2 add missing fields that are only added via update
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-12-11 08:29:54 +01:00
Michael Kaufmann
e67aefe48b Merge pull request #400 from micw/feature/letsencrypt-verbesserungen
Better handling for letsencrypt errors, refs #1661
2016-12-11 08:24:10 +01:00
Michael Kaufmann
602c38dbeb Merge branch 'master' into feature/letsencrypt-verbesserungen 2016-12-11 08:23:46 +01:00
Michael Kaufmann
f1c232cef9 Merge pull request #396 from schallertd/master
Checkbox to enable/disable PHP (vhost settings + fpm pool) for an entire vhost, fixes #1671
2016-12-11 08:20:01 +01:00
Michael Kaufmann
3d4b56b233 Merge branch 'master' into master 2016-12-11 08:19:16 +01:00
Michael Kaufmann
d8994ca65b Merge pull request #399 from hypernics/alias_redirect
Change redirect host from main domain name to requested domain name, refs #1670
2016-12-11 08:05:57 +01:00
Michael Kaufmann (d00p)
18514f0180 fix undefined array when processing specialsettings, fixes #1684
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-12-10 21:43:28 +01:00
Michael Kaufmann (d00p)
001786dd97 fix incorrect User-Agent header in let's encrypt class, fixes #1683
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-12-09 13:33:57 +01:00
Michael Kaufmann (d00p)
225539d2e7 show ssl-related settings only if customer has ssl-ip assigned (not yet checked per domain); fix hsts-includeSubdomain setting for fresh installations
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-11-29 09:34:33 +01:00
Janos Muzsi
1b18ec45be correcting lighttpd settings 2016-11-27 23:18:23 +01:00
micw
7b6bbcec48 Fixed default LE license URL
(removed testing stuff)
2016-11-27 12:45:06 +01:00
Michael Kaufmann (d00p)
56276a19d1 set version to 0.9.38.4 for upcoming bugfix release
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-11-27 12:12:22 +01:00
Michael Kaufmann (d00p)
c00abc3b92 move froxlor hsts settings to 'froxlor vhost settings' to make clear it's only for froxlor anbd not a system-wide default for all domains; fix superfluous english text from german language file
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-11-27 11:40:33 +01:00
Michael Kaufmann (d00p)
301dadaa02 fix global hsts-includeSubdomain setting, thx to iam
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-11-27 10:46:50 +01:00
Michael Wyraz
559bd6d892 Better db update 2016-11-25 10:52:50 +01:00
Michael Wyraz
18b45c749d Better handling for letsencrypt errors after failed registration or changed license 2016-11-25 09:54:47 +01:00
Janos Muzsi
2c00f982d8 Change redirect host from main domain name to requested domain name 2016-11-24 22:55:57 +01:00
Michael Kaufmann (d00p)
54200427ab fix undefined variable when deleting a customer-domain as admin
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-11-24 10:40:28 +01:00
Michael Kaufmann (d00p)
f8996ad767 catch exception thrown by new IdnaConverter when encoding a non-valid domain, fixes #1678
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-11-22 15:08:42 +01:00
Michael Kaufmann (d00p)
9838ff4da5 fix hsts settings for lighttpd, fixes #1677
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-11-22 08:16:35 +01:00
Michael Kaufmann (d00p)
192e00c717 do not show NameVirtualHost in IP/Port overview when using apache-2.4 (as NameVirtualHost does not exist there anymore)
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-11-22 08:04:11 +01:00
Michael Kaufmann (d00p)
43ca4a28e4 add acme.conf alias also to froxlor vhost in case the acme-challenge path is not within the froxlor-docroot; fix empty redirect-code, fixes #1674
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-11-21 08:19:33 +01:00
Michael Kaufmann (d00p)
16e9fd6bd9 stay php-5.3 compatible
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-11-18 21:19:18 +01:00
Michael Kaufmann (d00p)
16f547bce0 last time....0.9.38.3....what a day
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-11-18 10:27:11 +01:00
Michael Kaufmann (d00p)
60a482dce6 damn, forgot to save the two files to handle customer-side domain-settings regarding the hsts-includeSubdomain issue; version set to 0.9.38.2
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-11-18 10:21:02 +01:00
Michael Kaufmann (d00p)
9540cb158c set version to 0.9.38.1 b/c of hsts includeSubdomains flag for domains not being saved; added http2-flag for nginx as setting
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-11-18 10:10:03 +01:00
Michael Kaufmann (d00p)
1984aced9d set db_version correctly everywhere
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-11-18 08:52:40 +01:00
Michael Kaufmann (d00p)
ca2949da71 Merge branch 'hypernics-nginx-http2' 2016-11-18 08:50:17 +01:00
Michael Kaufmann (d00p)
eb8449fd79 merge conflicts in update-script
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-11-18 08:50:03 +01:00
Michael Kaufmann (d00p)
547140bafb set version to 0.9.38 for upcoming release
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-11-18 08:36:35 +01:00
Janos Muzsi
d245bca445 correcting the update 2016-11-18 08:32:23 +01:00
Janos Muzsi
5f899a5510 Add support for http2 option to nginx 2016-11-17 22:50:11 +01:00
Michael Kaufmann (d00p)
432645431c allow CIDR values in AXFR setting, fixes #1672
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-11-15 08:03:34 +01:00
Dominic Schallert
30087548b0 Fixed the checkbox value 2016-11-13 15:33:56 +01:00
Dominic Schallert
d93cfff172 updates always at the end of the file 2016-11-13 15:18:07 +01:00
Dominic Schallert
e5053bad15 Introduced phpenabled_customer and phpenabled_vhost, updated cron scripts, updated dbversion 2016-11-13 15:15:43 +01:00
Dominic
1519db1637 Update update_0.9.inc.php 2016-11-13 14:48:50 +01:00
Dominic Schallert
b0326c640c Feature #1671 Checkbox to enable/disable PHP (vhost settings + fpm pool) for an entire vhost 2016-11-13 14:41:39 +01:00
Michael Kaufmann (d00p)
7e4164da26 do not double validate openbasedir-values, as appendOpenbasedirPath() already takes care of that; also fix /dev/urandom as openbasedir-path-value to be treated as file correctly, fixes #1669
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-11-10 10:07:00 +01:00
Michael Kaufmann (d00p)
fad607c6e8 set version to 0.9.38-rc2 for second release candidate 2016-11-07 07:28:58 +01:00
Michael Kaufmann (d00p)
d6b56262ce fix unnecessary idn encoding
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-11-04 18:28:32 +01:00
Michael Kaufmann (d00p)
c409d8a6ba re-enable removing of orphaned entries, fixes #1666
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-11-03 14:14:33 +01:00
Michael Kaufmann (d00p)
4274b8a737 fix setting of hsts values when security questions are asked; insert config-rebuild task if only hsts stuff changes; fix undefined variable regarding alias domain
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-11-03 10:52:33 +01:00
Michael Kaufmann (d00p)
60c1babd93 fix wrong protocol name for apache
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-10-31 20:44:31 +01:00
Michael Kaufmann (d00p)
ec6ddd054d remove certificate entry for LE if admin/customer disables LE for a domain
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-10-31 11:18:40 +01:00
Michael Kaufmann (d00p)
76c200a56c disable tlsv1.1 for ssl settings
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-10-31 11:17:56 +01:00
Michael Kaufmann (d00p)
a44be363a6 set domain, letsencrypt-flag and loginname for froxlor-hostname in ssl-overview because the certificate will get removed as invalid otherwise, thx to Tbyte
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-10-31 10:53:18 +01:00
Michael Kaufmann (d00p)
304926260f PowerDNS does not like multi-line-format, thx to Marc
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-10-29 14:20:50 +02:00
Michael Kaufmann (d00p)
462fca7328 do not add www.[froxlorfqdn] to SAN list of certificate request for Let's Encrypt froxlor-vhost certificate; fixes #1662
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-10-28 10:57:51 +02:00
Michael Kaufmann (d00p)
884b2ed913 various fixes for idn converted domains + fix undefined index alias when editing a domain with alias
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-10-25 12:24:57 +02:00
Michael Kaufmann (d00p)
af77453bfe do not generate ssl-vhost-container without a certificate
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-10-20 09:23:44 +02:00
Michael Kaufmann (d00p)
fa45de6586 fix empty dir parameter for makeCorrectDir() when directory-selection is set to 'Dropdown', thx to D2Red for letting me debug on his system
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-10-19 19:22:52 +02:00
Michael Kaufmann (d00p)
b4e8458076 enhance findDirs function and filter awstats/webalizer (sub)folders for target-directory selection
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-10-18 15:32:14 +02:00
Michael Kaufmann (d00p)
979b1b0ad8 forgot to add template for subjectAlternativeName stuff in ssl-overview
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-10-18 13:23:35 +02:00
Michael Kaufmann (d00p)
2bee58166b show also Subject-alternative-names in ssl-overview
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-10-18 09:07:20 +02:00
Michael Kaufmann (d00p)
3597a89da3 add missing customer_hide_option for fresh installs
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-10-13 11:08:26 +02:00
Michael Kaufmann (d00p)
f406962dfd allow empty select-value for panel.customer_hide_options
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-10-13 10:48:28 +02:00
Michael Kaufmann (d00p)
ce31a0b3fd enable custom redirect codes also for lighttpd
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-10-13 10:16:17 +02:00
Michael Kaufmann (d00p)
fc2ae594cb enable custom redirect codes also for nginx
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-10-13 09:51:57 +02:00
Michael Kaufmann (d00p)
58c14376d6 set version to 0.9.38-rc1 for upcoming release candidate
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-10-11 07:50:25 +02:00
Michael Kaufmann (d00p)
91c2d4efbe do not redirect when requesting let's encrypt certificates in nginx (same as we do in apache)
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-10-11 07:49:52 +02:00
Michael Kaufmann
e4c12b2c77 Merge pull request #394 from EleRas/hsts
Fix sslsettings in hsts for nginx
2016-10-07 19:25:40 +02:00
Florian Aders
75d8d0b397 Fix sslsettings in hsts for nginx 2016-10-07 19:08:32 +02:00
Michael Kaufmann (d00p)
f1f7d7dd14 add db-version to error-reporting
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-10-07 16:11:23 +02:00
Michael Kaufmann (d00p)
06e44b6e2b fix sql-query in customer_domains when updating domain
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-10-07 16:07:23 +02:00
Michael Kaufmann (d00p)
41c07d5b71 also add new hsts panel settings to froxlor.sql for new installs; refs #1660
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-10-07 11:54:08 +02:00
Michael Kaufmann (d00p)
d198729222 make the hsts domain settings actually saveable; add hsts domain settings for customer-panel; refs #1660
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-10-07 11:48:13 +02:00
Michael Kaufmann (d00p)
4a3e02c1f0 add HSTS for domains (admin-side) and froxlor-vhost; fixes #1660
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-10-07 11:01:45 +02:00
Michael Kaufmann
074d85b40f Merge pull request #390 from FliegenKLATSCH/patch-1
fix group by clause to be more compliant with mysql 5.7
2016-10-04 09:35:24 +02:00
Grigory Morozov
3ff85e167c Update update_0.9.inc.php 2016-09-27 23:08:30 +07:00
FliegenKLATSCH
2e198dbe5c fix default value for domain reg./term. date 2016-09-26 21:08:39 +02:00
Grigory Morozov
dc428b7de2 Adding unique key to ipsandports on upgrade
Please guide on checking the correct Froxlor version, not sure how it works
2016-09-26 23:23:11 +07:00
Grigory Morozov
06a55ef91e Prevent duplicates in ipsandports table 2016-09-26 22:52:03 +07:00
Michael Kaufmann (d00p)
ed0ede645a added ssl-certificate overview for admins and customers to show CN, Issuer, ValidFrom and ValidTo dates
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-09-26 11:48:36 +02:00
Michael Kaufmann
79b839c024 Merge pull request #391 from nachtgeist/master
no longer show NameVirtualHost option for apache 2.4
2016-09-24 23:37:07 +02:00
Daniel Reichelt
02797d9abc no longer show NameVirtualHost option for apache 2.4 2016-09-24 21:59:02 +02:00
FliegenKLATSCH
97d035eee9 fix group by clause to be be compliant with mysql 5.7 2016-09-24 15:30:58 +02:00
Michael Kaufmann (d00p)
9799e05ce4 idna convert the whole URI for uri's in docroot as redirect, fixes #1654
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-09-22 07:46:50 +02:00
Michael Kaufmann (d00p)
98c8f519a6 validate customer entered subdomains, fixes #1653
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-09-21 07:38:07 +02:00
Michael Kaufmann (d00p)
6197a97dc1 Add settings to speficy smtp auth data for mails sent by froxlor
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-09-20 09:41:36 +02:00
Michael Kaufmann (d00p)
6a85c37b48 do not replace multiple quotes with just one, as it leads to possible syntax-errors in php.ini, thx to hp7007
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-09-19 12:17:56 +02:00
Michael Kaufmann (d00p)
a1e4374ada show detailed information about diskspace-usage (web-, mail-, mysql-usage separated)
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-09-19 11:42:08 +02:00
Michael Kaufmann (d00p)
58835ef81f Warning: Non-standard capitalization of includeSubDomains
Header contains the token . The recommended capitalization is .

Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-09-19 10:03:44 +02:00
Michael Kaufmann (d00p)
16751d7446 correct check for existing user in ftp-members list when adding a new customer
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-09-19 07:47:37 +02:00
Michael Kaufmann
e95710d599 Merge pull request #389 from nachtgeist/cleanups
Cleanups
2016-09-18 13:28:31 +02:00
Daniel Reichelt
b366f04743 re-assign new main domain to remaining mainbutsubto-domains 2016-09-17 08:13:10 +02:00
Daniel Reichelt
f3c74bd718 remove unused code 2016-09-17 08:10:32 +02:00
Daniel Reichelt
8e1a1043a5 don't limit this query to emaildomains
...to catch possibly existing orphaned entries in the mail-user/mail-
forwarding tables
2016-09-17 08:10:31 +02:00
Michael Kaufmann
1664896062 Merge pull request #388 from nachtgeist/cleanups
Cleanups
2016-09-16 19:05:41 +02:00
Daniel Reichelt
ec474e2b4c fix "Could not find class 'System'" exceptions 2016-09-16 18:53:29 +02:00
Daniel Reichelt
84ee5a2192 cron/apache: remove echo'ed messages
they already get logged
2016-09-16 18:53:28 +02:00
Michael Kaufmann
a24db0ca6d Merge pull request #387 from nachtgeist/dashboard
display system hostname and some memory info on dashboard
2016-09-16 09:36:27 +02:00
Daniel Reichelt
56c8e90700 display system hostname and some memory info on dashboard
hostname may be useful in situations where several froxlors are
reverse-proxied on a single webserver
2016-09-16 09:16:19 +02:00
Michael Kaufmann
e9d438f8cf Merge pull request #386 from nachtgeist/issue-1650
fix #1650
2016-09-16 08:00:51 +02:00
Daniel Reichelt
41e769d681 cron/nginx: remove ssl_client_certificate
Adding the CA certificate to an nginx vhost via ssl_client_certificate is
outright wrong. Moreover, the CA certificate data is already written to
the certificate file itself (class.DomainSSL.php:83-85).

fixes #1650
2016-09-16 07:51:18 +02:00
Daniel Reichelt
d8b6d87ade cron/nginx: remove echo'ed messages
they already get logged
2016-09-16 07:51:17 +02:00
Michael Kaufmann
506c5ac27a Merge pull request #385 from nachtgeist/master
fix variable identifier in HttpConfigBase::getMyPath()
2016-09-13 12:41:05 +02:00
Daniel Reichelt
c6ba9df18a fix variable identifier in HttpConfigBase::getMyPath() 2016-09-13 12:01:09 +02:00
Michael Kaufmann (d00p)
4229d8dda4 make path to acme.conf global alias file customizable
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-09-12 11:49:07 +02:00
Michael Kaufmann (d00p)
3b157a8c66 do not hide unavailable options, just disable them so people can see what is actually possible but just not available due to webserver-usage or other settings
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-09-12 11:23:29 +02:00
Michael Kaufmann (d00p)
b8c2047379 try to implement ssl-redirect for froxlor-vhost; combine various settings that are froxlor-vhost related into its own category, fixes #1480
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-09-11 17:48:08 +02:00
Michael Kaufmann
28461de7bc Merge pull request #384 from jakoch/patch-1
fix error, when trying to call function logAction() on undefin…
2016-09-11 13:09:03 +02:00
Jens A. Koch
c51840e760 bugfix for error, when trying to call function logAction() on undefined var $cronlog 2016-09-11 12:00:26 +02:00
Michael Kaufmann
a21d19bdcd Merge pull request #383 from nachtgeist/le-1652
LE: don't re-use old CSRs, always generate new ones; LE: change log level to LOG_INFO; fixes #1652
2016-09-11 08:13:03 +02:00
Michael Kaufmann
6c4d9ccbf7 Merge pull request #382 from nachtgeist/warnings
fix "undefined index" warnings
2016-09-11 08:12:12 +02:00
Daniel Reichelt
d56afda274 fix "undefined index" warnings
PHP Notice:  Undefined index: parentdomainid in
[…]/froxlor/lib/classes/webserver/class.DomainSSL.php on line 49
2016-09-11 02:27:43 +02:00
Daniel Reichelt
b8bfd7ff4c LE: don't re-use old CSRs, always generate new ones
fixes #1652
2016-09-11 00:51:42 +02:00
Daniel Reichelt
d1a3defef0 LE: change log level to LOG_INFO 2016-09-11 00:51:41 +02:00
Michael Kaufmann (d00p)
08f36243e9 only renew froxlor.panel LE cert if required
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-09-08 12:28:43 +02:00
Michael Kaufmann (d00p)
e4887362ec added let's encrypt for froxlor vhost - untested for now, testers are welcome
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-09-05 17:01:10 +02:00
Roman Schmerold
290d06e2c4 Merge pull request #379 from oliverrahner/patch-1
Letsencrypt: only update registration when necessary
2016-09-05 07:13:42 +02:00
Oliver Rahner
9260319ac1 Letsencrypt: only update registration when necessary
if no Terms of Service are presented by the ACME server when registering, don't update registration
2016-09-04 21:27:23 +02:00
Michael Kaufmann
78ab90f469 Merge pull request #378 from oliverrahner/patch-1
Remove dependency on hard coded agreement URL for Let's Encrypt
2016-09-02 07:42:26 +02:00
Oliver Rahner
34767a14d5 Remove dependency on hard coded agreement URL for Let's Encrypt
Change the process to first create a new registration, which delivers the current TOS url in the response's header, then modify the newly created registration to accept the agreement.
2016-08-31 16:35:59 +02:00
Michael Kaufmann (d00p)
d7388f20e6 fix idna convert for >=php-5.6 users when customers want to add a subdomain with an idna-encoded domain
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-08-31 15:12:01 +02:00
Michael Kaufmann
8f488d7701 Merge pull request #377 from oliverrahner/patch-1
do not die after token self check
2016-08-29 10:47:23 +02:00
Oliver Rahner
7f56e98009 do not die after token self check
We have to finish the challenge request so that the auth does not linger in state "pending", but goes to "invalid". See https://forum.froxlor.org/index.php/topic/13463-lets-encrypt-zertifikate-werden-nicht-erneuert/#entry32895
2016-08-29 10:46:21 +02:00
Michael Kaufmann (d00p)
a840905166 set version specific user-agent in lescript like we do in ajax stuff
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-08-28 14:07:13 +02:00
Michael Kaufmann
3757db28f4 Merge pull request #376 from w6g23/LE-UserAgent
Set a User Agent in the HTTP request fetching the LE challenge URI
2016-08-28 14:04:01 +02:00
w6g23
d31589ba99 Set a User Agent in the HTTP request fetching the LE challenge URI for self check
A rule (e.g. Wordpress plugin iThemes) might block requests with empty
User Agents.
2016-08-28 12:59:09 +02:00
Michael Kaufmann (d00p)
45b6d8d571 add possibility to allow customers to select a shell for their ftp-users, with great thanks to KAPPER NETWORK-COMMUNICATIONS GmbH - kapper.net
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-08-26 10:46:15 +02:00
Michael Kaufmann
11b2d0e1d2 Merge pull request #375 from micw/master
Added unit (MiB) to email quota label
2016-08-26 09:44:03 +02:00
Michael Wyraz
d7fc9cde57 Added unit (MiB) to email quota label 2016-08-26 09:42:38 +02:00
Michael Kaufmann (d00p)
b162fb6e99 avoid double encoding of Punycode as with php-5.6 the 'new' idna class throws exceptions, thx to housequake
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-08-26 09:41:19 +02:00
Michael Kaufmann (d00p)
2f6e34d878 do not ssl-redirect when let's encrypt tries to validate the domain, fixes #1649
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-08-25 22:08:32 +02:00
Michael Kaufmann
a47ab55cdd Merge pull request #374 from micw/master
append wildcards to search if user did not enter any
2016-08-23 07:27:39 +02:00
Michael Wyraz
dd4cfebe75 append wildcards to search if user did not enter any 2016-08-22 15:55:13 +02:00
Michael Kaufmann (d00p)
818268482e fix typo
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-08-20 22:09:48 +02:00
Michael Kaufmann (d00p)
8431a82f2c check for correct extension for auto-update feature, fixes #1648
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-08-20 09:16:33 +02:00
Michael Kaufmann (d00p)
2444158bbb do not truncate pdns tables, instead just remove entries that are related to froxlor-managed domains; this allows the admin to create custom zones/records in pdns if needed/wanted
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-08-12 09:45:26 +02:00
Michael Kaufmann (d00p)
003005f295 keep compatibility and do not generate pdns records/zone when custom zonefile is set
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-08-07 17:56:03 +02:00
Michael Kaufmann (d00p)
731427255e fix call to undefined method pdns::_generateDomainConfig() in PowerDNS cronjob when using custom zone-file in a domain
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-08-07 17:22:28 +02:00
Michael Kaufmann (d00p)
468d20ee57 really reuse old csr if given + code formatting
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-08-06 09:32:03 +02:00
Michael Kaufmann (d00p)
d994379130 do not idna-encode already encoded domain when addin a new email address (only an issue when using >=php-5.6
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-08-06 07:41:06 +02:00
Michael Kaufmann (d00p)
cd806b19f7 update let's encrypt subscriber agreement to v1.1.1
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-08-06 07:40:14 +02:00
Michael Kaufmann (d00p)
e17a2eff4a fix auto-generated dns zone when using multiple MX records and superfluous whitespace, fixes #1646
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-08-06 07:39:37 +02:00
Michael Kaufmann
690b25a6f5 Merge pull request #372 from schallertd/master
Fixed formatting
2016-08-06 07:19:38 +02:00
Dominic
e31c828f35 Fixed formatting
Nothing added, just a formatting fix
2016-08-06 06:31:15 +02:00
Michael Kaufmann (d00p)
cdd97b142f extract auto-update archive to correct folder regardless of the folder being named 'froxlor' or not, future auto-update archives will not have the froxlor-folder prefixed, fixes #1645
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-08-04 21:49:33 +02:00
Michael Kaufmann (d00p)
b2f815617c Update Let's Encrypt subscriber agreement, fixes #1644
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-08-04 07:40:08 +02:00
Michael Kaufmann (d00p)
11d358133e Merge branch 'master' of github.com:Froxlor/Froxlor 2016-08-02 13:47:52 +02:00
Michael Kaufmann (d00p)
0e77d5ab94 stay php-5.3 compatible
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-08-02 13:41:58 +02:00
Robert Förster (Dessa)
51152ef026 fix lintians executable-not-elf-or-script 2016-08-02 11:40:37 +02:00
Michael Kaufmann (d00p)
f5dc8aa1c9 set version to 0.9.37 for upcoming release
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-08-02 08:51:34 +02:00
Michael Kaufmann (d00p)
ceaa0fcf5c Update phpMailer to version 5.2.16
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-08-02 08:50:22 +02:00
Michael Kaufmann (d00p)
cc372ba89b show DNS editor only if nameserver is activated at all
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-08-02 07:58:23 +02:00
Michael Kaufmann (d00p)
526eb84b71 Remove superfluous exit-statement
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-08-01 15:05:58 +02:00
Michael Kaufmann
14e54ff41a Merge pull request #368 from micw/feature-zugang-zu-ausgeblendeten-seiten-sperren
If a customer's page is hidden from menu via settings, redirect the user if he tries to access the page
2016-08-01 15:03:48 +02:00
Michael Kaufmann (d00p)
aa76ae4ddc check for uid/gid or username/groupname correctly in config-xml files, fixes #1642
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-08-01 08:47:45 +02:00
Michael Kaufmann (d00p)
f1b7d731bd Fix #2 Parameter 3 to getFormFieldDataXXX() expected to be a reference, value given since php-7.0.9
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-07-29 09:13:34 +02:00
Michael Wyraz
e3587fb346 If a customer's page is hidden from menu via settings, redirect the user if he tries to access the page 2016-07-27 13:45:54 +02:00
Michael Kaufmann (d00p)
e5c649aba3 Add dns-editor icon/link to domain-overview list
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-07-27 07:48:25 +02:00
Michael Kaufmann
4a3b64b497 Merge pull request #367 from micw/feature-optionen-fuer-kunden-ausblenden
Feature: Panel setting to hide certain menu items and traffic charts from customers
2016-07-25 08:00:37 +02:00
Michael Wyraz
54e2f83b17 function Settings::IsInList that tests if an option of a multi-select setting is set 2016-07-22 10:30:13 +02:00
Michael Wyraz
a95233041e Better translations for new feature to hide menu items and traffic charts from customer panel 2016-07-22 09:56:40 +02:00
Michael Wyraz
5165cac4e2 Hide http/ftp/mail traffic charts based on new settings 2016-07-22 09:44:20 +02:00
Michael Wyraz
d31c4fa37c Hide customer menu items based on new settings 2016-07-22 09:31:20 +02:00
Michael Wyraz
084e72968a Moved new texts to end of language file 2016-07-22 09:30:55 +02:00
Michael Wyraz
6ab8cb1d7c Adding option to hide some elements in customer panel 2016-07-21 15:53:14 +02:00
Michael Kaufmann (d00p)
6589653667 set version to 0.9.37-rc1 for upcoming release candidate
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-07-18 16:47:19 +02:00
Michael Kaufmann (d00p)
c3753478f2 add newline after custom options to avoid possible syntax error in apache-config, thx to J-BBB for testing
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-07-14 09:14:37 +02:00
Michael Kaufmann (d00p)
b63fc5b508 fix glued strings in german language file
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-07-14 08:45:10 +02:00
Michael Kaufmann (d00p)
3d2cb879b0 actually use the new setting for custom directory options file content, refs #1638
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-07-14 08:36:14 +02:00
Michael Kaufmann (d00p)
8366e57512 Adding new setting for mod_php users to specify content of the global directory options file, fixes #1638
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-07-14 08:25:28 +02:00
Michael Kaufmann (d00p)
1c369e5503 add possibility to disable web or traffic cron by setting the max-percentage value to 0, fixes #1639
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-07-14 07:58:56 +02:00
Michael Kaufmann (d00p)
83f40401be fix change_date for PDNS records
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-07-11 09:15:21 +02:00
Michael Kaufmann
19456e9b30 Merge pull request #365 from nachtgeist/master
generic html form handling: don't remove leading tabs
2016-06-24 09:09:23 +02:00
Daniel Reichelt
7d2c64ce63 generic html form handling: don't remove leading tabs
(+remove commented out code in the vicinity, probably debugging remnants)
2016-06-24 08:43:02 +02:00
Michael Kaufmann (d00p)
3f790bc334 keep the same structure for every distro + minor permission fixes
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-06-24 08:03:42 +02:00
Michael Kaufmann (d00p)
164e1108e5 fix for sql changes, refs #1635
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-06-24 07:49:52 +02:00
Michael Kaufmann (d00p)
8fe20251f3 try to be more strict-mode compatible, fixes #1635
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-06-24 07:42:23 +02:00
Michael Kaufmann (d00p)
a121363dd2 update pdns-config templates / commands
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-06-24 07:38:19 +02:00
Michael Kaufmann (d00p)
7ec777c9dd put index back in location-context; try_files not really necessary if not using PHP, also eases use of proxy_pass users; thx to karstenk
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-06-20 09:55:27 +02:00
Michael Kaufmann
77aa58a0a3 Merge pull request #362 from nachtgeist/master
don't split .gitignore
2016-06-20 06:26:45 +02:00
Daniel Reichelt
1e8bc553b8 fix/add SAPI checks to prevent execution via webserver 2016-06-19 23:43:42 +02:00
Daniel Reichelt
6df08f6b9a don't split .gitignore
they would end up in .deb packages
2016-06-19 23:09:04 +02:00
Michael Kaufmann (d00p)
5e9e2996d7 avoid php-5.6 operator
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-06-19 22:08:17 +02:00
Michael Kaufmann (d00p)
6f8aa1cbc0 update another idnaconvert related class
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-06-19 20:22:00 +02:00
Michael Kaufmann (d00p)
b22e70804b update new IdnaConvert class with needed fixes in them
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-06-19 20:15:33 +02:00
Michael Kaufmann (d00p)
5789e9a8a4 re-add old IDNA class so we do not have to force the php-5.6 requirement for froxlor
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-06-19 18:59:44 +02:00
Michael Kaufmann
6c55a40606 Merge pull request #361 from Froxlor/dns-subzone
Dns subzone fixes by nachtgeist
2016-06-18 08:06:51 +02:00
Daniel Reichelt
b4f90730cc unify "reloading" the dns daemon 2016-06-18 02:33:03 +02:00
Daniel Reichelt
50317da185 dns: no separate zonefiles for ismainbutsubto domains 3/3
replace iteration over $domains array by recursive walkDomainList()
2016-06-18 02:33:02 +02:00
Daniel Reichelt
631e36f4d5 dns: no separate zonefiles for ismainbutsubto domains 2/3
rewrite getDomainList() to contain parent-relations
2016-06-18 01:47:16 +02:00
Daniel Reichelt
a400fc9c65 dns: no separate zonefiles for ismainbutsubto domains 1/3
move log message
2016-06-18 01:47:12 +02:00
Daniel Reichelt
5f9962b6ba dns: fix generation of zone serials 2016-06-17 22:25:35 +02:00
Daniel Reichelt
d6dc71436a dns: fix generation of imap/pop3/mail/smtp A/AAAA-records
The dns-editor introduced a regression where imap/pop3/mail/smtp A-records
would not get created, even tough the setting system.dns_createmailentry was
enabled.

fix A fix
2016-06-17 22:25:21 +02:00
Daniel Reichelt
b6f99958fd dns: fix generation of alias records for subdomains
The checks whether or not to create wildcard/www records for subdomains
wrongly depended on the setting of the parent domain instead of the
subdomain in question.
2016-06-17 19:43:36 +02:00
Michael Kaufmann (d00p)
9a89f06bf0 Merge branch 'master' of github.com:Froxlor/Froxlor 2016-06-16 11:03:10 +02:00
Michael Kaufmann (d00p)
843845a825 Update Idna-Converter to version 1.0.2 (default IDNA standard is now 2008)
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-06-16 11:03:02 +02:00
Michael Kaufmann
0b93ba3dde Merge pull request #360 from nachtgeist/master
cron_traffic: replace echo by log message
2016-06-15 16:33:19 +02:00
Daniel Reichelt
bd36145ad6 cron_traffic: replace echo by log message 2016-06-15 16:15:34 +02:00
Michael Kaufmann (d00p)
88ccf5b869 don't generate unnecessary php-related vhost-entries when php is disabled, thx to karstenk
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-06-14 07:29:38 +02:00
Michael Kaufmann (d00p)
5866293a25 add script to change ip-addresses in froxlor from CLI and updated corresponding settings. Helpful for VM-template installations or similar. Use at own risk; feedback is appreciated
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-06-13 13:45:23 +02:00
Michael Kaufmann
d2711889de Merge pull request #359 from flokli/lng-typos
Fix language typos
2016-06-08 06:23:37 +02:00
Florian Klink
82af43f598 lng/english: unify upper/lowercase string in $lng['panel']
Some where lowercase, some uppercase. Especially in the Cancel/save case
this looked weird.

This patch changes all button labels to their uppercase form.
2016-06-07 22:36:45 +02:00
Florian Klink
7a36f5edac lng: fix typo decending -> descending 2016-06-07 22:33:24 +02:00
Michael Kaufmann
480d21f555 Merge pull request #358 from ohader/SecDatabaseInformationDisclosure
[SECURITY] Information disclosure on database failures
2016-06-04 21:47:12 +02:00
Oliver Hader
2e7133d619 [SECURITY] Information disclosure on database failures
In case the database is not responding, e.g. due to "too many connections"
cut-off database credentials might be shown and system path be revealed.
In terms of security this is considered as information disclosure.
2016-06-04 20:41:03 +02:00
Michael Kaufmann
85f707af8a Merge pull request #357 from yaplik/master
fix non-persistent XSS due inproper content escaping
2016-06-03 16:29:28 +02:00
Jiří Zapletal
970a119f23 fix non-persistent XSS due inproper content escaping 2016-06-03 16:20:34 +02:00
Stefan Heid
7faebbb197 BUGFIX: Cleaninstall fails due syntax error in froxlor.sql (missing comma) (#356) 2016-06-02 21:21:40 +02:00
Michael Kaufmann
08d505b308 Merge pull request #355 from Froxlor/dns-editor
Add full dns editor + powerdns to froxlor; fixes #53, fixes #731, fixes #1196,
2016-05-30 09:09:15 +02:00
Michael Kaufmann (d00p)
1b0649d0cf replace CUSTOMER_TMP with the correct tmp-folder, depending what php-interface is being used
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-05-29 09:56:33 +02:00
Michael Kaufmann (d00p)
e5c16439e1 replace config-template-variables also in commands to be executed, e.g. used in proftpd ssl-cert generation command
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-05-29 09:41:38 +02:00
Michael Kaufmann (d00p)
151d8f8c5c Merge remote-tracking branch 'origin/master' into dns-editor 2016-05-23 15:55:24 +02:00
Michael Kaufmann (d00p)
08563e9298 add more opcache-php.ini directives for php-fpm, fixes #1624
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-05-23 13:01:05 +02:00
Michael Kaufmann (d00p)
b51f0821cb show scheduled backup and give customer the possiblity to abort the job
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-05-22 11:08:44 +02:00
Michael Kaufmann (d00p)
339d84736e no quotation of dns data for powerdns
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-05-21 09:03:21 +02:00
Michael Kaufmann (d00p)
7ea1de2a92 allow defined non-existing entry for SRV target-value for real now, i guess
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-05-20 16:21:55 +02:00
Michael Kaufmann (d00p)
be373e278f allow defined non-existing entry for SRV target-value
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-05-20 16:17:33 +02:00
Michael Kaufmann (d00p)
61eab6fd93 do not validate fqdn of SRV and TXT entries, as they might use underscores
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-05-20 15:56:06 +02:00
Michael Kaufmann (d00p)
c2b0714b4a powerdns needs the 'whole' record (., e.g. sub.example.com)
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-05-19 13:49:22 +02:00
Michael Kaufmann (d00p)
5c1079e04b Add change_date value to the pdns-record entries
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-05-19 12:09:04 +02:00
Michael Kaufmann (d00p)
257f65bd1b add powerdns config-templates for distros
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-05-19 10:29:17 +02:00
Michael Kaufmann (d00p)
96ff346e54 fix powerdns-config template
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-05-19 09:28:46 +02:00
Michael Kaufmann (d00p)
076b6143ce limit record length
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-05-18 15:55:20 +02:00
Michael Kaufmann (d00p)
1e3262d691 do not show dns-editor to customers if not allowed and they enter the URL manually
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-05-18 13:54:21 +02:00
Michael Kaufmann (d00p)
94af32fb82 Merge remote-tracking branch 'origin/master' into dns-editor 2016-05-18 13:40:41 +02:00
Michael Kaufmann (d00p)
1f63ea10a0 adjust install sql file for dnsenabled flag and db-version
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-05-18 13:39:46 +02:00
Michael Kaufmann (d00p)
fa60c17dbc fix sql-query when editing a customer; check for dnsenabled flag in customer-domain-view template
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-05-18 13:32:44 +02:00
Michael Kaufmann (d00p)
b4c7fb574c increase DB version for db-updates
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-05-18 13:27:56 +02:00
Michael Kaufmann (d00p)
83fa0059de add flag to allow access to dns-editor per customer; clean up dns-entries when domain gets deleted
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-05-18 13:25:31 +02:00
Michael Kaufmann (d00p)
d97957e558 array short-syntax is only PHP >= 5.4
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-05-18 12:12:34 +02:00
Michael Kaufmann (d00p)
9d16790f5b Update phpMailer to 5.2.15
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-05-18 10:43:16 +02:00
Michael Kaufmann (d00p)
b14ab6b1c1 validate record/label in dns-editor; better escaping for soa-admin mail
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-05-18 10:35:47 +02:00
Michael Kaufmann (d00p)
b029fe113e Merge remote-tracking branch 'origin/master' into dns-editor 2016-05-18 10:34:14 +02:00
Michael Kaufmann (d00p)
6ea4655fd8 set version to 0.9.36 for upcoming release
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-05-18 10:32:52 +02:00
Michael Kaufmann (d00p)
477c99b4de Merge remote-tracking branch 'origin/master' into dns-editor 2016-05-18 10:31:05 +02:00
Michael Kaufmann (d00p)
eb70e619c9 also check for punycode when customer adds a subdomain
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-05-18 10:28:13 +02:00
Michael Kaufmann (d00p)
41e4135f71 do not allow punycode input in domain-names
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-05-18 09:03:14 +02:00
Michael Kaufmann (d00p)
1ce5cf6c00 various fixes for dns with froxlor-hostname
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-05-17 09:12:39 +02:00
Michael Kaufmann (d00p)
f7441df895 add missing file inclusion
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-05-17 08:43:02 +02:00
Michael Kaufmann (d00p)
69443d95d5 add support for power-dns (untested); most config-templates missing for pdns; create SPF/DKIM entries only if domain is emaildomain
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-05-17 08:30:02 +02:00
Michael Kaufmann (d00p)
11e923453e Merge remote-tracking branch 'origin/master' into dns-editor 2016-05-16 19:59:27 +02:00
Michael Kaufmann (d00p)
b03eab897a show a2enmod commands only when using apache, thx to d4n13L
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-05-16 18:41:01 +02:00
Michael Kaufmann
25ff78e295 Merge pull request #353 from nachtgeist/le
LE improvements, fixes #1597
2016-05-16 17:42:38 +02:00
Daniel Reichelt
6e2b1773a3 LE: support alias domains
LE CSRs are triggered for the aliasdomain target domain on

* domain deletion

* domain creation

* domain editing when
  * the aliasdomain target changes (CSR triggered both for old and new
    target)
  * wwwalias is disabled or enabled
  * letsencrypt is disabled or enabled (domain-local)

fixes #1597
2016-05-16 17:35:51 +02:00
Daniel Reichelt
f3e05742b5 LE: change semantics of setting.letsencryptreuseold
Previously setting.letsencryptreuseold determined wheter both a domain's
private key and a CSR should be re-generated.

Preparing support of alias domains in LE certificates, this is changed to
only determine the re-generation of the private key. CSRs now are always
re-generated.
2016-05-16 17:35:51 +02:00
Daniel Reichelt
001f10f74e LE: catch error due to rate-limited account registration
and fix bad english in log message
2016-05-16 17:35:51 +02:00
Daniel Reichelt
712aebb864 LE: improve SQL readability 2016-05-16 17:35:51 +02:00
Daniel Reichelt
0ae0178b4c LE: PSR-2 formatting 2016-05-16 17:35:51 +02:00
Michael Kaufmann (d00p)
1d4211a5ce remove wrong a2* commands for rhel/centos
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-05-16 17:20:49 +02:00
Michael Kaufmann (d00p)
28115e6b1d add missing german language string
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-05-15 10:08:42 +02:00
Michael Kaufmann (d00p)
68fa0e6576 let createDomainZone() return the DnsZone object for better use later
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-05-15 09:56:48 +02:00
Michael Kaufmann (d00p)
8d8da0986a fix typo in DnsEntry class
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-05-15 08:53:47 +02:00
Michael Kaufmann (d00p)
e0e748a0bc outsource record-generation and zone-generation to classes for better handling
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-05-15 08:46:23 +02:00
Michael Kaufmann (d00p)
da785500cc remove invalid self-closing <file /> tag as it produces php-notices and was just added for design reasons
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-05-14 18:39:18 +02:00
Michael Kaufmann (d00p)
02654a256d fix sql query in getAllowedDomainEntry()
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-05-14 08:59:46 +02:00
Michael Kaufmann (d00p)
552c6e6cf9 add 'enable dns editor'-setting; fix missing isbinddomain index in customer_domain
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-05-14 08:32:38 +02:00
Michael Kaufmann (d00p)
86dc57c2cc outsource some dns functions to own files; allow opening of dns-editor only for domains that belong to the user (or the user has permission to edit as admin/reseller)
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-05-13 19:40:37 +02:00
Michael Kaufmann (d00p)
11eb08e031 add enabled-flag; enable dns-editor for customers; add german translations; few more fixes
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-05-13 13:27:33 +02:00
Michael Kaufmann (d00p)
4a4acc5c01 fix constructor of DnsBase 2016-05-12 14:32:41 +02:00
Michael Kaufmann (d00p)
899663350d fix handling of DKIM multi-line entries; outsource some code to new DnsBase class
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-05-12 13:36:17 +02:00
Michael Kaufmann (d00p)
689a1fdbd2 inform cronjob to regenerate bind-configs on changes
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-05-12 10:18:45 +02:00
Michael Kaufmann (d00p)
cec5f33870 fix checking for existing SPF entry in DNS
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-05-12 10:14:04 +02:00
Michael Kaufmann (d00p)
bd9ef50e94 correct SPF dns entry for new layout
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-05-12 09:47:36 +02:00
Michael Kaufmann (d00p)
68d579b629 add SPF and DKIM stuff to DNS
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-05-12 09:36:33 +02:00
Michael Kaufmann (d00p)
0404618c24 add experimental bind-cron for testing purposes
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-05-11 18:10:17 +02:00
Michael Kaufmann (d00p)
9b5ce83e8b add testing-bind-cron for new dns-stuff (not activated); added main-but-subdomain-stuff
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-05-11 16:11:23 +02:00
Michael Kaufmann (d00p)
7379398d22 set correct primary nameserver for SOA record
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-05-11 13:47:36 +02:00
Michael Kaufmann (d00p)
d1106dd984 fix wrong unset of array-element
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-05-11 07:44:32 +02:00
Michael Kaufmann (d00p)
b775c2f60e minor fixes
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-05-10 19:20:01 +02:00
Michael Kaufmann (d00p)
407a7c01aa add createDomainZone function for new dns-editor; dump zone below the editor for testing purposes; all required entries that are not custom entered will be auto-generated like the bind-cron does this for now
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-05-10 14:11:01 +02:00
Michael Kaufmann (d00p)
bb9331904e (really) fix PHP notice #2048 Only variables should be passed by reference, thx to baudetail
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-05-10 11:55:03 +02:00
Michael Kaufmann (d00p)
64d068659f more validation for NS and SRV records; fix display of long records
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-05-10 10:54:59 +02:00
Michael Kaufmann (d00p)
e33d7b756f add missing error-language-string; check whether domain is bind-domain
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-05-10 07:37:42 +02:00
Michael Kaufmann (d00p)
283e272b99 enhance MX validation; fix SRV validation
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-05-10 07:37:42 +02:00
Michael Kaufmann (d00p)
31d08d532c fix missing auto-increment for new table
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-05-10 07:37:42 +02:00
Michael Kaufmann (d00p)
5acd51fdd3 add first part of new dns-editor
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-05-10 07:37:42 +02:00
Michael Kaufmann (d00p)
6369e160b8 fix nscd group cache clearing call; refs #1570
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-05-09 21:33:07 +02:00
Michael Kaufmann (d00p)
5e09d56871 clear nscd group cache after adding a new customer to avoid permission issues of webserver; fixes #1570
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-05-09 08:27:01 +02:00
Michael Kaufmann (d00p)
0e79e8d670 fix default_server parameter for listen-statement in nginx since this changed since ngninx-0.8.21; fixes #1621
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-05-09 08:08:59 +02:00
Michael Kaufmann (d00p)
941a25ec9d avoid possible weird behaviour when resultset changes while running (if possible at all)
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-05-05 08:43:28 +02:00
Michael Kaufmann (d00p)
2210d3de12 fix mail-account backup; fix missing job description for admin-dashboard (outstanding tasks); avoid double backup-task insertion when customer presses refresh after scheduling the backup-job
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-05-05 08:23:46 +02:00
Michael Kaufmann
ae01f2cdb9 Merge pull request #351 from Froxlor/backup
Add Customer Backup Feature, fixes #786, fixes #975, fixes #1544, fixes #1576
2016-04-29 10:32:58 +02:00
Michael Kaufmann (d00p)
e8e980509f fix missing backup-enabled setting entry
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-04-29 10:27:19 +02:00
Michael Kaufmann (d00p)
b2cd992f92 add important information that the customer should protect the backup directory using htaccess
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-04-29 10:27:19 +02:00
Michael Kaufmann (d00p)
7c44c5ea75 handle exit of forked backup-cronjob correctly
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-04-29 10:27:19 +02:00
Michael Kaufmann (d00p)
b1446d366e add possibility to enable/disable backup function
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-04-29 10:27:19 +02:00
Michael Kaufmann (d00p)
9bfd5eb17e --exclude is relativ to path given via -C parameter
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-04-29 10:27:19 +02:00
Michael Kaufmann (d00p)
fb555027fd fix -C parameter and --exclude parameter for good now
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-04-29 10:27:19 +02:00
Michael Kaufmann (d00p)
05974de4d5 fix tar -C parameter again...
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-04-29 10:27:19 +02:00
Michael Kaufmann (d00p)
9c9bbb81de fix tar -C parameter and create_backup_tar_data list
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-04-29 10:27:18 +02:00
Michael Kaufmann (d00p)
ef7da53806 change directory before creating tarball to avoid having complete paths in it
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-04-29 10:27:18 +02:00
Michael Kaufmann (d00p)
a26ebb375b set db version for changes
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-04-29 10:27:18 +02:00
Michael Kaufmann (d00p)
c8bbefb2bb add simple backup-function for customers (testing state)
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-04-29 10:27:18 +02:00
Michael Kaufmann (d00p)
a485d9f4f9 TLSECCertificateFile and TLSECCertificateKeyFile for proftpds mod_tls require 1.3.5rc4 and later but Ubuntu 14.04 only provides 1.3.5rc3
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-04-19 13:31:09 +02:00
Michael Kaufmann (d00p)
f8be36d229 fix PHP notice #2048 Only variables should be passed by reference
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-04-17 13:44:42 +02:00
Michael Kaufmann (d00p)
28f0c3eac4 only include acme.conf to vhosts if system has ssl and LE enabled (might not exist if not)
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-04-15 15:09:11 +02:00
Michael Kaufmann
e8f5fc1a8a Merge pull request #347 from floreno/patch-3
min-height against height fix for ajax-changing-content
2016-04-12 07:36:37 +02:00
Michael Kaufmann (d00p)
a014b5cc2b minor preparations for system-hostname as 'normal' domain (to use ssl/LE/etc.)
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-04-11 09:19:43 +02:00
Michael Kaufmann (d00p)
84f1d94ad6 check for php-curl installed when cron_letsencrypt runs; format source
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-04-11 08:02:18 +02:00
Michael Kaufmann (d00p)
8565dbce8b insert task 99 (regeneration of /etc/cron.d/froxlor file) to the list of task when clicking on 'Regenerate configfiles'
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-04-11 08:01:38 +02:00
Michael Kaufmann (d00p)
72d1282651 require php-curl
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-04-11 08:00:38 +02:00
floreno
d474f2ec8f min-height against height fix for ajax-changing-content 2016-04-11 06:55:48 +02:00
Michael Kaufmann
252b42ee57 Merge pull request #346 from nachtgeist/master
fixes #1615
2016-04-10 19:08:33 +02:00
Daniel Reichelt
0dfaf376c0 remove obsolete language strings 2016-04-10 02:59:23 +02:00
Daniel Reichelt
2a05b89cc8 add explicit warning about sub-zones on usage of zonefiles 2016-04-10 02:59:23 +02:00
Daniel Reichelt
576c94f83c fix #1615 2016-04-10 02:59:22 +02:00
Michael Kaufmann (d00p)
5331127204 set version to 0.9.35.1; fix updater :x
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-04-08 13:52:06 +02:00
Michael Kaufmann (d00p)
57f9c439f2 set version to 0.9.35 final for upcoming release
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-04-08 12:54:17 +02:00
Michael Kaufmann (d00p)
c14017c244 fix display of path in customer-extras
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-04-07 07:56:16 +02:00
Michael Kaufmann
82cd5986a0 Merge pull request #343 from eis-os/simplify_master_cronjob
Simplify master cronjob
2016-03-31 15:43:15 +02:00
eis_os
032a991b8f Simplify master cronjob 2016-03-31 15:02:04 +02:00
Michael Kaufmann
200f589252 Merge pull request #341 from bashgeek/letsencrypt_stagingfix
Let's Encrypt: Always regenerate a new account-key, if staging
2016-03-23 18:40:54 +01:00
Daniel Schmitz
3405c7e313 Let's Encrypt: Always regenerate a new account-key, if staging 2016-03-24 01:26:57 +08:00
Michael Kaufmann (d00p)
30bd81064c make newly added settings available immediately
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-03-23 00:11:00 +01:00
Michael Kaufmann (d00p)
924a607183 fix isDatabaseVersion if it does not yet exist, thx to andy__
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-03-23 00:00:35 +01:00
Roman Schmerold
f1460d169d Fixed db query error, fixes #1611 2016-03-16 22:17:30 +01:00
Roman Schmerold (BNoiZe)
f5e2afaa0a Add LE icon to admin domain list
Signed-off-by: Roman Schmerold (BNoiZe) <bnoize@froxlor.org>
2016-03-16 17:54:11 +01:00
Michael Kaufmann (d00p)
228d07ca66 output error in case of a server-error from LE, fixes #1609
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-03-15 17:45:43 +01:00
Michael Kaufmann (d00p)
3294bbf9b4 add a linebreak just in case some customizations did not end their lines with a linebreak
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-03-15 17:17:06 +01:00
Michael Kaufmann (d00p)
a849f35469 fix duplicate db-updates due to new db-version stuff
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-03-15 17:14:41 +01:00
Michael Kaufmann (d00p)
104383d31e add a few opcache relevant php-ini directives to be used with php-fpm; add opcache.restrict_api to the default php-config for each domain with the customer's docroot as default value
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-03-15 17:05:09 +01:00
Michael Kaufmann (d00p)
1dd9bcbbe0 remove superfluous value-tag in visibility-tag (jessie-XML)
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-03-13 19:50:56 +01:00
Michael Kaufmann
05d57a8af7 Merge pull request #340 from nachtgeist/public
jessie configs: override starting order of apache2 and nscd, fixes #1605
2016-03-13 19:49:23 +01:00
Daniel Reichelt
630ecfb148 jessie configs: override start order of webserver and nscd
fixes #1605
2016-03-13 19:02:11 +01:00
Daniel Reichelt
d545734072 ConfigDaemon: add notisfile/notisdir visibility conditions 2016-03-13 19:00:50 +01:00
Michael Kaufmann (d00p)
c903b759bb fix path for acme.conf in debian wheezy apache-2.2, fixes #1604
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-03-12 09:52:24 +01:00
Michael Kaufmann (d00p)
579854f5a5 handle the case when gethostbynamel() returns false to act like gethostbyname() in support for multi homed name servers
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-03-11 21:23:26 +01:00
Michael Kaufmann
6b032839ce Merge pull request #339 from KZumbusch/feature/support-for-multi-homed-dns-servers
Support for multi homed DNS servers
2016-03-11 21:16:46 +01:00
Michael Kaufmann (d00p)
be1d9a045a actually use the selected value for server-alias when editing a subdomain, thx to Aragorn
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-03-10 14:13:44 +01:00
Michael Kaufmann (d00p)
8bc19e3893 fix intendation
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-03-10 12:12:19 +01:00
Michael Kaufmann (d00p)
f9740ff545 check whether an email account is to be deleted when re-adding an email account with the same name, fixes #1519
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-03-10 10:54:32 +01:00
Michael Kaufmann (d00p)
2b2ca99a2b indeed something strange happened here, thx Marco01809
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-03-09 23:57:35 +01:00
Kay Zumbusch
641ee1f8a6 added check for invalid responses from gethostbynamel
fixed indent
2016-03-09 21:01:47 +01:00
Kay Zumbusch
52448571ea added support for multi homed name servers 2016-03-09 20:40:41 +01:00
Michael Kaufmann (d00p)
7bba4112b9 allow setting the serveralias option also for subdomains (because, why not? Might come in handy for LE users); add a few strings for autoupdate in german language file
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-03-09 20:03:49 +01:00
Michael Kaufmann (d00p)
efd64300c4 clearify that a special config is needed for LE in the webserver
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-03-08 14:50:31 +01:00
Michael Kaufmann (d00p)
1f3c208f95 show acme.conf only if LE is enabled
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-03-08 12:44:31 +01:00
Michael Kaufmann (d00p)
4330b08c04 fix acme.conf for apache in wheezy and trusty, fixes #1603
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-03-08 12:31:57 +01:00
Michael Kaufmann
1c80118117 Merge pull request #336 from nachtgeist/public
fix DB update + some LE-related fixes
2016-03-08 08:37:41 +01:00
Daniel Reichelt
65fd6ac191 fix wrong column name in latest DB update, fixes #1602 2016-03-08 08:21:10 +01:00
Daniel Reichelt
291fae1744 cron/LE: more verbose error message on token error
be more specific about what exactly went wrong when trying to assert the
challenge/response payload (like e.g. http response code, error in DNS
resolution etc.)
2016-03-08 08:21:10 +01:00
Daniel Reichelt
c458ed8b0c cron/LE: fix superfluous CSRs
Depending on the data present, the LE cronscript may cause multiple
entries per domain in domain_ssl_settings.

This is due to $updcert_stmt interfering with the outer loop
while ($certrow = $stmt->fetch()): PDO's DB cursor sees rows newly created
by $updcert_stmt within the loop. As a consequence this also leads to
superfluous CSRs, thus increasing the certificate limit counter on the LE
side.

Solution: manifest the result of @$certificates_stmt@ on the PHP side in
its entirety prior to entering the outer loop.
2016-03-08 08:21:09 +01:00
Michael Kaufmann (d00p)
7ec62401e7 LE is disabled by default so should the cron be; also activate cron if updaters activate LE
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-03-07 14:08:59 +01:00
Michael Kaufmann (d00p)
be83c99334 show db version on admin-dashboard
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-03-07 14:01:49 +01:00
Michael Kaufmann (d00p)
7c8dbd370f forgot to check for dbupdates in index.php
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-03-07 13:55:14 +01:00
Michael Kaufmann (d00p)
604f37bd17 intriduce DB version (again) so we can keep release-version numbers while updating the database; added enable/disable switch for Let's Encrypt
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-03-07 13:47:22 +01:00
Michael Kaufmann
9d6ee0d08f Merge pull request #335 from nachtgeist/public
Remove certificate on removal of subdomain, fixes #1596
2016-03-07 11:44:50 +01:00
Michael Kaufmann
7dc2e6cb5f Merge pull request #334 from RipClaw2971/fix_for_cron_letsencrypt.php
ssl_cert_chainfile should only contain the intermediate certificate
2016-03-07 11:44:29 +01:00
Daniel Reichelt
fb5fd5a279 Remove certificate on removal of subdomain, fixes #1596 2016-03-06 18:41:45 +01:00
Andreas Grundler
d3bf80342d use $return['chain'] instead of $return['fullchain'] for ssl_cert_chainfile 2016-03-06 14:10:24 +01:00
Michael Kaufmann (d00p)
77502efce7 enhance description of newsfeed-settings; ask whether to activate the newsfeed on install in case admin does not want any external requests
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-03-05 13:56:34 +01:00
Michael Kaufmann (d00p)
ca34f7a78a fix pagination on logger page (admin and customer)
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-03-04 22:14:59 +01:00
Michael Kaufmann (d00p)
eae8b8835b enhance description of newsfeed-settings; show note on disabled admin-newsfeed on admin's dashboard; todo: ask for activation of newsfeed on install-process
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-03-04 21:57:49 +01:00
Michael Kaufmann (d00p)
58c6b4edb1 minor language changes
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-03-04 13:51:09 +01:00
Michael Kaufmann (d00p)
86252a22a0 fix wrong timestamp function for last_run value for lets-encrypt cron when updating; put mail/file templates to misc-category in the admin-menu; fix wrong html-tag (typo); enhance info-string for redirect-codes, fixes #1564
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-03-04 13:23:12 +01:00
Michael Kaufmann
964a1716d7 Merge pull request #329 from HolySephi/master
Set myhostname to $mydomain in postfix correctly
2016-03-04 12:54:02 +01:00
Florian Wicke
06862240f0 Update wheezy.xml 2016-03-04 10:31:13 +01:00
Florian Wicke
3119510ef4 Update trusty.xml 2016-03-04 10:29:54 +01:00
Florian Wicke
b4a8ed8828 Update rhel_centos.xml 2016-03-04 10:29:04 +01:00
Florian Wicke
c182664167 Update precise.xml 2016-03-04 10:28:36 +01:00
Florian Wicke
4bba24801c Update jessie.xml 2016-03-04 10:28:03 +01:00
Florian Wicke
274e556989 Update gentoo.xml 2016-03-04 10:27:16 +01:00
Michael Kaufmann (d00p)
74758818e7 remove vhost-template menu entry
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-03-04 08:47:15 +01:00
Michael Kaufmann
69a191d4e2 Merge pull request #332 from Froxlor/revert_pull_request_318
Revert "Merge pull request #318 from Churro/froxlorMerge_33ab67a"
2016-03-03 23:39:11 +01:00
Michael Kaufmann (d00p)
f9d949f90c Revert "Merge pull request #318 from Churro/froxlorMerge_33ab67a"
This reverts commit 4f2ee129fd, reversing
changes made to f284d67843.
2016-03-03 23:38:02 +01:00
Michael Kaufmann
130d3e7b16 Merge pull request #331 from Froxlor/revert_pull_request_326
Revert "Merge pull request #326 from Churro/froxlorMerge_vhostTemplates"
2016-03-03 23:32:59 +01:00
Michael Kaufmann (d00p)
f6e519d779 Revert "Merge pull request #326 from Churro/froxlorMerge_vhostTemplates"
This reverts commit 319668d384, reversing
changes made to aa592c7369.

Conflicts:
	install/froxlor.sql
	install/updates/froxlor/0.9/update_0.9.inc.php
	lib/version.inc.php
2016-03-03 23:31:19 +01:00
Michael Kaufmann
ca807583df Merge pull request #330 from Froxlor/revert-328-admin_vhostsettings
Revert "Zeige die neue vHost-Konfiguration auch wenn nur mod_php installiert ist." as part of reverting vhost-templates
2016-03-03 23:24:56 +01:00
Michael Kaufmann
e6df2d5d40 Revert "Zeige die neue vHost-Konfiguration auch wenn nur mod_php installiert ist." 2016-03-03 23:24:14 +01:00
Florian Wicke
82c1f29eba Update wheezy.xml 2016-03-03 17:38:36 +01:00
Florian Wicke
fc78a51235 Update trusty.xml 2016-03-03 17:37:47 +01:00
Florian Wicke
28b3eb9585 Update rhel_centos.xml 2016-03-03 17:37:20 +01:00
Florian Wicke
e9e9214910 Update precise.xml 2016-03-03 17:36:52 +01:00
Florian Wicke
03a1f9b9b1 Update jessie.xml 2016-03-03 17:35:13 +01:00
Michael Kaufmann
bee529b7fa Merge pull request #328 from xWuZaa/admin_vhostsettings
Zeige die neue vHost-Konfiguration auch wenn nur mod_php installiert ist.
2016-03-03 12:30:07 +01:00
xWuZaa
6e9615261e show vhostsettings on mod_php 2016-03-03 11:51:57 +01:00
Michael Kaufmann (d00p)
1fad30a43a check for wildcard-serveralias also when a customer edits the domain
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-03-02 16:21:29 +01:00
Michael Kaufmann (d00p)
3d5e6152cd update PHPMailer to 5.2.14
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-03-02 15:41:12 +01:00
Michael Kaufmann (d00p)
24f7d88a5c set version to 0.9.35-rc1 for upcoming release candidate
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-03-02 15:32:12 +01:00
Michael Kaufmann (d00p)
d6f42dc88c make letsencrypt cron log to the customer system-log, it might contain important information
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-03-02 15:20:30 +01:00
Florian Aders
42c28e6590 Update README regarding Let's Encrypt
Signed-off-by: Florian Aders <eleras@froxlor.org>
2016-03-02 14:36:50 +01:00
Florian Aders
6d8d01058b Set Let's Encrypt to production
Signed-off-by: Florian Aders <eleras@froxlor.org>
2016-03-02 14:35:34 +01:00
Florian Aders
2efe715aa0 Fixed typo, thx Guite
Signed-off-by: Florian Aders <eleras@froxlor.org>
2016-03-01 09:40:15 +01:00
Florian Aders
4c4916a661 Do not allow Let's Encrypt with AliasDomain until the certificate - storage is reworked
Signed-off-by: Florian Aders <eleras@froxlor.org>
2016-02-29 17:23:14 +01:00
Michael Kaufmann (d00p)
cf8fbe2224 Merge branch 'master' of github.com:Froxlor/Froxlor 2016-02-28 22:07:04 +01:00
Michael Kaufmann (d00p)
573fd69c95 avoid unknown variable if there are no domains in domain-list
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-02-28 22:04:57 +01:00
Michael Kaufmann
71f502f508 Merge pull request #325 from Churro/froxlorMerge_proftpd
ProFTPD: enable TLS by default, fixes #1522
2016-02-28 09:12:54 +01:00
Johannes Feichtner
f4a9152d8f Added TLS by default for Gentoo 2016-02-27 21:03:14 +01:00
Michael Kaufmann
319668d384 Merge pull request #326 from Churro/froxlorMerge_vhostTemplates
Vhost templates: Added a field to select the target webserver
2016-02-27 20:43:10 +01:00
Johannes Feichtner
101e791add Vhost templates: Extended the cron scripts to check for the designated webserver and referential integrity 2016-02-27 20:19:50 +01:00
Johannes Feichtner
088eef9728 Vhost templates: Added a field to select the target webserver 2016-02-27 20:18:16 +01:00
Michael Kaufmann (d00p)
aa592c7369 re-arrange menu-entries to be better categorized
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-02-27 20:03:26 +01:00
Michael Kaufmann (d00p)
b67749bcdc allow private networks in AXFR server list
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-02-27 20:02:46 +01:00
Michael Kaufmann (d00p)
b05105bfdf fix specialsettingsforsubdomains if security questions are being asked when editing a domain, fixes #1598
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-02-27 19:57:29 +01:00
Michael Kaufmann (d00p)
6a10020e9b respect 'start_servers value must not be greater than max_spare_servers' correctly, thx to Ragnos for the info
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-02-27 18:52:14 +01:00
Roman Schmerold
9f85074876 Merge pull request #324 from Churro/froxlorMerge_autoresize
Feature: Added autoresize to shell commands
2016-02-27 14:37:05 +01:00
Johannes Feichtner
45bf41db4c ProFTPD: enable TLS by default. Fixes #1522 2016-02-27 14:22:23 +01:00
Johannes Feichtner
06f4907053 Added autoresize to shell commands 2016-02-27 13:17:39 +01:00
Michael Kaufmann
4f2ee129fd Merge pull request #318 from Churro/froxlorMerge_33ab67a
Feature: vHost templates (version 2)
2016-02-26 19:16:49 +01:00
Johannes Feichtner
373cb912d8 - Hide the option on whether to include default directives with webservers different than nginx
- Typo fix
- Indentation fix
2016-02-26 19:08:08 +01:00
Michael Kaufmann
f284d67843 Merge pull request #323 from Churro/froxlorMerge_autoupdate
Improve autoupdate against HTTP MITM and MD5 collisions
2016-02-23 22:53:58 +01:00
Johannes Feichtner
75172f9e8d Fix autoupdate against HTTP MITM and MD5 collisions 2016-02-23 21:52:35 +01:00
Johannes Feichtner
48a1b9489a Copyright fixed 2016-02-23 21:04:43 +01:00
Michael Kaufmann
2e0cb5050f Merge pull request #322 from WebsiteDeveloper/1585
Correctly redirect when admin hits the timeout and is currently in a customer session, fixes #1585
2016-02-23 17:05:29 +01:00
Bernhard Sirlinger
6ddbb10b5a Fix #1585
Redirect to admin_customers.php
2016-02-23 16:28:58 +01:00
Michael Kaufmann
802e12cf7b Merge pull request #321 from nachtgeist/master
cron/apache
2016-02-22 15:41:02 +01:00
Daniel Reichelt
82b43948b4 cron/apache
- fix mixed indentation
- fix trailing whitespace (code+resulting vhost config)
2016-02-22 15:33:02 +01:00
Florian Aders
36cf003ed6 Fixed LE - alias for nginx in other distributions as well
Signed-off-by: Florian Aders <eleras@froxlor.org>
2016-02-22 12:22:08 +01:00
Florian Aders
2286ea751e Merge pull request #320 from guruevi/master
Various fixes for failing nginx/LetsEncrypt
2016-02-22 12:14:12 +01:00
Florian Aders
deb19f2625 Removed unnecessary exit - calls
Signed-off-by: Florian Aders <eleras@froxlor.org>
2016-02-22 12:10:18 +01:00
Evi Vanoost
83fd1ab0ca class.lescript.php: OpenSSL requires integer for key size. DB returns string. Cast string to integer
trusty.xml: All files in conf.d get automatically included causing the location to be out of place and nginx fails to start
cron_tasks.inc.http.30.nginx.php: Location directives should be included in a host, nginx doesn't have the concept of global location directives in the way apache does
2016-02-21 18:55:02 -05:00
Michael Kaufmann
f00a1ca092 Merge pull request #319 from stweil/fix
Add missing function argument to language-check script
2016-02-21 19:45:01 +01:00
Stefan Weil
152b407cb7 Add missing function argument
The function "print_help" expects an argument.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2016-02-21 19:07:56 +01:00
Johannes Feichtner
5c5e736776 Order vhost and php settings ascending by domain 2016-02-21 14:56:03 +01:00
Johannes Feichtner
dc71a582fc Enable standard directives by default 2016-02-21 14:55:48 +01:00
Michael Kaufmann (d00p)
fc92e2655c display update-status the way we always do them; fix language strings for new multiple-default-ips
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-02-21 14:53:50 +01:00
Johannes Feichtner
abe253bc31 Feature: Vhost templates
Reworked the initial implementation by hpmewes (https://github.com/Froxlor/Froxlor/pull/233) with
- bugfixes all over
- added support for apache and lighttpd also
- added an update sequence (instead of only modifying froxlor.sql)
- added english language variables
- added missing parts in admin_vhostsettings.php
- added parameter replacements as available since PR 244
2016-02-21 14:53:24 +01:00
Michael Kaufmann
0559f3c4d6 Merge pull request #317 from Churro/froxlorMerge_0218b5a
Feature: Enable multiple standard IPs, fixes #1509
2016-02-21 14:35:19 +01:00
Johannes Feichtner
ae2bad5ab4 Declare prepared statement only once 2016-02-21 14:20:30 +01:00
Johannes Feichtner
55df79a79c Fix for previous commit: Also delete occasionally existing entries for the newly defined standard IP entries before re-adding them. They could have been assigned separately 2016-02-21 14:00:53 +01:00
Johannes Feichtner
32c32a7e7a Enable multiple standard IPs 2016-02-21 14:00:26 +01:00
Michael Kaufmann
d7ca3a0f1c Merge pull request #303 from Churro/froxlorMerge
Nginx: Fix for redundantly inserted auth blocks
2016-02-21 13:09:29 +01:00
Michael Kaufmann
e8489e55a1 Merge pull request #304 from Churro/froxlorMerge_f437f92
Apache 2.4: Add AllowOverride All, otherwise Apache ignores .htaccess files
2016-02-21 08:18:44 +01:00
Michael Kaufmann
5c90c3aa97 Merge pull request #315 from Churro/froxlorMerge_d02a076
Nginx: Set default curve to secp384r1
2016-02-21 08:09:06 +01:00
Michael Kaufmann
b5e739620d Merge pull request #310 from Churro/froxlorMerge_fe8093f
Nginx: Avoid multiple index directives (common pitfall)
2016-02-21 08:07:58 +01:00
Johannes Feichtner
a328a95c01 Set default curve to secp384r1 2016-02-21 01:23:18 +01:00
Michael Kaufmann
11b3ac67b0 Merge pull request #311 from Churro/froxlorMerge_c5cf2fa
Set correct error log levels (LOG_ERR instead of LOG_ERROR)
2016-02-20 22:20:45 +01:00
Michael Kaufmann
b8e7122452 Merge pull request #309 from Churro/froxlorMerge_a036bfb
Fix fatal error in phpErrHandler with PHP7 and suit cronjob for various PHP versions
2016-02-20 22:20:23 +01:00
Michael Kaufmann
a6bd323a0e Merge pull request #314 from Churro/froxlorMerge_ce6cc23
Feature: Make the MYSQL_PASSWORD string dynamically definable
2016-02-20 22:17:49 +01:00
Michael Kaufmann
4bec449a26 Merge pull request #313 from Churro/froxlorMerge_8265df4
IPs and Ports: Only show attributes used by the current webserver
2016-02-20 22:16:41 +01:00
Dessa
2176482e4f Merge pull request #312 from Churro/froxlorMerge_typos
Typo fix: German word and title capitalization
2016-02-20 21:59:18 +01:00
Johannes Feichtner
9c7092292b Feature: Make the MYSQL_PASSWORD string definable once in order to be able to copy the fragments without further change 2016-02-20 21:36:30 +01:00
Johannes Feichtner
46eeb65ff0 IPs and Ports: Only show attributes used by the current webserver 2016-02-20 21:13:47 +01:00
Johannes Feichtner
dd79a3a78a German typo fix 2016-02-20 21:04:18 +01:00
Johannes Feichtner
fef9e51c9a Capitalization fixed 2016-02-20 21:03:37 +01:00
Johannes Feichtner
c27589e8c2 Set correct error log levels (LOG_ERR instead of LOG_ERROR) 2016-02-20 20:57:31 +01:00
Johannes Feichtner
1ace011ad2 Nginx: Avoid multiple index directives (common pitfall) 2016-02-20 20:40:38 +01:00
Dessa
c269a3d363 Merge pull request #308 from Churro/froxlorMerge_bca75e9
.gitignore update for Idea or WebStorm files
2016-02-20 20:22:21 +01:00
Johannes Feichtner
387be846f1 Fix fatal error in phpErrHandler with PHP7 and suit cronjob for various PHP versions 2016-02-20 20:21:09 +01:00
Johannes Feichtner
a788660efe .gitignore update for Idea files 2016-02-20 19:58:20 +01:00
Michael Kaufmann
73c8643218 Merge pull request #306 from Churro/froxlorMerge_4aeb06e
Nginx: Change fastcgi IPC dir to a path that is definitely existing
2016-02-20 19:50:37 +01:00
Michael Kaufmann
cd7b65395f Merge pull request #305 from Churro/froxlorMerge_6622deb
Nginx: Security-critical fix for faulty directory protection
2016-02-20 19:46:28 +01:00
Johannes Feichtner
1c467d71c7 Changed fastcgi IPC dir to a path that is definitely existing 2016-02-20 19:34:05 +01:00
Johannes Feichtner
a641dfbfc8 Security-critical fix: Nginx directory protection did not prevent access to
PHP scripts

Although the implemented direction protection posed a prompt when
accessing the http://...com/protectedir/
it was still possible to call http://...com/protectedir/script.php

This vulnerability emerges from the precedence order of "location"
statements. The RegEx matching the PHP script is triggered before the
directory protection is evaluated. As a result, the PHP script is
interpreted and path parsing stops due to the circumflex (see
http://nginx.org/en/docs/http/ngx_http_core_module.html#location).

The fix involves adding a PHP parsing snippet to every protected
block. In order to prevent PHP-related config params repeatedly, the
required section is referenced using a prefix.
2016-02-20 19:25:49 +01:00
Johannes Feichtner
268b188133 Apache 2.4: Add AllowOVerride All, otherwise Apache ignores .htaccess
files
2016-02-20 17:59:34 +01:00
Johannes Feichtner
4692d7ef2a Nginx: Changed inefficient RegEx redirect to equivalent 301 2016-02-20 17:30:26 +01:00
Johannes Feichtner
3b9201fb91 Nginx: Fix for redundantly inserted auth blocks
The problem occurs if a Vhost is assigned multiple different auth names
in Froxlor. Each block is then added repeatedly, leading to an
unparseable configuration
2016-02-20 17:21:54 +01:00
Michael Kaufmann
6e0f18b200 Merge pull request #301 from Churro/froxlorMerge
Fix for case insensitivity bug in Apache 2.4.12 + PHP-FPM
2016-02-20 17:17:41 +01:00
Michael Kaufmann
dfee6873da Merge pull request #302 from stweil/typo
Fix some typos in code comments
2016-02-20 17:17:21 +01:00
Stefan Weil
50e7311390 Fix some typos in code comments
Most of them were found by codespell.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2016-02-20 17:10:24 +01:00
Johannes Feichtner
1c4b88d014 Fix for case insensitivity bug in Apache 2.4.12 + PHP-FPM
With Apache 2.4.12, the FPM socket path is always considered as a
lowercase file path regardless of the used capitalization.
If Froxlor creates a socket file containing uppercase characters, Apache fails to find to the socket.
See https://bz.apache.org/bugzilla/show_bug.cgi?id=57968
2016-02-20 16:58:59 +01:00
Michael Kaufmann
0935a9c193 Merge pull request #300 from Froxlor/revert-299-master
Revert "Changes in the config templates"
2016-02-20 15:25:47 +01:00
Michael Kaufmann
8a99bd1d51 Revert "Changes in the config templates" 2016-02-20 15:24:51 +01:00
Michael Kaufmann
be1a12821e Merge pull request #299 from ianklemm/master
Changes in the config templates
2016-02-20 15:21:37 +01:00
Vengance
bc9bc84f23 Update gentoo.xml 2016-02-20 14:27:53 +01:00
Vengance
e5bb58cd91 Update wheezy.xml 2016-02-20 14:24:35 +01:00
Vengance
074b425ee0 Update precise.xml 2016-02-20 14:23:29 +01:00
Vengance
59e599a952 Update rhel_centos.xml 2016-02-20 14:21:26 +01:00
Vengance
3f523a8b58 Update trusty.xml 2016-02-20 14:20:03 +01:00
Vengance
b4667c92e7 Delete Froxlor-master.rar 2016-02-20 13:14:16 +01:00
Vengance
2ce488c03c Update jessie.xml 2016-02-20 12:49:18 +01:00
Vengance
e1448859c9 Added files via upload 2016-02-20 12:46:48 +01:00
Florian Aders
8abd041f36 Remove certificate on removal of subdomain, fixes #1596
Signed-off-by: Florian Aders <eleras@froxlor.org>
2016-02-19 21:01:48 +01:00
Florian Aders
dabd4a4a4e Merge pull request #298 from nachtgeist/logging
Logging
2016-02-19 20:46:22 +01:00
Daniel Reichelt
6ac274a706 cron/apache: use correct constant for loglevel 2016-02-19 20:32:03 +01:00
Daniel Reichelt
3d2b672feb cron logging: really print messages of level >= LOG_WARNING
also fix mixed indentation
2016-02-19 20:32:02 +01:00
Florian Aders
e621e02f92 Allow selecting new keysize, fixes #1594
Prepare database and cron for HSTS, refs #1593
Added option to re-use key and CSR for Let's Encrypt

Signed-off-by: Florian Aders <eleras@froxlor.org>
2016-02-19 17:35:44 +01:00
Michael Kaufmann (d00p)
e3a594f3e7 do not post configuration form when nothing is selected, fixes #1595
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-02-19 16:09:50 +01:00
Florian Aders
5982f86db4 Merge pull request #297 from nachtgeist/le
Le
2016-02-19 14:53:37 +01:00
Daniel Reichelt
b071b8c2d9 LE: remove challenge file on failure, take #2 ;) 2016-02-19 14:44:23 +01:00
Daniel Reichelt
185178a91e LE: whitespace fixes
- fix mixed indentations
- remove trailing whitespace
2016-02-19 14:44:22 +01:00
Florian Aders
9ca31c10ae Only store accountkeys in production
Signed-off-by: Florian Aders <eleras@froxlor.org>
2016-02-19 12:27:17 +01:00
Florian Aders
8784efd063 Adding .well-known to .gitignore
Signed-off-by: Florian Aders <eleras@froxlor.org>
2016-02-19 09:41:47 +01:00
Florian Aders
c828e3b0d9 Fixed comment :P
Signed-off-by: Florian Aders <eleras@froxlor.org>
2016-02-18 22:40:31 +01:00
Florian Aders
45c081990a We don't need to check for the documentroot anymore
Signed-off-by: Florian Aders <eleras@froxlor.org>
2016-02-18 22:26:44 +01:00
Florian Aders
51b2dc7c23 Alias - configs for Let's Encrypt I forgot
Signed-off-by: Florian Aders <eleras@froxlor.org>
2016-02-18 21:54:59 +01:00
Florian Aders
9f54e60056 Answer all Let's Encrypt challenges via alias to a directory in Froxlor itself, enables us to answer challenges before the vhost is set, thx PrfDrDrStullenBr for the idea \(vhost - configs for most distributions untested\)
Signed-off-by: Florian Aders <eleras@froxlor.org>
2016-02-18 21:43:44 +01:00
Florian Aders
5151f50d49 Renamed "debugHandler" to "logger" to be more specific
Signed-off-by: Florian Aders <eleras@froxlor.org>
2016-02-18 20:47:47 +01:00
Florian Aders
9b08d67ea7 Remove challengefile if challenge fails, thx nachtgeist
Signed-off-by: Florian Aders <eleras@froxlor.org>
2016-02-18 20:40:41 +01:00
Florian Aders
b002d687c0 Fixed typo
Signed-off-by: Florian Aders <eleras@froxlor.org>
2016-02-18 14:56:18 +01:00
Michael Kaufmann
1d2b697742 Merge pull request #296 from nachtgeist/logging
logging: replace hard-coded number by PHP loglevel constant
2016-02-18 10:08:55 +01:00
Daniel Reichelt
ac52802caa logging: replace hard-coded number by PHP loglevel constant 2016-02-18 09:18:42 +01:00
Florian Aders
ef3ab72082 Explain more stuff in the logmessages
Signed-off-by: Florian Aders <eleras@froxlor.org>
2016-02-17 15:50:09 +01:00
Florian Aders
aede590af0 Merge pull request #294 from megaspatz/bugfix-letsencrypt-logging
Edited warning for letsencrypt to show domain instead of ssl_redirect
2016-02-17 15:23:41 +01:00
Stefan Heid
c229c11bdf Edited warning for letsencrypt to show domain instead of ssl_redirect 2016-02-17 12:07:19 +01:00
Michael Kaufmann (d00p)
8356860945 add syslog page for customer; pagination needs to be fixed
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-02-17 08:43:00 +01:00
Michael Kaufmann (d00p)
dd5fa3bfff Merge branch 'nachtgeist-logging' 2016-02-17 08:41:44 +01:00
Michael Kaufmann (d00p)
7b29d43c66 Merge branch 'logging' of https://github.com/nachtgeist/Froxlor into nachtgeist-logging 2016-02-17 08:41:17 +01:00
Michael Kaufmann
8d56478187 Merge pull request #293 from stweil/update
Fix update process from Froxlor version 0.9.28-svn1
2016-02-16 21:55:18 +01:00
Stefan Weil
60740973d7 Fix update process from Froxlor version 0.9.28-svn1
A typo in the name of a local variable prevented database updates.
Fix also an unrelated whitespace issue in an empty code line.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2016-02-16 21:17:54 +01:00
Florian Aders
453f11dcc4 Merge pull request #292 from stweil/translation
Fix more typos and other issues in German translation
2016-02-16 20:59:01 +01:00
Stefan Weil
a090e44403 Fix more typos and other issues in German translation
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2016-02-16 20:54:41 +01:00
Daniel Reichelt
a68effe4e7 logging: add loglevel to syslog output 2016-02-16 20:19:31 +01:00
Daniel Reichelt
2fb091939f remove unused setting system_send_cron_errors 2016-02-16 18:32:08 +01:00
Daniel Reichelt
71248f0adf cron logging: always print messages of level >= LOG_WARNING 2016-02-16 18:13:30 +01:00
Daniel Reichelt
ca80b6372b cron/logging: add choice to always log cronjobs 2016-02-16 17:33:42 +01:00
Daniel Reichelt
e306425428 remove now superfluous $debugHandler fields 2016-02-16 16:24:07 +01:00
Daniel Reichelt
f86a115c6a cron scripts: replace fwrite'ing to lockfile by logging 2016-02-16 16:24:06 +01:00
Florian Aders
ddaadf81d6 Temporarily deactivate ssl_redirect if a new Let's Encrypt certificate needs to be generated
Signed-off-by: Florian Aders <eleras@froxlor.org>
2016-02-16 14:31:07 +01:00
Michael Kaufmann (d00p)
f65af0067d add --debug parameter for froxlor_master_cronjob, thx to nachtgeist for the idea
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-02-16 10:07:02 +01:00
Michael Kaufmann (d00p)
5109443346 output error message when letsencrypt is checked and wildcard-serveralias in enabled - not just silently disable letsencrypt, people don't read the description and are confused
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-02-16 08:51:36 +01:00
Michael Kaufmann (d00p)
29a2c78b3f correct typo in mkdir-statement
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-02-15 16:04:43 +01:00
Michael Kaufmann (d00p)
9ee661d44c correct current dev-version for new installs
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-02-15 16:04:26 +01:00
Florian Aders
ea2fa3be15 Changed CSR - request generation to 4096 bit
Signed-off-by: Florian Aders <eleras@froxlor.org>
2016-02-14 17:31:28 +01:00
Michael Kaufmann
d7ec7a42ba Merge pull request #289 from stweil/master
Fix some issues in the German translation
2016-02-14 09:22:03 +01:00
Stefan Weil
722aed5148 Fix some issues in the German translation
This patch fixes some typos, grammar and wrong words in the first half
of the German translation.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2016-02-14 08:06:44 +01:00
Florian Aders
17100ad56a Fixed README regarding Let's Encrypt environment
Signed-off-by: Florian Aders <eleras@froxlor.org>
2016-02-12 20:10:00 +01:00
Michael Kaufmann
a76032f668 Merge pull request #284 from nachtgeist/functions
add function getFormFieldDataText()
2016-02-11 17:59:54 +01:00
Michael Kaufmann
d8d244541a Merge pull request #282 from nachtgeist/cron_tasks_bind
cron tasks: bind: refactor zone creation
2016-02-11 12:33:18 +01:00
Michael Kaufmann
ba5d4f2f5d Merge pull request #287 from megaspatz/0.9.35-dev3-termination-date
Added termination-date to domains
2016-02-11 12:32:20 +01:00
Michael Kaufmann
dce80c4611 Merge pull request #286 from guruevi/master
Fixes nginx error due to duplicate fastcgi parameters
2016-02-11 11:36:54 +01:00
Stefan Heid
eae9c4d78a Typo correction 2016-02-10 22:23:46 +01:00
Stefan Heid
3f606cd953 Bugfix: termination-date in domain-add dialog 2016-02-10 22:16:09 +01:00
Stefan Heid
ae581c2da7 Added termination-date to domains 2016-02-10 21:22:52 +01:00
root
0fbbd8dae7 Fixes nginx error due to duplicate fastcgi parameters 2016-02-10 13:28:25 -05:00
Daniel Reichelt
f4ef5af63b add function getFormFieldDataText()
Previously webserver configs would contain CRLFs from
system.default_vhostconf on admin_settings.php.

This patch adds a new function which automatically gets recognized by
getFormFieldData() and mangles textarea form elements through
str_replace("\r\n", "\n", ...).
2016-02-09 14:45:08 +01:00
Michael Kaufmann
3244c968b5 Merge pull request #283 from nachtgeist/language
language: add message/spelling
2016-02-09 08:57:09 +01:00
Daniel Reichelt
dd0689c13f language: add message/spelling
- add missing message for let's encrypt integrity check
- small spellfixes
2016-02-09 00:33:01 +01:00
Daniel Reichelt
e327a39eac cron tasks: bind: refactor zone creation
cron_tasks/bind: refactor zone creation

DNS records for subdomains managed as main domains (i.e. have
ismainbutsubto>1) get written to separate zone files for each subdomain.
This does not play well with hidden-master setups, where a quering DNS
server would only request a transfer of the topmost parent zone and ignore
SOA records therein to initiate the potentially required transfers of
subzones.

This patch changes how zonefiles are created, so that DNS records of
"ismainbutsubto>1"-domains end up within the zone of the topmost parent
domain. Obviously this relies on correctly set ismainbutsubto-fields of
all subdomains managed as main domain in Froxlor.

Refactoring summary:

- Previously _generateDomainConfig() would be called for each customer
  domain, handle writing the zone file and accumulate the bind config
  data.

  Now writing the zone files is decoupled and both _generateDomainConfig()
  and generateZone() get called from the main loop over the customer
  domains.

- The main loop over customer domains only considers
  "ismainbutsubto==0"-domains, children are handled via recursion within
  walkDomainList() according to the previously collected relations of
  direct children.

- The recursion accumulates the zone data, storing it in $_bind_conf_file
  (which is now a private member) until it gets written to a zone file.
  The resulting structure is written to the debugHandler.

  -- For "ismainbutsubto==0"-domains, generateZone() returns a SOA record
  and further applicable records as usual.

  -- For "ismainbutsubto>0"-domains, generateZone() returns a "$ORIGIN
  $domain"-line and further applicable records as usual. This now excludes
  NS records, since they're no longer required.

- The boolean parameter $froxlorhost=true to _generateDomainConfig() and
  generateZone() was replaced by the additional field
  $hostname_arr['froxlorhost']
2016-02-08 22:43:57 +01:00
Michael Kaufmann (d00p)
e2b908ed8b correct copyright header :P
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-02-08 13:53:08 +01:00
Michael Kaufmann (d00p)
aac9ee3ba7 added auto-update from within the panel; re-organized menu-entries (meaningful)
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-02-08 13:34:24 +01:00
Michael Kaufmann
1cd776f660 Merge pull request #281 from nachtgeist/cron_tasks_bind
cron_tasks/bind: cleanup conditions for creation of mail-related and www DNS records
2016-02-08 09:24:45 +01:00
Daniel Reichelt
427b7492dc cron_tasks/bind: fix conditions for mail-related records
This patch adds isemaildomain==1 as an additional condition for the
creation of mx/imap/smtp/pop3/spf-txt records for a domain.

For the hostname entry, this depends on the system setting
dns_createmailentry.
2016-02-08 00:28:45 +01:00
Daniel Reichelt
627e22a2e6 cron_tasks/bind: fix conditions for writing www records
The bind cronjob awlays creates www A/AAAA records, regardless of a
domain's iswildcarddomain or wwwserveralias settings.

With this patch www records only get created if "www alias" is selected
for a domain, i.e. iswildcarddomain is disabled and wwwserveralias is
enabled.
2016-02-08 00:28:45 +01:00
Michael Kaufmann (d00p)
7bf8b74693 Merge branch 'master' of github.com:Froxlor/Froxlor 2016-02-05 15:54:27 +01:00
Michael Kaufmann (d00p)
c7f4dc9045 fix superfluous dollar-sign
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-02-05 15:54:07 +01:00
Florian Aders
f8ed70c5f2 Log certificate update in syslog etc
Signed-off-by: Florian Aders <eleras@froxlor.org>
2016-02-03 17:42:00 +01:00
Florian Aders
94f34aada6 Fixed typo
Signed-off-by: Florian Aders <eleras@froxlor.org>
2016-02-03 17:26:10 +01:00
Florian Aders
2472a52fed Make some Let's encrypt settings configurable
Signed-off-by: Florian Aders <eleras@froxlor.org>
2016-02-03 17:21:48 +01:00
Florian Aders
172915b5be Store chains correctly
Signed-off-by: Florian Aders <eleras@froxlor.org>
2016-02-03 16:47:46 +01:00
Florian Aders
ae276a2a59 Fixed updater - timestamp
Signed-off-by: Florian Aders <eleras@froxlor.org>
2016-02-03 16:45:32 +01:00
Florian Aders
ae115216f6 Clearify description regading wildcars
Signed-off-by: Florian Aders <eleras@froxlor.org>
2016-02-03 13:38:40 +01:00
Florian Aders
5691b3a8db Merge pull request #280 from EleRas/master
Added basic let's encrypt - supprt, fixes #1470
2016-02-03 11:53:05 +01:00
Florian Aders
c9815be0c7 German translation and hint that let's enrypt is still beta
Signed-off-by: Florian Aders <eleras@froxlor.org>
2016-02-02 22:15:41 +01:00
Florian Aders
1814407bfd Throw exception if no challenges are returned at all
Signed-off-by: Florian Aders <eleras@froxlor.org>
2016-02-02 11:17:04 +01:00
Florian Aders
40f2fa432b Merge pull request #279 from heaven73/patch-3
Update cron_tasks.php
2016-02-01 22:00:40 +01:00
Chris Energia Positiva
e10732c058 Update cron_tasks.php 2016-02-01 21:53:07 +01:00
Florian Aders
cdb00a76ce Log cert - error in syslog/database
Signed-off-by: Florian Aders <eleras@froxlor.org>
2016-02-01 21:23:01 +01:00
Florian Aders
efc5f37850 Well, we need a new key if we don't havre one, not if we already have one
Signed-off-by: Florian Aders <eleras@froxlor.org>
2016-02-01 20:58:49 +01:00
Florian Aders
ba1181e8ff Fixed inserting of certificate if it didn't exist yet and return textbased domainkey, not ressource
Signed-off-by: Florian Aders <eleras@froxlor.org>
2016-02-01 20:47:16 +01:00
Florian Aders
6023e65f7d Corrected version
Signed-off-by: Florian Aders <eleras@froxlor.org>
2016-02-01 12:55:08 +01:00
Florian Aders
eff978e5f6 Using different texts in admin and customer interface
Signed-off-by: Florian Aders <eleras@froxlor.org>
2016-02-01 11:36:20 +01:00
Florian Aders
daf32b8ac4 Froxlor doesn't use namespaces yet :/
Signed-off-by: Florian Aders <eleras@froxlor.org>
2016-02-01 10:19:31 +01:00
Michael Kaufmann (d00p)
5228e0f3d6 normalize path in appendOpenBasedirPath() after empty check as this results in an assert in makeCorrectDir()
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-02-01 09:35:31 +01:00
Florian Aders
9fc47f55b8 Minor rewording 2
Signed-off-by: Florian Aders <eleras@froxlor.org>
2016-01-31 16:03:10 +01:00
Florian Aders
435edd53f2 Minor rewording
Signed-off-by: Florian Aders <eleras@froxlor.org>
2016-01-31 12:27:00 +01:00
Florian Aders
c36fb7e809 Added description on how to activate the production version of Let's Encrypt
Signed-off-by: Florian Aders <eleras@froxlor.org>
2016-01-31 12:21:21 +01:00
Florian Aders
e74a418405 Fixed description
Signed-off-by: Florian Aders <eleras@froxlor.org>
2016-01-31 12:13:15 +01:00
Florian Aders
7814499b87 Added cronjob to database and added a hint to the README
Signed-off-by: Florian Aders <eleras@froxlor.org>
2016-01-31 12:09:54 +01:00
Florian Aders
b62f4ef911 Copied ssl_redirect - integritsycheck for lets encrypt
Signed-off-by: Florian Aders <eleras@froxlor.org>
2016-01-31 11:49:33 +01:00
Florian Aders
b32c2bb994 Just a small lng - change
Signed-off-by: Florian Aders <eleras@froxlor.org>
2016-01-31 11:42:16 +01:00
Florian Aders
dd9e540ca3 inserttask(1) after updating certificates, updated install/update - SQL
Signed-off-by: Florian Aders <eleras@froxlor.org>
2016-01-30 15:19:40 +01:00
Florian Aders
272ba3f74e Display warning about wildcard - domains with let's encrypt
Signed-off-by: Florian Aders <eleras@froxlor.org>
2016-01-30 14:54:20 +01:00
Florian Aders
d87fc4c717 Prevent enabling let's encrypt for wildcard - domains
Signed-off-by: Florian Aders <eleras@froxlor.org>
2016-01-30 14:46:00 +01:00
Florian Aders
c189ad759b Add Let's Encrypt to admin - GUI
Signed-off-by: Florian Aders <eleras@froxlor.org>
2016-01-30 14:34:26 +01:00
Florian Aders
f3a7a9c342 Fix formfield
Signed-off-by: Florian Aders <eleras@froxlor.org>
2016-01-30 14:22:32 +01:00
Florian Aders
51d554ab14 Also: use the new icon
Signed-off-by: Florian Aders <eleras@froxlor.org>
2016-01-30 14:13:45 +01:00
Florian Aders
cb97ff0dc7 Add icon and fixed list
Signed-off-by: Florian Aders <eleras@froxlor.org>
2016-01-30 14:11:58 +01:00
Florian Aders
7b5a425913 Always hide the SSL - editor if using let's encrypt
Signed-off-by: Florian Aders <eleras@froxlor.org>
2016-01-30 14:05:12 +01:00
Florian Aders
44d08d6aa9 Add let's encrypt to customer domain - GUI
Signed-off-by: Florian Aders <eleras@froxlor.org>
2016-01-30 13:59:34 +01:00
Florian Aders
e0e1085c73 Fix your SQL, dude
Signed-off-by: Florian Aders <eleras@froxlor.org>
2016-01-30 13:14:51 +01:00
Florian Aders
67df9dbf6b Experiment with accountkeys per customer
Signed-off-by: Florian Aders <eleras@froxlor.org>
2016-01-30 13:06:42 +01:00
Florian Aders
2e7dd6f212 Changed comments to // to match the rest of Froxlor and made small improvements to the accountKey
Signed-off-by: Florian Aders <eleras@froxlor.org>
2016-01-30 10:56:08 +01:00
Florian Aders
ed2837f1db Added linebreak to logmessage of class
Signed-off-by: Florian Aders <eleras@froxlor.org>
2016-01-29 16:59:00 +01:00
Florian Aders
d45e9e63e6 Fixed a few obvious bugs
Signed-off-by: Florian Aders <eleras@froxlor.org>
2016-01-29 16:52:58 +01:00
Florian Aders
4f0c1894a3 Initial version of let's encrypt renewal cron
Signed-off-by: Florian Aders <eleras@froxlor.org>
2016-01-29 14:29:30 +01:00
Michael Kaufmann
a3032fc62a Merge pull request #278 from hph86/prevent_dir_traversal_in_paths
prevent directory traversal in paths
2016-01-29 07:43:22 +01:00
Hanno Heinrichs
6eeaf66e2c prevent directory traversal in paths 2016-01-28 22:40:54 +01:00
Michael Kaufmann
7f82549e23 Merge pull request #277 from hph86/fix_path_blacklist
fix blacklisting of characters in paths
2016-01-28 22:00:56 +01:00
Michael Kaufmann (d00p)
2bb8f707eb fix second argument for rand() function
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-01-28 21:19:48 +01:00
Hanno Heinrichs
37176aa022 fix blacklisting of characters in paths 2016-01-28 21:14:28 +01:00
Michael Kaufmann (d00p)
ad302fb5c2 display correct path (leading slash missing sometimes)
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-01-28 08:51:17 +01:00
Michael Kaufmann (d00p)
da4ec3e1b5 avoid rand() if possible as it is not generating cryptographically secure values, thx to Hanno for putting some effort into this
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-01-28 08:27:15 +01:00
Michael Kaufmann
ebedb97fae Merge pull request #275 from stweil/master
Fix typos in comments
2016-01-26 07:41:51 +01:00
Stefan Weil
ddd4c2ad3d Fix typo in comment
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2016-01-25 17:15:17 +01:00
Stefan Weil
007242e341 Fix typo in comment (found by codespell)
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2016-01-25 17:14:43 +01:00
Roman Schmerold
0932b38364 Merge pull request #274 from stweil/master
README: Update supported Debian versions
2016-01-25 17:09:01 +01:00
Stefan Weil
5c0ba566e0 README: Update supported Debian versions
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2016-01-24 22:21:26 +01:00
Michael Kaufmann
67b97dbefd Merge pull request #273 from xWuZaa/fastcgi_params
remove Duplicate fastcgi_index
2016-01-21 12:01:25 +01:00
xWuZaa
4d2f72a814 remove duplicate fastcgi_index from fastcgi_params in nginx config templates 2016-01-21 11:51:33 +01:00
Michael Kaufmann
9d1108c2f4 Merge pull request #272 from hypernics/opcache
add new OPCache info page
2016-01-21 07:46:16 +01:00
Janos Muzsi
cd75bb843a wrong variable 2016-01-20 23:52:46 +01:00
Janos Muzsi
fb6393ad8f OPCache info page 2016-01-20 22:12:43 +01:00
Dessa
1ba2800a30 Merge pull request #271 from mmunz/master
German Translations: Fix typo
2016-01-20 13:13:41 +01:00
Manuel Munz
9d78ad70e6 German Translations: Fix typo 2016-01-20 13:10:48 +01:00
Michael Kaufmann (d00p)
98c675792e fix possible undefined values used in templates
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-01-18 11:33:41 +01:00
Robert Förster (Dessa)
39b50d05ec fix lintian warning executable-not-elf-or-script 2016-01-18 10:54:46 +01:00
Michael Kaufmann (d00p)
a6182e2def set new version for bugfix release :P
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-01-18 10:53:54 +01:00
Michael Kaufmann (d00p)
efdb3623e1 fix return value usage in write-context
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-01-18 10:51:39 +01:00
Michael Kaufmann
eef6102088 Merge pull request #270 from hypernics/apcuinfo
add PHP APCu Info page
2016-01-18 10:21:05 +01:00
Michael Kaufmann (d00p)
9fe55cb729 set version to 0.9.34.1 for upcoming maintenaince release
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-01-18 08:07:16 +01:00
Janos Muzsi
13870f3ae8 APCu Info page 2016-01-17 01:17:43 +01:00
Michael Kaufmann (d00p)
ca9670e832 update copyright year in static standard-customer-index page
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-01-15 10:26:00 +01:00
Michael Kaufmann (d00p)
29494b71fa do not create vhost content for ssl-vhosts that do not have a ssl-certificate specified, fixes #1583
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-01-15 09:40:59 +01:00
Michael Kaufmann (d00p)
f2c3b3f165 ignore errors when deleting old statistics-index-page in case this is the first run and no index.html exists yet
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-01-11 09:14:09 +01:00
Michael Kaufmann (d00p)
4e402b6378 unset js and css variables of theme after using footer-template so they can be used there instead of the header-template only, fixes #1580
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-01-11 07:14:57 +01:00
Michael Kaufmann (d00p)
6a22fbbf78 fix wrong webserver-setting when chosing apache-2.4 in the installation process, thx to TByte
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-12-27 16:26:15 +01:00
Michael Kaufmann (d00p)
27f2217139 fix typo, refs #1578
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-12-21 14:23:17 +01:00
Michael Kaufmann (d00p)
038bb803db fixing more path-related warnings when editing an ftp-user, refs #1578 2015-12-21 14:12:30 +01:00
Michael Kaufmann (d00p)
67b85e5708 fix path displaying in some cases
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-12-21 08:32:04 +01:00
Michael Kaufmann (d00p)
a21b1f7df5 correct display of paths in domain- and ftp-overview
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-12-09 08:49:43 +01:00
Michael Kaufmann (d00p)
eb6e66cbf2 do not double mailbox-paths in postfix config, fixes #1575
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-12-09 08:49:15 +01:00
Michael Kaufmann
778fe718ed Merge pull request #261 from knox/master
added more php_value and php_flag for suhosin
2015-11-29 20:05:32 +01:00
Michael Kaufmann
ef080cd80e Merge pull request #262 from knox/feature/suexec-workaround
improvements of suexec-workaround
2015-11-29 20:05:10 +01:00
knox
22a4a1824a remove suexec-workaround when removing dir options 2015-11-29 18:21:30 +01:00
knox
56163f66d8 fixed ownership of cgi-bin symlink created by suexec-workaround
see http://manpages.debian.org/cgi-bin/man.cgi?apropos=0&format=html&query=chown&sektion=1&locale=en
2015-11-29 17:24:24 +01:00
knox
73a7e438ec added more php_value and php_flag for suhosin
see https://suhosin.org/stories/howtos.html and https://suhosin.org/stories/configuration.html
2015-11-29 16:08:22 +01:00
Michael Kaufmann
27f4e226f3 Merge pull request #260 from knox/master
added php_flag 'suhosin.session.encrypt' and 'mbstring.func_overload'
2015-11-23 09:38:27 +01:00
knox
7357029a28 added php_flag 'suhosin.session.encrypt' and 'mbstring.func_overload'
these are required for custom php configuration for roundcube webmail
2015-11-22 13:41:06 +01:00
Michael Kaufmann (d00p)
accfd6fa14 allow /dev/urandom to be used in open_basedir path, as some applications may require that (*cough* owncloud), thx to J-BBB
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-11-20 14:20:15 +01:00
Michael Kaufmann
77dcc37b33 Merge pull request #259 from stweil/master
Don't assign variable from void function
2015-11-15 10:26:39 +01:00
Stefan Weil
5df4b3e7df Don't assign variable from void function
Database::pexecute is based on execute which is a void function.
It does not return a value which can be assigned to a variable.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2015-11-15 10:16:33 +01:00
Roman Schmerold
997141efea Merge pull request #257 from stweil/master
templates: Code cleanup
2015-11-14 19:16:11 +01:00
Stefan Weil
6fe0f56e41 templates: Code cleanup
* Remove unneeded semicolon.
* Add missing semicolon.
* Add linefeed at end of file

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2015-11-14 19:09:39 +01:00
Michael Kaufmann
8c3b7b518f Merge pull request #256 from lobeck/master
fix ssl setttings for rewrite vhosts on nginx, fixes #1568
2015-11-14 14:14:57 +01:00
Christian Becker
6996f6516c fix ssl setttings for rewrite vhosts on nginx, fixes #1568
- previously the ssl settings were missing in rewrite vhosts
- this caused ssl errors for these hosts as the default certificate has been used instead of the vhost specific cert.
- this seem to only apply for nginx, not apache
2015-11-14 14:10:23 +01:00
Michael Kaufmann
60cc071031 Merge pull request #255 from stweil/typos
Fix typos found by codespell, thx to stweil
2015-11-13 08:05:27 +01:00
Stefan Weil
fe5ab0d8da Fix typos found by codespell
Fix also a grammar issue.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2015-11-13 07:56:12 +01:00
Michael Kaufmann (d00p)
0939d032a5 fix wrong vhost creation with nginx when customer is deactivated and no docroot for deactivated users was given, fixes #1565
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-11-12 08:42:32 +01:00
Michael Kaufmann (d00p)
d21391e8ba add apache-2.4 to the installer so apache-2.4 users get the 2.4 mods activated right away, NOTE: we cannot find out whether you're on 2.2 or 2.4 - so you should now what you got and select the correct one, fixes #1566
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-11-12 08:27:07 +01:00
Michael Kaufmann (d00p)
0651dc28c8 fix filename in ubuntu trusty
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-11-12 08:18:46 +01:00
Michael Kaufmann (d00p)
5b8fea9378 introduce warning-progress-bar-color when using -15% of the given web/traffic max-warn level (default 90%), fixes #1567
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-11-12 08:18:28 +01:00
Michael Kaufmann (d00p)
eda055acca Allow always_populate_raw_post_data to be set in php.ini for php-fpm, fixes #1562
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-11-04 11:35:05 +01:00
Michael Kaufmann
7fb3918773 Merge pull request #253 from github-ivan/master-fixes
Checking for possible duplicate froxlor-local user entries in ftp-group
2015-10-30 15:58:08 +01:00
Krisztian Ivancso
4e38f614f2 Checking froxlor-local user membership in ftp-group
It prevents possible duplication in list.
2015-10-25 11:48:21 +01:00
Robert Förster (Dessa)
c7d8cb6d33 switch postfix default to postfix 3 on gentoo since this is what is stable for a while already (2.x got dropped back to ~arch and will be removed from the template once removed from the tree) 2015-10-20 02:59:44 +02:00
Dessa
e211fb891b Merge pull request #252 from rpasing/master
Fix problems in Dovecot quota configuration:
2015-10-20 02:53:07 +02:00
Rene Pasing
05f3e8f433 Fix problems in Dovecot quota configuration:
1) Since Dovecot 2.x, quota rules are by default in bytes,
  and not in kilobytes (hence multiplicating with 1024 is
  not going to be megabytes). Fixed this by adding 'M' suffix.

2) Since Dovecot 2.x, the quota rule is always named `quota_rule`
  or (for userdb prefetch) `userdb_quota_rule` (there were some
  incorrect namings in the distribution configs).

Ref: http://wiki2.dovecot.org/Quota/Configuration#MySQL
2015-10-20 02:26:28 +02:00
Michael Kaufmann (d00p)
b6949e12b1 correct gentoo.xml config-templates
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-10-19 09:04:14 +02:00
Michael Kaufmann
0772952e71 Merge pull request #251 from Commifreak/master
Update froxlor.sql
2015-10-18 18:19:39 +02:00
Robin Kluth
dc4d5c6953 Update froxlor.sql
Did someone forget the M after 128 in the Default PHP-Config? ;)
2015-10-18 18:09:26 +02:00
Robert Förster (Dessa)
9d45f4d534 Revert "ease file-permissions, they sometimes cause issues"
This reverts commit 5ead5e9c90.

part of this commit is reverted as most files shouldn't be world readable
2015-10-08 00:32:13 +02:00
Michael Kaufmann (d00p)
2b8a9a74be move checkCrondConfigurationFile() from cron_init to cron_shutdown so a forced regeneration of the cron.d-file is being handled in the same cronrun
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-10-05 20:10:55 +02:00
Michael Kaufmann (d00p)
d226af5314 do not select cron.d-file-regeneration task in cron_task as it is not being handled there
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-10-04 17:30:33 +02:00
Michael Kaufmann (d00p)
be5a13fbb1 crypt() does not seem to like some special-characters in its salts, so we skip'em whenever we are generating a password as a salt-value, thx to Tobse101 for a nice debugging session ;)
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-10-02 17:09:41 +02:00
Michael Kaufmann (d00p)
94b43021ff sort libnss-result by length of name to always return the 'base'user instead of a ftp-user (because select does not have a default order), fixes #1556
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-09-21 10:26:18 +02:00
Michael Kaufmann (d00p)
0b901af0f0 define array for mod_php users, fixes #1555
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-09-14 22:23:40 +02:00
Michael Kaufmann (d00p)
5ead5e9c90 ease file-permissions, they sometimes cause issues
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-09-12 20:33:28 +02:00
Michael Kaufmann (d00p)
1cdaa1d727 revert wrong changes from pull-request
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-09-10 08:28:12 +02:00
Michael Kaufmann
2c38bca1b5 Merge pull request #250 from blueJack92/patch-3
Fixing (possible) permission problems of configuration files
2015-09-10 08:19:41 +02:00
blueJack92
7c45ca220b Fixing some (big) peanuts
Fixing permission problems with files, which have 0640 as file attributes.
Fixing problems in main.cf (Postfix). setgid_group must be set, otherwise running newaliases will fail.
Moreover I set the missing paths correctly in the main.cf (regard to Debian Jessie).
2015-09-09 23:33:27 +02:00
Michael Kaufmann (d00p)
bdb2115c16 allow one-character usernames (or mysql-prefix)
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-09-09 23:01:24 +02:00
Michael Kaufmann (d00p)
e23bf72006 remove syntax-error from pull-request #249...
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-09-09 09:32:35 +02:00
Michael Kaufmann
7c63b78bbb Merge pull request #249 from 5nafu/findDirs
Fix Regression from commit 687c5ce for Bug #611
2015-09-09 07:44:14 +02:00
5nafu
b611ebcccb Fix Regression from commit 687c5ce for Bug #611:
Ignore unreadable directiories instead of stoping after first unreadable
directory in function.findDirs.
This Fix comes from php.net user antennen @
http://php.net/manual/en/class.recursivedirectoryiterator.php#101654
2015-09-08 21:29:59 +02:00
Michael Kaufmann (d00p)
722d17b211 [configfiles] correct permissions for froxlor_bind.conf
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-09-08 08:21:33 +02:00
Michael Kaufmann (d00p)
afbfb810fd [configfiles] don't mv a file that is to be backed up but has mode=append, use cp instead
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-09-08 08:18:32 +02:00
Michael Kaufmann (d00p)
1d3ae4f2c8 merged current stable 0.9.34 release as master
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-09-07 15:24:40 +02:00
Michael Kaufmann (d00p)
9bf784f64e set version to 0.9.34 for upcoming release
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-09-07 13:33:22 +02:00
Michael Kaufmann (d00p)
116c0e19b2 add managesieve/sieve config-template for dovecot to Gentoo
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-09-04 19:34:09 +02:00
Michael Kaufmann (d00p)
7939187916 remove old/unused config-template-files (replaced by XML)
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-09-04 10:56:20 +02:00
Piotr Rzeczkowski
9d40e0903b Allow max_input_vars in PHP-FPM configuration 2015-08-30 08:37:57 +02:00
Roman Schmerold
320adad154 Merge pull request #248 from rzeka/master
Allow max_input_vars in PHP-FPM configuration
2015-08-24 17:06:23 +02:00
Piotr Rzeczkowski
c52df5b286 Allow max_input_vars in PHP-FPM configuration 2015-08-24 12:18:56 +02:00
Michael Kaufmann (d00p)
30a25c0e8c comment out unexisting group 'Debian-exim' when exim is not installed
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-08-20 20:50:35 +02:00
Michael Kaufmann (d00p)
95035afe38 comment out unexisting group 'Debian-exim' when exim is not installed
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-08-20 20:49:56 +02:00
Roman Schmerold (BNoiZe)
62559dd2b4 Fixed undefined error in admin_customers.php
Signed-off-by: Roman Schmerold (BNoiZe) <bnoize@froxlor.org>
2015-08-19 07:16:05 +02:00
Roman Schmerold (BNoiZe)
a6473695eb Fixed width of email inputs
Signed-off-by: Roman Schmerold (BNoiZe) <bnoize@froxlor.org>
2015-08-19 07:06:52 +02:00
Frank Gehann
edd60d3331 Fixed composeSslSettings which used variables not available in the function scope. 2015-08-18 11:03:06 +02:00
Michael Kaufmann
c9e4819f3f Merge pull request #247 from Tak0r/master
Fixed unknown variables in composeSslSettings
2015-08-16 20:08:14 +02:00
Frank Gehann
7cf321b24a Fixed composeSslSettings which used variables not available in the function scope. 2015-08-16 15:45:48 +02:00
Michael Kaufmann (d00p)
3b96efc04d forgot to use the new distro-editor variable
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-08-13 15:46:21 +02:00
Michael Kaufmann (d00p)
8a17a90b1a forgot to use the new distro-editor variable
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-08-13 15:45:53 +02:00
Michael Kaufmann (d00p)
4da3a87772 instead of env-variable, show ditro editor which is defined in the xml
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-08-13 15:42:57 +02:00
Michael Kaufmann (d00p)
ab9b92112d instead of env-variable, show ditro editor which is defined in the xml
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-08-13 15:37:34 +02:00
Michael Kaufmann (d00p)
161e11a8dd fix subdir-value if homeDir == dirToCreate in mkDirWithCorrectOwnership(), fixes pr #246
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-08-03 17:50:16 +02:00
Michael Kaufmann (d00p)
967bd45a63 fix subdir-value if homeDir == dirToCreate in mkDirWithCorrectOwnership(), fixes pr #246
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-08-03 17:46:29 +02:00
Michael Kaufmann (d00p)
e1b80b513d add umask form-field, fixes #1486 (0_9_34)
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-07-31 13:22:23 +02:00
Michael Kaufmann (d00p)
6abe0bdaec allow customization of umask in php-fcgi-starter scripts, refs #1486
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-07-31 13:21:50 +02:00
Michael Kaufmann (d00p)
7b5069f1b9 add umask form-field, fixes #1486 (master)
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-07-31 13:21:23 +02:00
Michael Kaufmann (d00p)
4429c5e8b2 allow customization of umask in php-fcgi-starter scripts, refs #1486
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-07-31 13:20:31 +02:00
Michael Kaufmann
5136824844 Merge pull request #244 from greybyte/vhost_config_variables
Variable substitution in vhost specialconfig
2015-07-31 12:02:40 +02:00
Michael Kaufmann
918e9ed408 Merge pull request #244 from greybyte/vhost_config_variables
Variable substitution in vhost specialconfig
2015-07-31 11:45:30 +02:00
Michael Kaufmann (d00p)
8e8c97f7f9 avoid empty value for makeCorrectDir as the assert-check runs before evaluating to / in certain places
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-07-31 10:45:06 +02:00
Michael Kaufmann (d00p)
d86fb7ed23 avoid empty value for makeCorrectDir as the assert-check runs before evaluating to / in certain places
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-07-31 10:44:33 +02:00
Michael Kaufmann (d00p)
819db2583b add mpm-itk to the list of dependents of libnss-mysql; fix proftpd-sql config for jessie; update powerdns-config for jessie
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-07-31 09:19:47 +02:00
Michael Kaufmann (d00p)
089fb25da7 add mpm-itk to the list of dependents of libnss-mysql; fix proftpd-sql config for jessie; update powerdns-config for jessie
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-07-31 09:18:57 +02:00
Michael Kaufmann (d00p)
3d01947f3d fix wrong tpl-variable-name
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-07-30 11:36:48 +02:00
Chris Vigelius
19d94471d9 Merge branch 'master' into vhost_config_variables, and replace IS_SSL with SCHEME
Conflicts (resolved):
	lng/english.lng.php
	lng/german.lng.php
2015-07-30 11:35:26 +02:00
Michael Kaufmann (d00p)
8d26f583e9 fix wrong tpl-variable-name
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-07-30 11:35:24 +02:00
Michael Kaufmann (d00p)
12723d4941 add update compatibility for bugfix-release 0.9.33.2
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-07-29 18:11:14 +02:00
Michael Kaufmann (d00p)
0455cb96ca add update compatibility for bugfix-release 0.9.33.2
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-07-29 18:09:42 +02:00
Michael Kaufmann (d00p)
532c5d1b9f revert the new formfield-layout for customer-mysql
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-07-29 16:03:55 +02:00
Michael Kaufmann (d00p)
565bb55b13 display description of integrity-check rather then just the function-name, makes things clearer
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-07-29 15:58:53 +02:00
Michael Kaufmann (d00p)
744d85ec4c display description of integrity-check rather then just the function-name, makes things clearer
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-07-29 15:58:27 +02:00
Michael Kaufmann (d00p)
5e60b96cd6 add tentative jessie config xml file, testers are welcome
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-07-29 14:57:56 +02:00
Michael Kaufmann (d00p)
8b6f708b7c remove unused (old) php-configfile-files
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-07-29 14:57:12 +02:00
Michael Kaufmann (d00p)
5096e2d68d add tentative jessie config xml file, testers are welcome
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-07-29 14:56:06 +02:00
Michael Kaufmann (d00p)
b0325983a1 log db errors to syslog and remove tmp-error-logs for reporting in cronrun
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-07-29 13:20:10 +02:00
Michael Kaufmann (d00p)
7cd6651895 replace passwords even before logging, not just for display
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-07-29 13:20:05 +02:00
Michael Kaufmann (d00p)
4ec376b296 log db errors to syslog and remove tmp-error-logs for reporting in cronrun
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-07-29 13:19:32 +02:00
Michael Kaufmann (d00p)
8558533a91 replace passwords even before logging, not just for display
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-07-29 13:11:38 +02:00
Michael Kaufmann (d00p)
de4a953bb7 check for existence of ssl-related files for ip/port vhost in order to avoid the webserver to be unable to restart when the cronjob runs; fixes #1485
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-07-28 15:44:10 +02:00
Michael Kaufmann (d00p)
26a41a0672 check for existence of ssl-related files for ip/port vhost in order to avoid the webserver to be unable to restart when the cronjob runs; fixes #1485
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-07-28 15:41:31 +02:00
Michael Kaufmann (d00p)
a1d38dc05f solve sub-sub-domain-problem by dynamically assigning vhost-number in vhost-filename (the deeper the lower the number thus being included earlier), fixes #1535
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-07-28 15:13:32 +02:00
Michael Kaufmann (d00p)
222841f09b solve sub-sub-domain-problem by dynamically assigning vhost-number in vhost-filename (the deeper the lower the number thus being included earlier), fixes #1535
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-07-28 15:11:55 +02:00
Michael Kaufmann (d00p)
fce9de7372 remove superfluous call to 'getDomainRedirectCode' as its been called before; allow changing of redirect-code when domain has 'ssl-redirect' = 1 2015-07-28 13:21:02 +02:00
Michael Kaufmann (d00p)
8332b77fcc remove superfluous call to 'getDomainRedirectCode' as its been called before; allow changing of redirect-code when domain has 'ssl-redirect' = 1 2015-07-28 13:20:11 +02:00
Michael Kaufmann (d00p)
f4f1315715 fix undefined-indeces when search-result contained only subdomains in customer-domains
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-07-28 08:23:54 +02:00
Michael Kaufmann (d00p)
5d423c9e63 fix undefined-indeces when search-result contained only subdomains in customer-domains
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-07-28 08:23:10 +02:00
Michael Kaufmann (d00p)
895be02237 remove unused (old) php-configfile-files
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-07-28 08:22:00 +02:00
Michael Kaufmann (d00p)
95475f7b52 change default ssl-cipher-list; minor changes in config-xmls, fixes #1541
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-07-08 16:08:31 +02:00
Michael Kaufmann (d00p)
c3da264cfe change default ssl-cipher-list; minor changes in config-xmls, fixes #1541
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-07-08 16:04:18 +02:00
Chris Vigelius
89c4b969d1 make sure we fill all context parameters in any case 2015-07-06 21:21:07 +02:00
Chris Vigelius
9dbc04678c correct path for nginx 2015-07-06 17:16:49 +02:00
Chris Vigelius
ed9e524e03 use absolute path and require_once, instead of relative include 2015-07-06 17:09:49 +02:00
Chris Vigelius
c2d75c7030 add description and normalize {IS_SSL} value 2015-07-06 15:09:13 +02:00
Chris Vigelius
de84419035 add nginx and lighttpd support, refactor into common base class 2015-07-06 14:15:01 +02:00
Chris Vigelius
d9e0854bb7 add docroot 2015-07-06 13:45:10 +02:00
Chris Vigelius
558b779944 allow variables in special config 2015-07-06 13:28:09 +02:00
Michael Kaufmann
628b45efeb Merge pull request #243 from greybyte/defuse_dangerous_delete
fix potentially dangerous programming
2015-06-25 14:21:50 +02:00
Chris Vigelius
92cf4c16e3 missing semicolon 2015-06-25 14:08:19 +02:00
Chris Vigelius
3cad16d2b7 fix dangerous code 2015-06-25 13:49:55 +02:00
Michael Kaufmann
e7503c3c7a Merge pull request #242 from andre-luiz-dos-santos/patch-1
Update english.lng.php
2015-06-23 21:33:16 +02:00
André Luiz dos Santos
db8e643c62 Update english.lng.php 2015-06-23 16:22:34 -03:00
Michael Kaufmann (d00p)
a1337df44f do not show error-trace / sensitive data when db-server is down or login credentials are wrong
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-06-11 21:02:39 +02:00
Michael Kaufmann (d00p)
ee73eaee5c adjust fastcgi conf for php-fpm when using apache-2.4
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-06-11 21:01:41 +02:00
Michael Kaufmann (d00p)
94f3b99ad0 do not show error-trace / sensitive data when db-server is down or login credentials are wrong
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-06-11 21:00:45 +02:00
Michael Kaufmann (d00p)
d0c4d5616a adjust fastcgi conf for php-fpm when using apache-2.4
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-06-11 20:59:41 +02:00
Roman Schmerold (BNoiZe)
38f36841e3 Merge branch '0_9_34' of github.com:Froxlor/Froxlor into 0_9_34 2015-06-10 16:26:49 +02:00
Roman Schmerold (BNoiZe)
340f3bcf8c Add missing LSB tags, thanks to Wuzaa, fixes #1492
Signed-off-by: Roman Schmerold (BNoiZe) <bnoize@froxlor.org>
2015-06-10 15:41:51 +02:00
Michael Kaufmann (d00p)
cd1e03c033 fix openbasedir-path when using mod_php, fixes #1507
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-06-10 15:31:15 +02:00
Roman Schmerold (BNoiZe)
ba002a1683 Merge commit '97816748498982799832238d1a2ba441ae16b91b' into 0_9_34
* commit '97816748498982799832238d1a2ba441ae16b91b':
  the awstats files live in the non static outputdir.

Signed-off-by: Roman Schmerold (BNoiZe) <bnoize@froxlor.org>
2015-06-10 15:07:42 +02:00
Roman Schmerold (BNoiZe)
457e378d1e Reverting HTMLform2 changes
Signed-off-by: Roman Schmerold (BNoiZe) <bnoize@froxlor.org>
2015-06-10 14:59:38 +02:00
Michael Kaufmann
9781674849 Merge pull request #241 from m4rcu5/master
Correcting a minor type in Feature #545
2015-06-10 14:59:26 +02:00
Marcus van Dam
d9660e66a8 the awstats files live in the non static outputdir. 2015-06-10 14:43:50 +02:00
Michael Kaufmann
25f4f3900e Merge pull request #240 from m4rcu5/master
access to stats from previous months with awstats, fixes #545
2015-06-01 19:32:14 +02:00
Marcus van Dam
83e904c9f7 Feature #545: Prevent ln from linking withing the current symlink. 2015-06-01 16:24:45 +02:00
Marcus van Dam
9bbdb1b3b9 Feature #545: Include the awstatsGenerateIndex in cronjob.
Seperate the awstats updates output directory from the awstats static
output directory.
Switch to zero padded months.
Symlink current month to 'current' directory (force needed to update
the link if it already exists)
2015-06-01 14:55:43 +02:00
Marcus van Dam
f6cdc0575b Feature #545: function to deploy the index and nav templates
Should deploy the html files with its template variables replaced
into the awstats root.
2015-06-01 14:45:20 +02:00
Marcus van Dam
2017bc9cf6 Feature #545: New index.html and nav.html templates
These templates should later provide the navigation and index for the
per month based awstats.
2015-06-01 14:06:05 +02:00
Marcus van Dam
7e8e28fc90 Move to a generic awstats template directory
We need this generic directory for future changes in Feature #545.
Some line-ending cleanup included.
2015-06-01 13:09:43 +02:00
Michael Kaufmann
30c883c85d Merge pull request #239 from RipClaw2971/apache24_fix
Set require all directive when using mod_proxy_fcgi, fixes #1533
2015-05-12 08:24:01 +02:00
Andreas Grundler
16568c11f1 Fix für Apache 2.4 + mod_proxy_fcgi 2015-05-11 22:23:49 +02:00
Michael Kaufmann
f90982347a Merge pull request #238 from xWuZaa/master
Add custom port to userdata.inc.php
2015-05-07 20:17:11 +02:00
xWuZaa
bd5647351e Add custom port to userdata.inc.php 2015-05-07 19:58:48 +02:00
Michael Kaufmann (d00p)
ec77e47cd6 Merge branch 'master' of github.com:Froxlor/Froxlor 2015-05-06 15:37:46 +02:00
Michael Kaufmann (d00p)
565866c529 adjust default memory_limit to php's default (128M)
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-05-06 15:37:38 +02:00
Michael Kaufmann
e4a262eb7b Merge pull request #235 from rzeka/master
Better customers sorting based on name and company
2015-04-28 14:25:40 +02:00
rzeka
a3f2fa1b16 Better customers sorting based on name and company 2015-04-28 14:14:12 +02:00
Michael Kaufmann (d00p)
e0ef3e9984 fix mpm-itk stuff, thx to Ithariel; minor fixes in updater 2015-04-22 15:58:04 +02:00
Michael Kaufmann (d00p)
bf30c1a3d7 fix escaping of shell commands in new xml-config-template-files
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-03-11 16:51:56 +01:00
Michael Kaufmann (d00p)
c2c573902f separate dovecot for postfix and exim4 as exim4 needs 'special treatment'...
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-03-11 16:42:22 +01:00
Michael Kaufmann (d00p)
d874ebf1b0 use correct username of bind-daemon in debian wheezy config templates
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-03-11 14:30:22 +01:00
Michael Kaufmann (d00p)
8ef6032570 also re-generate bind configs (if enabled) when using --force with the cronjob
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-03-11 11:21:17 +01:00
Michael Kaufmann (d00p)
b32a6951da add Debian-exim group to dovecots Exim4-unix_listener, fixes #1513 2015-03-11 09:44:43 +01:00
Robert Förster (Dessa)
b7bc347323 fix language string 2015-03-10 20:35:33 +01:00
Michael Kaufmann
07e49e53c5 Merge pull request #231 from dadadom/master
Add missing table definition for table 'mail_autoresponder' for older updaters
2015-03-08 13:56:45 +01:00
Dominik Sandjaja
b87db2a82b Add missing table definition for table 'mail_autoresponder'.
Add the define for the mail_autoresponder table. This define is needed in the update_0.9.inc.php script which is used when updating from an early version of froxlor or from SysCP.
2015-03-08 13:54:36 +01:00
Michael Kaufmann (d00p)
c150d559c7 enhance domain-importer, fixes #1512
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-03-06 20:28:41 +01:00
Michael Kaufmann (d00p)
5dce0db661 dont create 'require all granted' if the directory is protected by a customer (htaccess), fixes #1455 (again); thx to Laryllian
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-03-02 20:25:41 +01:00
Michael Kaufmann (d00p)
27514d32de visible-tag needs to respect the do_show-value in case websrv_avail set do_show to false already
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-03-02 13:41:14 +01:00
Michael Kaufmann (d00p)
fe718ef67f add requirement for mbstring-extension as we need to be multibyte-character-safe in generatePassword(); adjust special-character-default setting to be the same as on a fresh install; outsource version-definition to separate file; set version to 0.9.34-dev3
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-02-23 12:23:44 +01:00
Michael Kaufmann (d00p)
e132723475 PDOStatement::rowCount is a function
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-02-20 11:56:24 +01:00
Michael Kaufmann (d00p)
72fc9db38d add integrity check for user/group membership when fcgid/fpm is used, refs #1491
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-02-20 09:58:24 +01:00
Michael Kaufmann (d00p)
1374e08cd4 make sql-fields for ssl-certs larger as there are ca-bundle-certs larger then 64k; add new settings for apache-itk-mpm integration, fixes #1400
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-02-18 16:05:28 +01:00
Michael Kaufmann (d00p)
03e48927a3 add optional support for apache-itk-mpm (mod_php only)
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-02-18 16:01:38 +01:00
Michael Kaufmann (d00p)
bbf05fa6fd remove smarty-remnant; remove unnecessary variable assignment
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-02-17 13:27:30 +01:00
Roman Schmerold (BNoiZe)
6dad29cae7 Even more HTMLform2 migrations
Signed-off-by: Roman Schmerold (BNoiZe) <bnoize@froxlor.org>
2015-02-16 17:56:37 +01:00
Roman Schmerold (BNoiZe)
52afba5a86 Migrate to new HTMLform2 class
Signed-off-by: Roman Schmerold (BNoiZe) <bnoize@froxlor.org>
2015-02-16 16:55:56 +01:00
Roman Schmerold (BNoiZe)
913a53e436 Improve new htmlform class
Signed-off-by: Roman Schmerold (BNoiZe) <bnoize@froxlor.org>
2015-02-16 16:18:39 +01:00
Michael Kaufmann (d00p)
4fd68a4153 fieldset is in subfileblock, not in file
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-02-16 16:02:08 +01:00
Michael Kaufmann (d00p)
fae58078f8 update ftp_groups table in case webserver-/fcgid-/fpm-user changes, refs #1491 (i guess)
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-02-16 14:56:08 +01:00
Michael Kaufmann (d00p)
1d319e001c group file-relevant commands into the fieldset; enhance layout
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-02-16 13:29:01 +01:00
Michael Kaufmann (d00p)
927e6fe23a add update compatibility for 0.9.33.1 users
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-02-16 09:45:55 +01:00
Michael Kaufmann (d00p)
b85eb98303 clear group-cache of nscd as this solves issues with webserver/php-fpm most of the time
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-02-16 08:21:33 +01:00
Roman Schmerold (BNoiZe)
643f124e8b Fixing a bug with linebreaks, fixes #1498
Signed-off-by: Roman Schmerold (BNoiZe) <bnoize@froxlor.org>
2015-02-15 19:07:01 +01:00
Michael Kaufmann (d00p)
6fe4027de5 fix typo of vmail-user in rhel/centos config-template for dovecot
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-02-15 16:26:32 +01:00
Michael Kaufmann (d00p)
f9d79ba5a6 use correct PEAR directory setting in fpm-interface, fixes #1500
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-02-15 15:43:45 +01:00
Michael Kaufmann (d00p)
2382f526b2 reduce code - unnecessary complicated
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-02-15 07:54:34 +01:00
Michael Kaufmann (d00p)
1581e08594 show only hash algorithms that are available on the system
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-02-15 07:51:58 +01:00
Michael Kaufmann (d00p)
37ca78913c respect possible empty-value when validating string::validate_ip
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-02-12 13:02:50 +01:00
Michael Kaufmann (d00p)
df3b97c5dd change comments for better understanding, fixes #1496
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-02-12 09:22:59 +01:00
Michael Kaufmann (d00p)
953e3f5ba6 Merge branch 'master' of github.com:Froxlor/Froxlor 2015-02-11 21:21:13 +01:00
Michael Kaufmann (d00p)
74b73c6446 rename 'MySQL User' to 'Froxlor Customer' as username for users read from db via libnss; fix language strings
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-02-11 21:21:09 +01:00
Roman Schmerold (BNoiZe)
bc80fb71df Restyling configfiles with textareas instead of pre
Signed-off-by: Roman Schmerold (BNoiZe) <bnoize@froxlor.org>
2015-02-11 19:35:18 +01:00
Michael Kaufmann (d00p)
b0279025d0 add numbrows to commands and files for BNoiZe's template magic; added possibility to use sql-data inside xml-config; updates xml-configs a bit when socket is used (not 100% done)
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-02-11 14:30:30 +01:00
Roman Schmerold (BNoiZe)
a45712198b Update configfiles templates
Signed-off-by: Roman Schmerold (BNoiZe) <bnoize@froxlor.org>
2015-02-11 13:01:48 +01:00
Michael Kaufmann (d00p)
704a0fce08 make integritycheck in update-procedure more clear whether there actually is a problem or not (if it's been fixed for example), fixes #1493
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-02-11 12:08:58 +01:00
Michael Kaufmann (d00p)
d6c708e6ee only show restart command of php-fcgi for nginx if fcgid/fpm is not used
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-02-11 08:25:19 +01:00
Michael Kaufmann (d00p)
1f24ca9ba2 split codename and version from version field in config-xml file as this eases automation
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-02-11 07:15:05 +01:00
Michael Kaufmann (d00p)
c482db8c89 prepare database-class to have a separate socket-option, not as replacement for 'host'
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-02-10 16:13:14 +01:00
Michael Kaufmann (d00p)
c356639ce9 fix move-customer-to-admin
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-02-10 16:12:47 +01:00
Michael Kaufmann (d00p)
8b0572add1 fix visibility of fields in admin/formfields.admin.php
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-02-10 16:11:35 +01:00
Michael Kaufmann (d00p)
61b1adfb3d fix typo
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-02-10 16:11:08 +01:00
Michael Kaufmann (d00p)
2f5ea4b305 added postfix-3.x configs for gentoo
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-02-10 08:39:05 +01:00
Michael Kaufmann
ccc321be8a Merge pull request #230 from junkpad92/patch-1
"discard changes" and "save" on top of each other in security options; there was missing this additional template to fix the bug definitely, fixes #1488
2015-02-09 22:53:22 +01:00
junkpad92
b68861c175 Fix Bug #1488
"discard changes" and "save" on top of each other in security options; there was missing this additional template to fix the bug definitely.
2015-02-09 22:49:40 +01:00
Roman Schmerold (BNoiZe)
2ffcba78cc Remove another remainent of Smarty
Signed-off-by: Roman Schmerold (BNoiZe) <bnoize@froxlor.org>
2015-02-09 15:00:21 +01:00
Michael Kaufmann (d00p)
855226d01a sort distribution-names in admin_configfiles, it's confusing otherwise; display the default/recommended daemon of every service; fix small c'n'p error (courier is not our recommended default)
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-02-09 14:49:53 +01:00
Michael Kaufmann (d00p)
b8e548d1df clean variable after subfile-block
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-02-09 14:28:24 +01:00
Michael Kaufmann (d00p)
095f1df947 add Ubuntu Precise 12.04 XML-config
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-02-09 13:55:10 +01:00
Michael Kaufmann (d00p)
4bd91a811d change admin_configfiles to handle the new XML-configs instead of the old php-arrays
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-02-09 13:54:55 +01:00
Michael Kaufmann (d00p)
c3b45a62ca use native word for the different languages
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-02-08 19:59:24 +01:00
Michael Kaufmann (d00p)
7b354eec0f fix template->language issues (not html-encoded special-characters in language-name), set version to 0.9.34-dev1 due to db structure change / update
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-02-08 19:45:15 +01:00
Roman Schmerold (BNoiZe)
677ed371a9 Remove another template we only used for webftp
Signed-off-by: Roman Schmerold (BNoiZe) <bnoize@froxlor.org>
2015-02-08 19:01:03 +01:00
Roman Schmerold (BNoiZe)
987caa632b Add Cancel-Button to template selection
Signed-off-by: Roman Schmerold (BNoiZe) <bnoize@froxlor.org>
2015-02-08 19:00:21 +01:00
Michael Kaufmann (d00p)
3df581152d remove webftp.php as it: pulls smarty-tplengine we don't use anywhere else, is unknown to most of our users, a possible security-issue, etc. etc. etc.; just don't use webftp stuff
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-02-08 18:56:31 +01:00
Michael Kaufmann (d00p)
f0ca931dfc update idna_convert class
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-02-08 18:49:32 +01:00
Michael Kaufmann
52541f18f1 Merge pull request #229 from stweil/typos
Fix typos found by codespell, thx to stweil
2015-02-08 18:34:32 +01:00
Stefan Weil
4ee200e9f6 english: Fix typos found by codespell
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2015-02-08 17:52:53 +01:00
Stefan Weil
47ef9f74a7 classes: Fix typos
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2015-02-08 17:52:53 +01:00
Stefan Weil
92478d0e4f smarty: Fix typo
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2015-02-08 17:52:53 +01:00
Stefan Weil
0fc73b2bbb Fix typos found by codespell
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2015-02-08 17:52:45 +01:00
Michael Kaufmann (d00p)
909c6a8bdf allow private-network ip-addresses for database-connection, fixes #1489
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-02-08 17:35:31 +01:00
Michael Kaufmann (d00p)
be387ccf35 show whether a customer is deavtivated after successful login rather then nothing at all
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-02-08 16:07:24 +01:00
Michael Kaufmann (d00p)
6f73afe265 don't use -1 for standard-subdomains as the parentdomainid field is declared as unsigned int and therefore converted to 0 anyways
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-02-08 15:21:19 +01:00
Michael Kaufmann (d00p)
65d548d4f9 fix undefined variable in cases 'custom-notes-show' is not set when adding/editing an admin/a customer
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-02-08 12:43:04 +01:00
Florian Aders (EleRas)
682b27fdd8 Added when to execute an autogenerated file in ConfigDaemon
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2015-02-08 12:05:22 +01:00
Roman Schmerold (BNoiZe)
d213d65a24 Fixed buttons on top of each other, fixes #1488
Signed-off-by: Roman Schmerold (BNoiZe) <bnoize@froxlor.org>
2015-02-08 12:01:05 +01:00
Robert Förster (Dessa)
36780d53c2 remove some useless executable bits spotted by lintian 2015-02-08 05:12:37 +01:00
Michael Kaufmann (d00p)
5a3bbd928a fix nscd restart command in rhel/centos XML
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-02-07 23:29:38 +01:00
Michael Kaufmann (d00p)
69854a8e0c minor fixes to rhel-configfiles + new rhel/centos config-XML
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-02-07 17:54:08 +01:00
Michael Kaufmann (d00p)
78667ce08b update config-file-xml's: gentoo.xml and wheezy.xml; added trusty.xml
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-02-07 15:32:07 +01:00
Michael Kaufmann (d00p)
0ef5749925 use correct restart commands for trusty
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-02-07 15:29:50 +01:00
Michael Kaufmann (d00p)
218104e6e2 add new configuration-template-XML-files for future use (they will replace [dist].inc.php + text-file-templates)
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-02-07 10:59:28 +01:00
Michael Kaufmann (d00p)
38b7d44e3a remove unuused lang-indeces
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-02-07 10:56:22 +01:00
Florian Aders (EleRas)
332cb64b71 Group file-commands for easier processing in ConfigDaemon
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2015-02-07 10:41:54 +01:00
Michael Kaufmann (d00p)
f1360d8792 set version to 0.9.33 for upcoming stable release
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-02-07 09:57:06 +01:00
Florian Aders (EleRas)
269c24a398 Added file - parameter to command if command was created by expanding file - attributes in ConfigDaemon 2015-02-06 13:27:01 +01:00
Michael Kaufmann
bad427bfba Merge pull request #228 from HolySephi/master
fixed some rhel/centos 7 config issues, thx to Sephi
2015-02-06 10:56:23 +01:00
HolySephi
4256546115 fixed mysql file permissions for postfix-files 2015-02-06 10:46:37 +01:00
HolySephi
67fb2e1f59 removed DebugLevel, changed umask 2015-02-06 10:42:46 +01:00
HolySephi
8fab2ae8f0 fixed some minor problems 2015-02-06 10:39:16 +01:00
HolySephi
2f80477f7d Update etc_postfix_master.cf
spamassassin-line is not needed by default froxlor installation
2015-02-06 10:34:41 +01:00
Michael Kaufmann (d00p)
71bb3ccc40 update italian.lng.php, thx to Heaven73
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-02-06 10:34:35 +01:00
HolySephi
4d89dbfaa3 Update rhel7.inc.php
corrected and secured dovecot-sql.conf.ext
2015-02-06 10:31:40 +01:00
Florian Aders (EleRas)
2b9d6dc9c4 Added grouping - functionality for configfiles
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2015-02-05 20:28:11 +01:00
Florian Aders (EleRas)
75fb18bcec Trim the values of the distribution - xml at sane places
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2015-02-05 20:07:22 +01:00
Florian Aders (EleRas)
44bf843797 Added usernotexists / groupnotexists to ConfigDaemon
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2015-02-05 15:20:53 +01:00
Florian Aders (EleRas)
37cedafa8f Added userxists / groupexists to ConfigDaemon
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2015-02-05 15:20:09 +01:00
Florian Aders (EleRas)
09adbf8717 Added "equals" to visibility and "const." to placeholder in ConfigDaemon
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2015-02-05 15:11:02 +01:00
Roman Schmerold (BNoiZe)
56b619b777 Update generation of unlimited fields
Signed-off-by: Roman Schmerold (BNoiZe) <bnoize@froxlor.org>
2015-02-05 09:40:23 +01:00
Florian Aders (EleRas)
96e7a3ad8c Added "mode" for file - tag in ConfigDaemon
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2015-02-04 10:19:57 +01:00
Michael Kaufmann (d00p)
859665fbd0 Merge branch 'master' of github.com:Froxlor/Froxlor 2015-02-03 21:39:13 +01:00
Michael Kaufmann (d00p)
d6f3bf112b some minor tweaks to configfiles
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-02-03 21:38:57 +01:00
Roman Schmerold (BNoiZe)
67c02dcc40 Fixed missing values, removed old files
Signed-off-by: Roman Schmerold (BNoiZe) <bnoize@froxlor.org>
2015-02-03 21:37:32 +01:00
Roman Schmerold (BNoiZe)
4fccc86b03 Updated HTMLform2 with some tweaks
Signed-off-by: Roman Schmerold (BNoiZe) <bnoize@froxlor.org>
2015-02-03 21:32:23 +01:00
Florian Aders (EleRas)
a5d041926a Converted customer_mysql to HTMLform2
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2015-02-03 20:57:54 +01:00
Florian Aders (EleRas)
c971d3fafe Fixed $lng in ConfigParser
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2015-02-03 20:04:31 +01:00
Florian Aders (EleRas)
7c153d5e76 Remove debug in ConfigDaemon
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2015-02-03 20:03:50 +01:00
Michael Kaufmann (d00p)
7071b812b6 Merge branch 'master' of github.com:Froxlor/Froxlor 2015-02-03 19:56:01 +01:00
Michael Kaufmann (d00p)
a0a2977b7f allow to disable fcgid also with lighttpd because we allow it to be enabled with lighttpd
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-02-03 19:55:46 +01:00
Florian Aders (EleRas)
a63cc0759f Improved _parseContent and use it where needed in ConfigDaemon
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2015-02-03 19:45:40 +01:00
Florian Aders (EleRas)
4c10eed3b1 Updated comments and various small improvements in ConfigParser - classes
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2015-02-03 18:52:37 +01:00
Florian Aders (EleRas)
827b3cc5f6 Added configuration - descriptions to ConfigParser, only parse complete file at first access
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2015-02-03 18:14:00 +01:00
Florian Aders (EleRas)
ac34bfdad2 Added basic distribution - XML - config - parser - classes, needs to be improved
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2015-02-03 17:45:40 +01:00
Roman Schmerold (BNoiZe)
72ce20224d Take values as parameter when editing something
Signed-off-by: Roman Schmerold (BNoiZe) <bnoize@froxlor.org>
2015-02-02 19:13:52 +01:00
Roman Schmerold (BNoiZe)
609bd557c5 Merge branch 'master' of github.com:Froxlor/Froxlor 2015-02-02 17:44:49 +01:00
Roman Schmerold (BNoiZe)
87fe3669a1 Migrate to new HTMLform2-class
Signed-off-by: Roman Schmerold (BNoiZe) <bnoize@froxlor.org>
2015-02-02 17:43:53 +01:00
Michael Kaufmann (d00p)
6df6fc2361 pid of cronjob is the part after the last dash (we did not have more then one before), fixes #1483
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-02-02 16:13:07 +01:00
Roman Schmerold (BNoiZe)
48eaab89ba Add missing space in sed command
Signed-off-by: Roman Schmerold (BNoiZe) <bnoize@froxlor.org>
2015-02-02 13:57:23 +01:00
Roman Schmerold (BNoiZe)
a0b0fa48bb Fix that name is not returned for admins
Signed-off-by: Roman Schmerold (BNoiZe) <bnoize@froxlor.org>
2015-02-02 11:01:26 +01:00
Michael Kaufmann (d00p)
6534dbf47b doc-fixes; fix hardcoded installation-path in centos-cron-configtemplate
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-02-01 20:09:24 +01:00
Michael Kaufmann (d00p)
f4dff676d6 do not allow to enable fcgid/fpm at the same time when both are set to 'yes' simultaneously in settings
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-02-01 18:02:29 +01:00
Michael Kaufmann (d00p)
77ae3aa387 generate only password that match our complexity-settings in customer_email.php; don't use md5() for the admin password in the installation process
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-02-01 13:57:06 +01:00
Michael Kaufmann (d00p)
99bed23b95 another md5() leftover
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-02-01 13:12:24 +01:00
Michael Kaufmann
5b012a33c3 Merge pull request #226 from RipClaw2971/bug_1482
use new password-hashes everywhere, fixes #1482
2015-02-01 13:05:10 +01:00
Andreas Grundler
28f26cce72 fix for bug #1482 2015-02-01 12:25:26 +01:00
Robert Förster (Dessa)
23b091ea82 add virtual_transport parameter which i somehow missed in my last commit, refs #1465 2015-02-01 03:08:18 +01:00
Michael Kaufmann (d00p)
e92b5e2c05 set version to 0.9.33-rc3 due to the password-hash-update-issue
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-01-31 12:54:00 +01:00
Michael Kaufmann (d00p)
4d60b19194 only update hash if password matches, fixes #1479
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-01-31 12:51:20 +01:00
Michael Kaufmann (d00p)
7680cd441c force integer conversion for domainimport-offset-field, as POST sends it as string; filter IP-addresses that are unknown to froxlor when importing domains.
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-01-30 17:55:27 +01:00
Michael Kaufmann (d00p)
d7f8586413 allow language-check against a specific language file
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-01-30 17:54:06 +01:00
Michael Kaufmann (d00p)
83e062c845 remove unused Minify_HTML class
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-01-30 17:53:43 +01:00
Michael Kaufmann (d00p)
c6c950596a use better error-message for misuse of froxlor.hostname
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-01-28 22:01:16 +01:00
Michael Kaufmann (d00p)
4714a458fe don't allow a customer to add the froxlor-hostname as subdomain in case the froxlor-hostname is sub.dom.tld and the customer has dom.tld assigned, thx to chrisalexthomas for 'finding' this :)
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-01-28 21:55:46 +01:00
Michael Kaufmann (d00p)
1672b01426 Merge branch 'master' of github.com:Froxlor/Froxlor 2015-01-28 13:25:08 +01:00
Michael Kaufmann (d00p)
36c7527b2a add function to validate different password-hashes and update them to the currently set hash if login successfull and hash differs, set default hash to SHA256, fixes #1289 - add custom-notes field to admin/customer, fixes #1471 - set version to 0.9.33-rc2 for upcoming second release-candidate
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-01-28 13:24:36 +01:00
Roman Schmerold (BNoiZe)
00e74a05cb Disable input if unlimited is checked
Signed-off-by: Roman Schmerold (BNoiZe) <bnoize@froxlor.org>
2015-01-28 04:54:00 +01:00
Michael Kaufmann (d00p)
7904946862 push some upcoming changes (still holding back db changes b/c of version jump to rc2)
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-01-27 23:04:46 +01:00
Roman Schmerold (BNoiZe)
88ace5785e Fix broken custom newsfeed, newsfeed redesign
Signed-off-by: Roman Schmerold (BNoiZe) <bnoize@froxlor.org>
2015-01-27 22:43:52 +01:00
Robert Förster (Dessa)
614d9c127b fix mail delivery for dovecot, closes #1465 2015-01-27 17:55:46 +01:00
Dessa
f0551ac122 Merge pull request #212 from junkpad92/master
Fixing deprecated Postfix templates & Providing Dovecot2 Sieve-Configs
2015-01-27 17:52:36 +01:00
Michael Kaufmann (d00p)
bdfbe4947a fix undefined variables introduced in commit #b1acc9a8efc01a5139b042f8f9e97881e4a52b83
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-01-27 11:23:03 +01:00
Michael Kaufmann (d00p)
7b8341d826 add function to validate different password-hashes and update them to the currently set hash if login successfull and hash differs (unimplemented yet because of required db-updates which are hold back until 0.9.33-rc2), refs #1289
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-01-27 11:09:27 +01:00
Michael Kaufmann
9d008efabc Merge pull request #224 from heaven73/master
Pure-FTPd template for FreeBSD
2015-01-26 22:15:35 +01:00
Chris Energia Positiva
6c3f6fd57f Update freebsd.inc.php 2015-01-26 22:09:47 +01:00
Chris Energia Positiva
533279ec25 Create usr_local_etc_pureftpd-mysql.conf 2015-01-26 22:07:39 +01:00
Chris Energia Positiva
68d678aff8 Create usr_local_etc_pure-ftpd.conf 2015-01-26 22:06:12 +01:00
Roman Schmerold (BNoiZe)
6767edfaff Merge branch 'master' of github.com:Froxlor/Froxlor 2015-01-26 17:20:05 +01:00
Roman Schmerold (BNoiZe)
b1acc9a8ef Make the side navigation more styleable
Signed-off-by: Roman Schmerold (BNoiZe) <bnoize@froxlor.org>
2015-01-26 17:19:40 +01:00
Michael Kaufmann (d00p)
16dde03f96 get rid of almost never used HTMLPurifier library and beautify subject display on ticket-overview
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-01-25 08:34:03 +01:00
Michael Kaufmann (d00p)
5a7462972f revert commit 84ff476dfa from Lednerb, as the cron-reload command is being read from the settings (and can be adjusted)
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-01-22 08:19:50 +01:00
Dessa
4c60b40c64 Merge pull request #220 from Lednerb/master
Ubuntu 14.04 Integration
2015-01-22 07:51:12 +01:00
Dessa
90bcaee2c9 Merge pull request #202 from antedaxara/rhel7
Added RHEL 7 configfiles
2015-01-22 07:50:56 +01:00
Michael Kaufmann (d00p)
a4973c9c38 don't add rewritecond for https off if this is a ssl-vhost
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-01-21 16:51:36 +01:00
Roman Schmerold (BNoiZe)
6c39ac80e6 Optimized images
Signed-off-by: Roman Schmerold (BNoiZe) <bnoize@froxlor.org>
2015-01-16 21:16:50 +01:00
Roman Schmerold (BNoiZe)
979c5e7c0c Tidied up the code
Signed-off-by: Roman Schmerold (BNoiZe) <bnoize@froxlor.org>
2015-01-16 21:11:17 +01:00
Michael Kaufmann (d00p)
2250b3c37a show custom-notes correctly on admin/customer index when activated + tiny fixes, refs #1471
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-01-15 22:19:28 +01:00
Michael Kaufmann (d00p)
e578a29058 add option to display the custom-notes to the user and actually save the custom-note
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-01-15 22:10:37 +01:00
Michael Kaufmann (d00p)
4c50d35945 Merge branch 'master' of github.com:Froxlor/Froxlor 2015-01-15 21:30:35 +01:00
Michael Kaufmann (d00p)
7b8885c05e add custom-notes field to admins and customers, fixes #1471
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-01-15 21:30:15 +01:00
Roman Schmerold (BNoiZe)
1e6df86b7b Add new small info icon
Signed-off-by: Roman Schmerold (BNoiZe) <bnoize@froxlor.org>
2015-01-15 20:27:11 +01:00
Michael Kaufmann (d00p)
4e9b2d0e97 replace DB_SRV with the hostname/ip and not the caption of the mysql-server, thx to rzeka for noticing
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-01-15 17:29:49 +01:00
Roman Schmerold (BNoiZe)
67f3263a2e Don't remove custom comments, add newline after blocks
Signed-off-by: Roman Schmerold (BNoiZe) <bnoize@froxlor.org>
2015-01-14 00:20:04 +01:00
Roman Schmerold (BNoiZe)
f61567be81 Changed the way php-fpm is included, fixes #1427
Signed-off-by: Roman Schmerold (BNoiZe) <bnoize@froxlor.org>
2015-01-13 20:37:57 +01:00
Michael Kaufmann (d00p)
3ee8f6ac25 use generatePassword() for generating passwords as it respects the settings; fix user-modification under freebsd as there is no 'usermod'
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-01-12 20:24:55 +01:00
Sascha Brendel
5eb630d858 Merge pull request #6 from Lednerb/testing-1
Testing 1
2015-01-12 14:36:14 +01:00
Lednerb
e7d07c7924 Deleted unnecessary config template 2015-01-12 14:32:00 +01:00
Lednerb
ab44d27914 Deleted unnecessary config prompts 2015-01-12 14:25:10 +01:00
Lednerb
1889958e2b added missing php5-cli to installation script 2015-01-11 22:19:49 +01:00
Michael Kaufmann (d00p)
b78729319c added logging to integry-check so admins know what exactly was wrong when monkeys ate the integrity :)
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-01-11 20:32:18 +01:00
Lednerb
7d478fd378 dovecot Installation angepasst 2015-01-11 16:36:50 +01:00
Lednerb
1cb237e8e1 Test zum Entfernen 2015-01-11 16:01:58 +01:00
Lednerb
8a3745aee8 updated service restart at courier imap/pop3 server 2015-01-11 15:42:01 +01:00
Lednerb
84ff476dfa check Cron reload config 2015-01-11 13:22:35 +01:00
Michael Kaufmann (d00p)
b3935bfda8 Merge branch 'master' of github.com:Froxlor/Froxlor 2015-01-11 09:31:49 +01:00
Lednerb
2ae64d0abe Added Trusty 2015-01-11 00:06:14 +01:00
Lednerb
e21b923194 Added Ubuntu 14.04 Trusty, didn't check if the configfiles are working 2015-01-10 23:46:37 +01:00
Michael Kaufmann
9ab90aa3b9 Merge pull request #219 from Lednerb/master
Updated language files
2015-01-10 18:19:14 +01:00
Sascha Brendel
797db9aa8b Merge pull request #5 from Lednerb/patch-8
Update swedish.lng.php
2015-01-10 18:15:04 +01:00
Sascha Brendel
982421b9b3 Merge pull request #4 from Lednerb/patch-7
Update portugues.lng.php
2015-01-10 18:14:44 +01:00
Sascha Brendel
d0d7e7f369 Merge pull request #3 from Lednerb/patch-4
Update french.lng.php
2015-01-10 18:14:25 +01:00
Sascha Brendel
0b35c833f3 Merge pull request #2 from Lednerb/patch-5
Update italian.lng.php
2015-01-10 18:14:03 +01:00
Sascha Brendel
aef58921ce Merge pull request #1 from Lednerb/patch-6
Patch 6
2015-01-10 18:13:36 +01:00
Sascha Brendel
b681d9ba90 Update swedish.lng.php 2015-01-10 18:11:26 +01:00
Sascha Brendel
caedb34d00 Update portugues.lng.php
removed duplicated entry
2015-01-10 18:09:37 +01:00
Sascha Brendel
251fa70228 Update english.lng.php 2015-01-10 18:06:12 +01:00
Sascha Brendel
ced2f0c3d4 Update italian.lng.php
Removed duplicated entries
2015-01-10 17:58:04 +01:00
Michael Kaufmann
25514e1030 Merge pull request #217 from Lednerb/patch-2
Update english.lng.php
2015-01-10 17:28:31 +01:00
Michael Kaufmann
196454c7ab Merge pull request #216 from Lednerb/patch-1
Update german.lng.php
2015-01-10 17:22:01 +01:00
Sascha Brendel
331b65e384 Update french.lng.php
Commented & Removed doubled entries.
The uncommented versions were the newer ones.
2015-01-10 17:20:49 +01:00
Sascha Brendel
794140f3c1 Update english.lng.php
Removed multiple definitions.
If in doubt, more recent entries have been used.
2015-01-10 16:52:40 +01:00
Sascha Brendel
22eeeaf231 Update german.lng.php
Doppelte Einträge entfernt, im Zweifelsfall aktuellere Einträge übernommen.
2015-01-10 15:48:14 +01:00
Michael Kaufmann (d00p)
aff531a274 set from and reply to from settings in usage-report-mails
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-01-10 07:33:40 +01:00
Michael Kaufmann (d00p)
c1ff010283 allow 'localhost' or any local-hostname for db-connection
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-01-08 14:39:52 +01:00
Michael Kaufmann (d00p)
bb3376d1aa update Smarty to version 3.1.21
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-01-07 18:18:16 +01:00
Michael Kaufmann (d00p)
bcd49186fb update phpMailer to 5.2.9
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-01-07 18:12:27 +01:00
Michael Kaufmann (d00p)
c0f2745d30 of course, still allow localhost/127.0.0.1 as valid-ip xD
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-01-07 16:34:58 +01:00
Michael Kaufmann (d00p)
64959c75fe clear out whether pcntl extension is not installed or just pcntl_fork is unavailable, fixes #1469
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-01-07 15:36:35 +01:00
Michael Kaufmann (d00p)
82fdb84e61 give possibility to specify a socket-file as 'host' in userdata.inc.php to connect via mysql-socket instead of hostname; not a setting because this might break some other stuff (mysql-access-hosts -> problems when adding mysql-users/databases, etc.)
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-01-07 15:13:32 +01:00
Michael Kaufmann
10acd16e17 Merge pull request #215 from junkpad92/patch-1
Fixing spelling mistake
2015-01-06 16:05:41 +01:00
junkpad92
21adfeed89 Update german.lng.php 2015-01-06 15:31:51 +01:00
junkpad92
791f12401f Fixing spelling mistake 2015-01-06 15:31:08 +01:00
Michael Kaufmann (d00p)
55c7b2aedf use separate escapeshellarg()-calls as it leads to 'group user' as being recognized as the group only
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-01-05 18:16:51 +01:00
Michael Kaufmann (d00p)
40d51dc7ef fix possible undefined variable
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-01-04 09:16:19 +01:00
Michael Kaufmann
378d66f36a Merge pull request #213 from stweil/master
Improve German translation
2014-12-30 17:50:13 +01:00
Stefan Weil
fd26beb941 Improve German translation
* Grammar fix dass -> das.
* Consistent spelling Email -> E-Mail.
* Typo Addresse -> Adresse.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2014-12-30 16:56:21 +01:00
Michael Kaufmann (d00p)
c7dc68c848 add froxlor-group to customer-group in case fcgid/fpm is used for froxlor
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-12-30 16:44:52 +01:00
Michael Kaufmann (d00p)
6ae3691f20 dont show apache-needed stuff for php-fpm when not using apache
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-12-30 12:15:18 +01:00
Michael Kaufmann (d00p)
5d5062c262 make ownership-hint a bit larger like the db-error-page; add theme-fallback to database-error-function to avoid this stupid 'we are sorry, but a MySQL - error occurred'-message
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-12-29 21:42:28 +01:00
Michael Kaufmann (d00p)
509033e2b8 put install-css-stuff into the correct install.css file
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-12-29 21:23:21 +01:00
Michael Kaufmann (d00p)
7584b0acc4 remove google-webfont-stuff (just create your own theme or overwrite Sparkle to use another font); remove more inline css and remove unnecessary JS in hints-templates
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-12-29 21:08:01 +01:00
Michael Kaufmann (d00p)
dd34ab8d9b fix inline-css (violation of Content Security Policy)
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-12-29 20:48:56 +01:00
Michael Kaufmann (d00p)
c6f3b03891 do some sql-minor-fixing, refs #1486 - set version to 0.9.33-rc1 for possible upcoming release-candidate
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-12-29 14:59:58 +01:00
Michael Kaufmann (d00p)
d765cc8633 fix possible undefined variable if session timed out after login and re-login with another user
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-12-27 18:35:31 +01:00
Michael Kaufmann (d00p)
4b0507c4d3 secure scripts which should not be called directly (install/update stuff); avoid url-manipulation
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-12-27 15:13:25 +01:00
Michael Kaufmann (d00p)
4523ef87b7 show correct errormessage when sql-prefix is wrong
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-12-23 13:56:49 +01:00
Michael Kaufmann (d00p)
2b55ceba7a rework updateCounters
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-12-22 14:47:56 +01:00
Michael Kaufmann (d00p)
b2eeef8d38 beautification and fallback just in case
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-12-22 14:14:53 +01:00
Michael Kaufmann (d00p)
d674f4dd70 same alias-ip-stuff when adding a new domain and aliasdomain is selected
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-12-22 13:37:35 +01:00
Michael Kaufmann (d00p)
0406948c4b remove unneeded functions; fix ip-assigning when a domain is an alias of another domain and the ip's from the alias-domain are being read, no check for ssl/non-ssl was made resulting in an integrity constraint violation in the database
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-12-22 13:32:37 +01:00
Michael Kaufmann (d00p)
366e0f6061 various permission fixes when using fcgid / fpm and customerdocroots having 0770 and sockets are 0660
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-12-22 09:51:55 +01:00
Michael Kaufmann (d00p)
3c12e825f5 fix progress-bar value of >100%; fixes #1467
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-12-22 08:50:23 +01:00
Michael Kaufmann (d00p)
925afbd03f fix design-issues when no add-link is present in overviews; fixes #1466
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-12-22 08:06:26 +01:00
Michael Kaufmann (d00p)
bfa9478649 password-reset fix
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-12-19 14:11:17 +01:00
Michael Kaufmann (d00p)
19f5f2a7a4 remove static copyright-year in templates; fix possible undefined theme-variable in phpErrHandler by specifying a fallback-default
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-12-19 09:49:33 +01:00
Michael Kaufmann (d00p)
c1ca72dd3c fix validation of offset-value in domain import + minor fixes
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-12-19 09:29:25 +01:00
Michael Kaufmann (d00p)
495a48bc87 avoid undefined variable in case the admin has unlimited domain-contingent
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-12-19 07:51:44 +01:00
Michael Kaufmann (d00p)
687c5cea08 enhance findDirs() to avoid exceptions on unreadable directory
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-12-18 08:51:54 +01:00
Michael Kaufmann (d00p)
b0c0918580 let the documentation-link for domain-import open in a new window
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-12-17 18:28:03 +01:00
junkpad92
d78fde88ce Merge branch 'master' of https://github.com/junkpad92/Froxlor 2014-12-17 17:22:23 +01:00
junkpad92
56b652d185 Fixing deprecated Postfix templates & Providing Dovecot2 Sieve-Configs 2014-12-17 17:21:28 +01:00
junkpad92
c69d023685 Install dovecot-managesieved and dovecot-sieve 2014-12-17 17:18:21 +01:00
junkpad92
99a249ac5c Install dovecot-managesieved and dovecot-sieve
Added also config files.
2014-12-17 17:13:22 +01:00
junkpad92
060f10f064 Fixing deprecated Postfix templates & Providing Dovecot2 Sieve-Configs 2014-12-16 21:42:16 +01:00
Michael Kaufmann (d00p)
1e5f80ace6 re-work findDirs()-function
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-12-16 15:14:57 +01:00
Michael Kaufmann (d00p)
cd5e8801e4 add domain-bulk-import, fixes #1452
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-12-15 14:49:34 +01:00
Michael Kaufmann (d00p)
7dd6f9b97c explicitly set charset / collation of database when installing + new integrity-check-function to validate the database charset / collation and optionally fix it; fixes #1426
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-12-13 19:19:10 +01:00
Marco Vogt (vogti)
28b7cd6e90 bugfixing template-variables list when editing mail-templates; refs #496
Signed-off-by: Marco Vogt (vogti) <mail@mdvogt.de>
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-12-12 20:54:59 +01:00
Marco Vogt (vogti)
6bfa95f8a8 Import default subject/body for e-mails templates; fixes #496
Signed-off-by: Marco Vogt (vogti) <mail@mdvogt.de>
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-12-12 19:26:06 +01:00
Michael Kaufmann (d00p)
b0d5049e68 fix -> self in pFlush() in Settings-class, fixes #1464
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-12-10 17:40:04 +01:00
Michael Kaufmann (d00p)
5a9fa8592a bugfixing frxDirectory-class 2014-12-09 08:50:12 +01:00
Marco Vogt (vogti)
bc4cb480be improved traffic report
Signed-off-by: Marco Vogt (vogti) <mail@mdvogt.de>
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-12-08 14:43:15 +01:00
Michael Kaufmann (d00p)
897a8a084e Merge branch 'master' of github.com:Froxlor/Froxlor 2014-12-06 19:47:35 +01:00
Michael Kaufmann (d00p)
afe2041e94 set max-age for Strict-Transport-Security header to >180days, thx to priority
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-12-06 19:47:27 +01:00
Michael Kaufmann
ad1d8d3cd2 Merge pull request #208 from Churro/master
Fix for duplicate .htpasswd entries (Nginx)
2014-12-02 23:21:39 +01:00
Churro
4fe33a0b7a Fix for duplicate htpasswd entries (Nginx) 2014-12-02 22:29:54 +01:00
Roman Schmerold (BNoiZe)
d927ede388 Merge branch 'master' of github.com:Froxlor/Froxlor 2014-12-02 17:28:38 +01:00
Roman Schmerold (BNoiZe)
6f5f69db2b Made tablesorter work without inline-js
Signed-off-by: Roman Schmerold (BNoiZe) <bnoize@froxlor.org>
2014-12-02 17:27:41 +01:00
Michael Kaufmann
e64846b2c1 Merge pull request #207 from Churro/master
Nginx cronjob improvements; show realm-name on directory-protection
2014-12-02 08:42:30 +01:00
Churro
8842c02136 Fixed indentation of location-block in Nginx Vhosts 2014-12-01 22:50:07 +01:00
Churro
adbc4bc402 Basic auth realms now work for Nginx Vhosts too 2014-12-01 22:48:54 +01:00
Michael Kaufmann (d00p)
3be43c4848 outsource a few directory-functions in a class; make apache-2.4 not create 'require all granted' if there is an active directory-protection or option set for the customerroot-dir, possibly fixes #1455
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-12-01 08:07:28 +01:00
Michael Kaufmann
e24e8297f1 Merge pull request #206 from Commifreak/master
Markup fix in templates.
2014-11-30 12:55:21 +01:00
Robin Kluth
c58446359c Update templates_edit.tpl
Replaced <i> with <em> to match the rest of the form
2014-11-30 12:19:04 +01:00
Robin Kluth
dc5e13d13c Update templates_add_2.tpl
Replaced <i> with <em> to match the rest of the form
2014-11-30 12:17:14 +01:00
Michael Kaufmann (d00p)
cf7c11a106 keep original template filename for the possible error message to show the correct file that was not found
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-11-29 08:22:36 +01:00
Michael Kaufmann (d00p)
b0d1290e66 Merge branch 'master' of github.com:Froxlor/Froxlor 2014-11-29 07:43:38 +01:00
Michael Kaufmann (d00p)
60d48f2002 make template-fallback work for overwriting themes partially
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-11-29 07:43:33 +01:00
Roman Schmerold (BNoiZe)
9627238966 Round percentages to 0 decimals
Signed-off-by: Roman Schmerold (BNoiZe) <bnoize@froxlor.org>
2014-11-28 13:57:33 +01:00
Michael Kaufmann (d00p)
d89f2c87e5 Merge branch 'master' of github.com:Froxlor/Froxlor 2014-11-28 12:46:40 +01:00
Michael Kaufmann (d00p)
242b42ba95 respect special characters in redirects
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-11-28 12:46:28 +01:00
Roman Schmerold (BNoiZe)
b1a9c2bf49 Disabling unsafe-inline for security again
Signed-off-by: Roman Schmerold (BNoiZe) <bnoize@froxlor.org>
2014-11-28 09:12:14 +01:00
Roman Schmerold (BNoiZe)
b6bc386072 Allow inline styles/scripts, otherwise template functions will break
Signed-off-by: Roman Schmerold (BNoiZe) <bnoize@froxlor.org>
2014-11-27 22:04:21 +01:00
Roman Schmerold (BNoiZe)
a1625d1768 Removed another unused image... doh
Signed-off-by: Roman Schmerold (BNoiZe) <bnoize@froxlor.org>
2014-11-27 21:45:42 +01:00
Roman Schmerold (BNoiZe)
1e0cc86288 Removed unneeded header image
Signed-off-by: Roman Schmerold (BNoiZe) <bnoize@froxlor.org>
2014-11-27 21:41:10 +01:00
Michael Kaufmann (d00p)
b4a8418e10 add possibility to move customers to another admin/reseller, fixes #1166
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-11-25 12:23:30 +01:00
Michael Kaufmann (d00p)
e4ceb962e9 remove trailing slash from mod_proxy stuff, regardless of what the apache-docs say, it works this way!
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-11-24 18:44:26 +01:00
Michael Kaufmann (d00p)
c6ed0b63c9 fix vhost-block-merging for nginx, fixes #1450
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-11-19 16:29:05 +01:00
Michael Kaufmann (d00p)
4794c21fb4 show message on display-failure of phpinfo()-page, thx to papa-smurf for the hint
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-11-18 10:56:25 +01:00
Michael Kaufmann (d00p)
e7f54503c1 fix template-variable for 'forgot password', thx to Nepstar for noticing
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-11-17 10:47:24 +01:00
Michael Kaufmann (d00p)
bdc0a4caf1 fix visibility of fpm-mod_proxy_fcgi-apache-2.4 setting 2014-11-10 12:59:05 +01:00
Michael Kaufmann (d00p)
5499388777 add possibility to use php-fpm over mod_proxy_fcgi with apache >=2.4.9
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-11-10 11:47:27 +01:00
Michael Kaufmann (d00p)
4cc3c01dcb remove password-suggestion if a custom regex is defined; added password-complexity-settings for non-regex users to define what generated passwords should contain, thx to Marco Vogt; fixes #1216
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-11-10 10:07:32 +01:00
Michael Kaufmann (d00p)
f5f7bc449a use recent Content-Security-Policy values and header for all browser, secure script/query-string to redirect to after login if given
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-11-04 13:01:42 +01:00
Roman Schmerold
0fbc2ab821 Merge pull request #204 from junkpad92/patch-1
Fix Safari checkbox-bug
2014-11-03 20:34:25 +01:00
junkpad92
329197902e Fix Safari checkbox-bug
If checkbox is focused (clicking in the checkbox) checkbox shifts downward. I think: Only in Safari on Yosemite. Other browsers not affected.
2014-11-03 18:56:23 +01:00
Michael Kaufmann (d00p)
f303bfdbfd use /etc/crontab directly when on FreeBSD because it does not use anything like /etc/cron.d/ file-inclusion, refs and possibly fixes #1437
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-10-31 09:48:38 +01:00
Michael Kaufmann (d00p)
0156c3a59d few fixes in inline-css; added mail.log php.ini option and enabled it in default ini-config
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-10-31 09:14:28 +01:00
Michael Kaufmann
6f9f5880ee Merge pull request #203 from Tak0r/master
fix fpm settings for session.auto_start (php_flag -> php_value), nginx poodle "fix", wheezy config for fpm with fpm vhost
2014-10-30 15:02:59 +01:00
Frank Gehann
29d755433f set explicit sslprotocol to react to poodle attack stuff (nginx) 2014-10-30 14:57:04 +01:00
Frank Gehann
c63fa7ec97 wheezy config change to reflect the fpm permission change (add the panel vhost group to the webserver user 2014-10-30 14:54:04 +01:00
Frank Gehann
dc2b690fa4 session.auto_start needs to be a php_value since it gets passed a 0 or 1 and not on/off which causes the fpm to not start at all. 2014-10-30 13:55:56 +01:00
Michael Kaufmann (d00p)
97ec269838 set explicit sslprotocol to react to poodle attack stuff
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-10-27 11:46:28 +01:00
Michael Kaufmann (d00p)
58ec17ce10 don't allow subdomains as alias-domains as it could lead to a possible dead-end for editing ip/port for the domain
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-10-27 10:41:29 +01:00
Roman Schmerold (BNoiZe)
1b00a816e3 Rewrite of merging special vhost settings, fixes #1430
Signed-off-by: Roman Schmerold (BNoiZe) <bnoize@froxlor.org>
2014-10-12 15:34:40 +02:00
Roman Schmerold (BNoiZe)
911d3769f6 Added froxlor logo to footer
Signed-off-by: Roman Schmerold (BNoiZe) <bnoize@froxlor.org>
2014-10-11 14:22:51 +02:00
Roman Schmerold (BNoiZe)
3f3a02147b Update copyright in standard customer index
Signed-off-by: Roman Schmerold (BNoiZe) <bnoize@froxlor.org>
2014-10-11 14:16:19 +02:00
Roman Schmerold (BNoiZe)
a7450dfe37 Fixed duplicate creation of directory protection, fixes #1450
Signed-off-by: Roman Schmerold (BNoiZe) <bnoize@froxlor.org>
2014-10-11 09:08:27 +02:00
Roman Schmerold (BNoiZe)
fe5eff890f Removed another evil if I overlooked
Signed-off-by: Roman Schmerold (BNoiZe) <bnoize@froxlor.org>
2014-10-11 08:18:43 +02:00
Roman Schmerold
539ec529c2 Removing evil if from nginx vhosts
Signed-off-by: Roman Schmerold <bnoize@froxlor.org>
2014-10-11 07:58:01 +02:00
Michael Kaufmann (d00p)
bc8e56e7da fix version_compare 2014-10-07 08:24:40 +02:00
Michael Kaufmann (d00p)
332a6bc550 don't make the fpm-socket readable for all, fixes #1418
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-10-01 13:39:41 +02:00
Michael Kaufmann (d00p)
480e3a8bfd fix incorrect security check on mail-directories where various special-characters are allowed, fixes #1458
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-10-01 07:29:25 +02:00
Ante
34f20ffd1a Added RHEL 7 configfiles 2014-09-30 11:07:37 +02:00
Michael Kaufmann (d00p)
cbab67a2fd Merge branch 'master' of github.com:Froxlor/Froxlor 2014-09-22 10:17:46 +02:00
Michael Kaufmann (d00p)
559fb4d4a4 done a few fixes for newer php-versions
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-09-22 10:17:42 +02:00
Roman Schmerold
a47b1e7f5d Merge pull request #201 from Stricted/patch2
Fix nginx auto index, fixes #1446
2014-09-18 09:39:52 +02:00
Stricted
141e728c0f fix last commits 2014-09-16 22:47:07 +02:00
Stricted
024d01b300 fix directory index for folders on nginx #2 2014-09-16 21:24:50 +02:00
Stricted
cbf47f46ea fix directory index for folders on nginx 2014-09-16 21:17:06 +02:00
Michael Kaufmann (d00p)
74c493f39c remove unnecessary fields that have been removed in updater a long time ago
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-09-13 09:32:19 +02:00
Michael Kaufmann (d00p)
37624a912e add task 99 the correct way in installation as the constant FROXLOR_INSTALL_DIR is not set there
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-09-12 07:50:05 +02:00
Michael Kaufmann
997135d7c0 Merge pull request #200 from Stricted/patch-1
fix path_info on nginx cronjob
2014-09-09 09:22:25 +02:00
Stricted
31f3639c15 fix path_info on nginx cronjob 2014-09-08 18:37:14 +02:00
Michael Kaufmann (d00p)
70a9ad2f3d enhanced list of allowed php.ini-directives for php-fpm 2014-09-07 08:21:30 +02:00
Michael Kaufmann (d00p)
b1fe737a03 Merge branch 'HolySephi-master' 2014-09-06 09:41:09 +02:00
HolySephi
6f974c035d Update etc_libnss-mysql.cfg 2014-09-06 08:18:45 +02:00
HolySephi
3c091f9cce Update etc_libnss-mysql.cfg 2014-09-06 08:17:48 +02:00
HolySephi
b2268861b0 Update usr_local_etc_libnss-mysql.cfg 2014-09-06 08:16:47 +02:00
HolySephi
4b5b9e8d1c Update etc_libnss-mysql.cfg 2014-09-06 08:16:03 +02:00
Michael Kaufmann (d00p)
c5c2f735cc code beautification and better documentation 2014-09-06 08:06:33 +02:00
Michael Kaufmann
ed6c78dd50 Merge pull request #196 from privatehosting/patch-1
Fix undefined offset if no entries are in the quotaused-array in cron-tasks
2014-09-06 08:05:32 +02:00
Michael Kaufmann
c303f8a683 Merge pull request #199 from schadowfox/master
added php error log capabilities in php-configuration (php.ini) for php-fpm
2014-09-06 07:58:15 +02:00
schadowfox
1d27a27751 added php error log capabilities
not sure why this is missing in the default config, but with this you can once again have a error log for php files.
2014-09-05 23:26:48 +02:00
Michael Kaufmann (d00p)
9776624c32 honor max_children values for php-fpm
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-08-11 08:24:26 +02:00
Michael Kaufmann (d00p)
2ebb5259a0 after a new installation, insert a task for generating the cron.d file, also let cronjob's --force re-create the cron.d file
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-08-05 18:14:04 +02:00
Michael Kaufmann (d00p)
ce88d1caae fix command for creating deactivated-root-dir, thx to oschni
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-08-05 18:12:35 +02:00
Michael Kaufmann (d00p)
80a2b5da34 correct precise postfix-master.cf config-template
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-07-19 14:40:26 +02:00
Michael Kaufmann (d00p)
92eea6d7b2 insert task for rebuilding config files after changing the ips (not perfect yet but better then no task)
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-07-09 17:52:16 +02:00
Michael Kaufmann (d00p)
25fa9a8121 various tiny improvements
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-07-09 09:39:26 +02:00
PrivateCityHosting
4c4a39994c Update cron_tasks.php
Fixing: PHP Notice:  Undefined offset: 
if problem: repquota: Einhängepunkt oder Gerät / nicht gefunden oder hat keine aktivierten Quotas.
repquota: Nicht alle angegebenen Mountpunkte verwenden Quotas.
2014-07-07 02:16:13 +02:00
Michael Kaufmann (d00p)
a7a971f444 secure password-reset form against possible header-modification, thx to Hendrik
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-06-29 11:25:31 +02:00
Michael Kaufmann (d00p)
946e5d28e9 Merge branch 'master' of github.com:Froxlor/Froxlor 2014-06-23 08:51:17 +02:00
Michael Kaufmann (d00p)
addd70dfe8 correct validating list of AXFR-servers, fixes #1440
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-06-23 08:51:04 +02:00
Michael Kaufmann (d00p)
6a14cb57e6 initialize variables so no warnings/notices are output when the directory is empty (all files deleted); fixes #1435
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-06-17 11:49:07 +02:00
Michael Kaufmann (d00p)
1c1affa7bd set directory permissions to 0755 for mod_php user as they dont (want to) use libnss-mysql, fixes #1431
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-06-09 16:21:57 +02:00
Michael Kaufmann (d00p)
8b25ac1685 fix variable in webftp-script
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-06-08 09:37:29 +02:00
Michael Kaufmann (d00p)
ff549a5ab0 re-add line-breaks for nicer display of ip/port combos in domain::add and domain::edit
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-06-07 15:05:21 +02:00
Michael Kaufmann (d00p)
74b71bb926 fix validation of system-hostname setting, thx to lando
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-06-07 15:04:51 +02:00
Michael Kaufmann (d00p)
f1eb5420a7 add option to enable/disable generation of bind-configs for the system-hostname
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-06-02 12:35:45 +02:00
Michael Kaufmann (d00p)
0d04077d6e Merge branch 'junkpad92-master' 2014-06-02 09:15:54 +02:00
Michael Kaufmann (d00p)
3fe10d8d3d merge pull request #193
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-06-02 09:15:45 +02:00
Roman Schmerold (BNoiZe)
9b0cc70542 Fix height of #maincontent if newsfeed is shown
Signed-off-by: Roman Schmerold (BNoiZe) <bnoize@froxlor.org>
2014-06-01 22:02:48 +02:00
Roman Schmerold (BNoiZe)
38599ec4b9 Read the custom RSS directly from the settings
Signed-off-by: Roman Schmerold (BNoiZe) <bnoize@froxlor.org>
2014-06-01 21:55:10 +02:00
Roman Schmerold (BNoiZe)
7d4ea57381 Removing obsolete 'language' attribute from script-tags
Signed-off-by: Roman Schmerold (BNoiZe) <bnoize@froxlor.org>
2014-06-01 19:12:14 +02:00
Roman Schmerold (BNoiZe)
538b99055c Removing unwanted files which should be ignored by git anyway
Signed-off-by: Roman Schmerold (BNoiZe) <bnoize@froxlor.org>
2014-06-01 18:50:55 +02:00
Roman Schmerold (BNoiZe)
3acfcd4a95 Adding a custom newsfeed to the customer-dashboard, fixes #1408
Signed-off-by: Roman Schmerold (BNoiZe) <bnoize@froxlor.org>
2014-06-01 18:46:15 +02:00
Michael Kaufmann (d00p)
fd3ab6221c fix wrong grammar in german language file, thx to Nepstar
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-05-29 13:40:23 +02:00
Michael Kaufmann
e05369ffd9 Merge pull request #194 from Commifreak/master
Some FPM improvements
2014-05-25 13:09:50 +02:00
Robin Kluth
2376200a73 Whoops... 2014-05-25 12:05:17 +02:00
Robin Kluth
7e1e7851cc Changed fpm-config var description...
* start_servers not used if ondemand, same with min and max_spare_servers
[http://www.php.net/manual/de/install.fpm.configuration.php#pm]
2014-05-25 12:04:15 +02:00
Robin Kluth
7a8e345084 Removed unecessary 'start_servers' if pm = ondemand
http://www.php.net/manual/de/install.fpm.configuration.php#pm.start-servers
2014-05-25 12:01:16 +02:00
Robin Kluth
9b42200746 Changed fpm-config var description...
* start_servers not used if ondemand, same with min and max_spare_servers
[http://www.php.net/manual/de/install.fpm.configuration.php#pm]
2014-05-25 11:55:14 +02:00
Michael Kaufmann (d00p)
e8e2731c6f use reload-commands from settings also for wheezy :)
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-05-24 09:13:33 +02:00
Michael Kaufmann (d00p)
4167451da6 Merge branch 'master' of github.com:Froxlor/Froxlor 2014-05-24 09:12:06 +02:00
Michael Kaufmann (d00p)
48f288789f use reload-commands from settings
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-05-24 09:12:02 +02:00
Michael Kaufmann
0574a9733c Merge pull request #192 from Commifreak/master
Minor fixes
2014-05-24 08:39:42 +02:00
Robin Kluth
67bee6d620 Added restart hint after PHP-FPM configuration 2014-05-23 23:06:40 +02:00
Robin Kluth
72dd7fb138 Fixing double question mark for german language 2014-05-23 23:04:42 +02:00
Robert Förster (Dessa)
92f9cf3621 bump phpmailer to 5.2.8 2014-05-23 12:24:02 +02:00
Robert Förster (Dessa)
aafea237f3 forgot to change the status of squeeze, bah. 2014-05-23 12:11:28 +02:00
Robert Förster (Dessa)
a130013c5d some os deprecations
- SLE10 will be replaced by SLE11
- opensuse11 will be replaced by opensuse13 once i managed to clean up the configs from upstream
- ubuntu lucid will be replaced by ubuntu trusty once i get to it
2014-05-23 12:08:23 +02:00
Robert Förster (Dessa)
9a1b0e6ea8 update jquery to 1.11.1 2014-05-23 11:58:24 +02:00
Michael Kaufmann (d00p)
acbaedb44f setting version to 0.9.32 for release
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-05-23 08:29:28 +02:00
Robert Förster (Dessa)
ab667d0bc8 forgot to sync the css 2014-05-20 20:05:45 +02:00
Robert Förster (Dessa)
73acfb5d7c update js folder
- add images from jquery-ui to css folder, the stylesheet expects them being around even though we don't use them, adding them and not using them is better then editing the stylesheet and then forgetting about it again after every jquery-ui update, i suppose..
- fix html5shiv name, it was minified to begin with
- bump flot to 0.8.3, fix plugin name (no functional changes for us)
- bump tablesorter to 2.16.4 (likewise)
2014-05-20 19:50:57 +02:00
Michael Kaufmann
641c0a09e5 Merge pull request #191 from andre-luiz-dos-santos/patch-1
Small translation corrections
2014-05-20 07:26:33 +02:00
André Luiz dos Santos
e053a22f1b More missing translations 2014-05-19 23:51:56 -03:00
André Luiz dos Santos
8d3046269b Missing translation, small corrections
Two repeated vowels: AAtiva, Iinformações.
Translate message 'loginnameiswrong2'.

contem => contém
http://wp.clicrbs.com.br/sualingua/2009/05/18/tem-e-tem-contem-contem/
2014-05-19 23:37:24 -03:00
André Luiz dos Santos
14620d9b52 Small translation corrections
voce => você
http://michaelis.uol.com.br/moderno/ingles/index.php?lingua=portugues-ingles&palavra=voc%EA

dominio => domínio
http://michaelis.uol.com.br/moderno/ingles/index.php?lingua=portugues-ingles&palavra=dom%EDnio
2014-05-19 22:58:26 -03:00
Roman Schmerold (BNoiZe)
ca4dd8a75d Remove comments from special vhost settings, fixes #1422
Signed-off-by: Roman Schmerold (BNoiZe) <bnoize@froxlor.org>
2014-05-18 12:38:50 +02:00
Michael Kaufmann (d00p)
41f971a4d5 also, fight stupidity in development, my bad :P
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-05-18 11:20:22 +02:00
Michael Kaufmann (d00p)
3c8bf348d1 fight stupidity - teach your customers not to use password == username
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-05-18 11:16:35 +02:00
Michael Kaufmann (d00p)
6e4ff4705b just because people are stupid...really, there are people doing this - thanks for a wonderful afternoon fighting spam
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-05-17 19:10:28 +02:00
Michael Kaufmann (d00p)
d73b069944 delete connections between domain and ip's after deleting a customer completely
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-05-15 14:18:39 +02:00
Michael Kaufmann (d00p)
9c500f290e when cleaning strings, actually return them after that or it's senseless
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-05-15 08:20:52 +02:00
Michael Kaufmann
f82fe620dd Merge pull request #188 from junkpad92/master
Improved translations for customer section (mainly)
2014-05-14 08:24:22 +02:00
junkpad92
de89610011 Improved translations for customer section 2014-05-13 23:37:02 +02:00
Roman Schmerold (BNoiZe)
c15fb4043b Removed unneeded height setting on checkboxes
Signed-off-by: Roman Schmerold (BNoiZe) <bnoize@froxlor.org>
2014-05-07 13:59:53 +02:00
Roman Schmerold (BNoiZe)
7f5c74b502 Forgot to add the two new values together. D'Oh
Signed-off-by: Roman Schmerold (BNoiZe) <bnoize@froxlor.org>
2014-05-07 09:46:23 +02:00
Roman Schmerold
0d1fc17db9 Changed regex to match new logformat, fixes #1398
Signed-off-by: Roman Schmerold <bnoize@froxlor.org>
2014-05-07 09:34:34 +02:00
Michael Kaufmann (d00p)
32ff9840b8 Merge branch 'junkpad92-master' 2014-05-07 09:13:51 +02:00
Michael Kaufmann (d00p)
07e5385fa2 merging pull-request #187, set log format for dovecot in froxlor config and updated German translations
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-05-07 09:13:44 +02:00
Michael Kaufmann (d00p)
fb3d0269a1 when redirecting to an uri, don't use a trailing slash in order for the redirect to be correct, fixes #1411
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-05-02 08:49:27 +02:00
Michael Kaufmann (d00p)
fceffc05e7 fix double line-break in ticket-message, fixes #1413
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-05-02 08:34:14 +02:00
Florian Aders (EleRas)
4a3043e113 Ignore an empty adminid (should fix user-errorreport) 2014-05-02 08:10:53 +02:00
Michael Kaufmann
aa90a4aec8 Merge pull request #183 from hildende/master
Added support for new/longer TLDs (up to 63 characters allowed)
2014-05-01 10:47:19 +02:00
Roman Schmerold
2f9744fe9d Merge pull request #184 from junkpad92/patch-1
Update german.lng.php, fixes #1406
2014-04-28 21:12:50 +02:00
junkpad92
8fe3945c4c Update german.lng.php
Removed double spaces.
2014-04-28 20:50:59 +02:00
junkpad92
db00ef83c0 Update german.lng.php 2014-04-28 20:29:39 +02:00
Dennis Hildenbrand
40fd5cd41e added support for new TLDs that are longer than 6 characters like .photography 2014-04-28 19:51:33 +02:00
Michael Kaufmann (d00p)
4dc774c11c also, add french to the available language-files for install-process
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-04-28 17:22:46 +02:00
Michael Kaufmann (d00p)
f48d97e132 add french language file for installation-process, thx to hurl for translating; fixes #1415
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-04-28 14:06:10 +02:00
Michael Kaufmann (d00p)
b341228dd9 fix invalid sql in very old update-procedure (happens when you update from 0.9.7-svn1 to 0.9.7-svn2)
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-04-27 09:23:36 +02:00
Michael Kaufmann (d00p)
813a534b41 fix missing user-array for output in ticket-overview, fixes #1412
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-04-26 08:32:17 +02:00
Michael Kaufmann (d00p)
086cd21cea Merge branch 'master' of github.com:Froxlor/Froxlor 2014-04-14 14:35:59 +02:00
Michael Kaufmann (d00p)
69ec85ef19 fix setting of passwords in case mysql-access-hosts list gets changed, fixes #1407
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-04-14 14:35:12 +02:00
Roman Schmerold (BNoiZe)
0336f7ccf8 Merge branch 'master' of github.com:Froxlor/Froxlor 2014-04-14 09:49:37 +02:00
Roman Schmerold (BNoiZe)
4994a90be9 Removing old languages from database, pushing version to 0.9.32-rc3
Signed-off-by: Roman Schmerold (BNoiZe) <bnoize@froxlor.org>
2014-04-14 09:48:39 +02:00
Michael Kaufmann (d00p)
d73e5f8dc7 fix prepending of domain-name to domain.documentroot if admin has 'edit-server-settings == false' when adding a new domain
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-04-12 09:37:51 +02:00
Michael Kaufmann (d00p)
3d44d381bc correct permissions after creating cron.d-file
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-04-07 09:55:04 +02:00
Roman Schmerold (BNoiZe)
39dd832c84 Removed languages with more than 20% missing
Signed-off-by: Roman Schmerold (BNoiZe) <bnoize@froxlor.org>
2014-03-28 15:33:34 +01:00
Michael Kaufmann
1ae58837db Merge pull request #182 from mainboarder/patch-1
Update cron_usage.inc.diskspace.php
2014-03-23 18:37:49 +01:00
mainboarder
739c279526 Update cron_usage.inc.diskspace.php
Line 176 another $resul(t)2_data typo
2014-03-23 13:04:53 +01:00
Roman Schmerold (BNoiZe)
8b7dc057e1 Removed linebreak after checkboxes, fixes #1397
Signed-off-by: Roman Schmerold (BNoiZe) <bnoize@froxlor.org>
2014-03-19 13:16:16 +01:00
Michael Kaufmann (d00p)
9c87792c63 keep known_filenames as it results in no zone-file being generated (d'oh); also use all available ip's for the froxlor-hostname config, thx a lot to vali for testing, really fixes #1090 this time
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-03-11 11:07:14 +01:00
Michael Kaufmann (d00p)
31fa23a388 create a dns-config for the froxlor-hostname, fixes #1090
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-03-11 10:18:23 +01:00
Michael Kaufmann (d00p)
08ce6be3ff fix 'field does not have a default value' error reported via email
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-03-05 08:11:56 +01:00
Michael Kaufmann (d00p)
2d68216699 remove old and unused setting from install-sql-file
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-03-05 08:00:04 +01:00
Michael Kaufmann (d00p)
0002056e51 fix wrong variable name which causes wrong theme to be stored for new customers, fixes #1392
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-03-05 07:59:32 +01:00
Michael Kaufmann (d00p)
4636409724 Merge branch 'master' of github.com:Froxlor/Froxlor 2014-03-04 10:57:30 +01:00
Michael Kaufmann (d00p)
3b7fa93e72 set lastguid to system-lastguid in case there are no customers yet, thx to Sephi
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-03-04 10:57:16 +01:00
Roman Schmerold (BNoiZe)
d10a2764af Improving display of new ticket icon
Signed-off-by: Roman Schmerold (BNoiZe) <bnoize@froxlor.org>
2014-03-01 16:21:13 +01:00
Florian Aders (EleRas)
718a313673 Added new (debian) way for dovecot - IMAP - traffic-report, thx devil65
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2014-02-26 08:44:23 +01:00
Michael Kaufmann (d00p)
d00cdec296 added cronjob-auto-update-feature (beware and READ), fixes #1342; remove old backup-ftp-users on update, fixes #1381
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-02-25 07:48:46 +01:00
Michael Kaufmann (d00p)
e650be3814 fix quota on freebsd, thanks to skotti's patch. fixes #1377
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-02-21 08:04:26 +01:00
Michael Kaufmann (d00p)
c59fe0e4ad fix wrong variable
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-02-20 11:18:46 +01:00
Roman Schmerold (BNoiZe)
b191b67f21 Removed translations of the unlimited char
Signed-off-by: Roman Schmerold (BNoiZe) <bnoize@froxlor.org>
2014-02-20 10:46:52 +01:00
Roman Schmerold (BNoiZe)
9c09cb874e Updated jQuery-UI to latest version
Signed-off-by: Roman Schmerold (BNoiZe) <bnoize@froxlor.org>
2014-02-20 10:42:46 +01:00
Florian Aders (EleRas)
b661547817 Correcting PDO - Constant, fixes #1382
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
2014-02-20 08:29:26 +01:00
Michael Kaufmann (d00p)
2d7ca2a7db fix Call to undefined method when updating mysql-access-hosts-setting
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-02-19 16:13:50 +01:00
Michael Kaufmann (d00p)
d6fdf887ce don't add session-id to external redirects, thx to Sephi
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-02-19 11:08:43 +01:00
Michael Kaufmann (d00p)
4f4689c4e9 also check for php.configs that are set as default on deletion; emphasize default config in overview
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-02-18 17:13:25 +01:00
Michael Kaufmann (d00p)
8ff2c930ee show and check whether a php-config is used by the system-hostname
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2014-02-18 17:01:02 +01:00
1896 changed files with 137187 additions and 141329 deletions

19
.editorconfig Normal file
View File

@@ -0,0 +1,19 @@
root = true
[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
indent_style = tab
indent_size = 4
trim_trailing_whitespace = true
[*.md]
trim_trailing_whitespace = false
[*.{yml,yaml}]
indent_style = space
indent_size = 2
[docker-compose.yml]
indent_size = 4

31
.github/CONTRIBUTING.md vendored Normal file
View File

@@ -0,0 +1,31 @@
# Contribution
Before you start working on a PR, contact us via [Discord](https://discord.froxlor.org) or the forum at [https://forum.froxlor.org](https://forum.froxlor.org) to get a clue whether someone else isn't already working on it or if we don not want/need this certain change. Of course, bugfixes are always welcome.
Please always focus on the **main** branch of our [Github repository](https://github.com/Froxlor/Froxlor).
## Checklist
General rules for PRs are:
* Please save us all some trouble and unnecessary round-trips by _testing_ your changes.
* Re-write your commit history to provide a CLEAN history!
* i.e. do not provide PRs which contain a commit that changes something, the next changes it back, a third one changes it again, only a little differently...
Thanks!
### Service changes
If you make changes to the functionality of service configurations, please make sure your implementation covers all supported services and distributions.
### l10n
If you add new language strings, please make sure you add the english fallback strings in `lng/en.php`.
### New settings and database-layout changes
If you add new settings or implement database-changes, please make sure you add these to
* `install/froxlor.sql.php`
* handle the update (see [`install/updates/froxlor/update_2.x.inc.php`](https://github.com/Froxlor/Froxlor/blob/main/install/updates/froxlor/update_2.x.inc.php))
* if you have any question on how update-process works, please contact us

4
.github/FUNDING.yml vendored Normal file
View File

@@ -0,0 +1,4 @@
# These are supported funding model platforms
github: d00p
custom: ['https://paypal.me/Froxlor']

49
.github/ISSUE_TEMPLATE.md vendored Normal file
View File

@@ -0,0 +1,49 @@
# Bug report vs. support request
If you're unsure of whether your problem is a bug or a configuration error
* contact us via IRC in #froxlor on irc.libera.chat
* or post a thread in our forum at https://forum.froxlor.org
As a rule of thumb: before reporting an issue
* see if it hasn't been [reported](https://github.com/Froxlor/froxlor/issues) (and possibly already been [fixed](https://github.com/Froxlor/froxlor/issues?utf8=✓&q=is:issue%20is:closed)) first
* try with the git master
# Summary
Please provide a concise summary of the problem you're experiencing...
# System information
* Froxlor version: $version/$gitSHA1
* Web server: apache2/nginx/lighttpd
* DNS server: Bind/PowerDNS (standalone)/PowerDNS (Bind-backend)
* POP/IMAP server: Courier/Dovecot
* SMTP server: postfix/exim
* FTP server: proftpd/pureftpd
* OS/Version: ...
# Steps to reproduce
1.
2.
3.
# Expected behavior
1.
2.
3.
# Actual behavior
1.
2.
3.
# Log files/log entries
syslog:
<pre>
example
</pre>

40
.github/ISSUE_TEMPLATE/bug_report.md vendored Normal file
View File

@@ -0,0 +1,40 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''
---
**As a rule of thumb: before reporting an issue**
* see if it hasn't been [reported](https://github.com/Froxlor/froxlor/issues) (and possibly already been [fixed](https://github.com/Froxlor/froxlor/issues?utf8=✓&q=is:issue%20is:closed)) first
* try with the git master
**Describe the bug**
A clear and concise description of what the bug is.
**System information**
* Froxlor version: $version/$gitSHA1
* Web server: apache2/nginx/lighttpd
* DNS server: Bind/PowerDNS (standalone)/PowerDNS (Bind-backend)
* POP/IMAP server: Courier/Dovecot
* SMTP server: postfix/exim
* FTP server: proftpd/pureftpd
* OS/Version: ...
**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
**Expected behavior**
A clear and concise description of what you expected to happen.
**Logfiles**
If applicable, add log-entries to help explain your problem.
**Additional context**
Add any other context about the problem here.

View File

@@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: ''
assignees: ''
---
**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
**Describe the solution you'd like**
A clear and concise description of what you want to happen.
**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.
**Additional context**
Add any other context or screenshots about the feature request here.

22
.github/LICENSE_HEADER vendored Normal file
View File

@@ -0,0 +1,22 @@
/**
* This file is part of the Froxlor project.
* Copyright (c) 2010 the Froxlor Team (see authors).
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, you can also view it online at
* https://files.froxlor.org/misc/COPYING.txt
*
* @copyright the authors
* @author Froxlor team <team@froxlor.org>
* @license https://files.froxlor.org/misc/COPYING.txt GPLv2
*/

37
.github/PULL_REQUEST_TEMPLATE.md vendored Normal file
View File

@@ -0,0 +1,37 @@
# Description
Please include a summary of the change and which issue is fixed if any. Please also include relevant motivation and context. List any dependencies that are required for this change.
Fixes # (issue)
## Type of change
Please delete options that are not relevant.
- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] This change requires a documentation update
# How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
- [ ] Test A
- [ ] Test B
**Test Configuration**:
* Distribution:
* Webserver:
* PHP:
* etc.etc.:
# Checklist:
- [ ] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [ ] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my feature works
- [ ] New and existing unit tests pass locally with my changes

14
.github/workflows/build-docs.yml vendored Normal file
View File

@@ -0,0 +1,14 @@
name: build-documentation
on:
release:
types: [published]
jobs:
build_docs:
runs-on: ubuntu-latest
steps:
- env:
GITHUB_TOKEN: ${{ secrets.ORG_GITHUB_TOKEN }}
run: |
gh workflow run --repo Froxlor/Documentation build-and-deploy.yml -f type=tags ref=${{github.ref_name}}

81
.github/workflows/build-mariadb.yml vendored Normal file
View File

@@ -0,0 +1,81 @@
name: Froxlor-CI-MariaDB
on: ['push', 'pull_request', 'create']
jobs:
froxlor:
name: Froxlor (PHP ${{ matrix.php-versions }}, MariaDB ${{ matrix.mariadb-version }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php-versions: ['7.4', '8.1']
mariadb-version: [10.5, 10.4]
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup PHP, with composer and extensions
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
tools: composer:v2
extensions: mbstring, xml, ctype, pdo_mysql, mysql, curl, json, zip, session, filter, posix, openssl, fileinfo, bcmath, gmp
- name: Install tools
run: sudo apt-get install -y ant
- name: Adjust firewall
run: |
sudo ufw allow out 3306/tcp
sudo ufw allow in 3306/tcp
- name: Setup MariaDB
uses: getong/mariadb-action@v1.1
with:
mariadb version: ${{ matrix.mariadb-version }}
mysql database: 'froxlor010'
mysql root password: 'fr0xl0r.TravisCI'
- name: Wait for database
run: sleep 15
- name: Setup databases
run: |
mysql -h 127.0.0.1 --protocol=TCP -u root -pfr0xl0r.TravisCI -e "CREATE USER 'froxlor010'@'%' IDENTIFIED BY 'fr0xl0r.TravisCI';"
mysql -h 127.0.0.1 --protocol=TCP -u root -pfr0xl0r.TravisCI -e "GRANT ALL ON froxlor010.* TO 'froxlor010'@'%';"
php -r "echo include('install/froxlor.sql.php');" > /tmp/froxlor.sql
mysql -h 127.0.0.1 --protocol=TCP -u root -pfr0xl0r.TravisCI froxlor010 < /tmp/froxlor.sql
- name: Run testing
run: ant quick-build
# - name: irc push
# uses: rectalogic/notify-irc@v1
# if: github.event_name == 'push'
# with:
# channel: "#froxlor"
# server: "irc.libera.chat"
# nickname: froxlor-ci
# message: |
# ${{ github.actor }} pushed ${{ github.event.ref }} ${{ github.event.compare }}
# ${{ join(github.event.commits.*.message) }}
# - name: irc pull request
# uses: rectalogic/notify-irc@v1
# if: github.event_name == 'pull_request'
# with:
# channel: "#froxlor"
# server: "irc.libera.chat"
# nickname: froxlor-ci
# message: |
# ${{ github.actor }} opened PR ${{ github.event.pull_request.html_url }}
# - name: irc tag created
# uses: rectalogic/notify-irc@v1
# if: github.event_name == 'create' && github.event.ref_type == 'tag'
# with:
# channel: "#froxlor"
# server: "irc.libera.chat"
# nickname: froxlor-ci
# message: |
# ${{ github.actor }} tagged ${{ github.repository }} ${{ github.event.ref }}

59
.github/workflows/build-mysql.yml vendored Normal file
View File

@@ -0,0 +1,59 @@
name: Froxlor-CI-MySQL
on: ['push', 'pull_request', 'create']
jobs:
froxlor:
name: Froxlor (PHP ${{ matrix.php-versions }}, MySQL ${{ matrix.mysql-version }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php-versions: ['7.4', '8.1']
mysql-version: [8.0, 5.7]
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup PHP, with composer and extensions
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
tools: composer:v2
extensions: mbstring, xml, ctype, pdo_mysql, mysql, curl, json, zip, session, filter, posix, openssl, fileinfo, bcmath, gmp
- name: Install tools
run: sudo apt-get install -y ant
- name: Adjust firewall
run: |
sudo ufw allow out 3306/tcp
sudo ufw allow in 3306/tcp
- name: Setup MySQL
uses: samin/mysql-action@v1.3
with:
mysql version: ${{ matrix.mysql-version }}
mysql database: 'froxlor010'
mysql root password: 'fr0xl0r.TravisCI'
- name: Wait for database
run: sleep 15
- name: Setup database (8.0)
if: matrix.mysql-version == '8.0'
run: |
mysql -h 127.0.0.1 --protocol=TCP -u root -pfr0xl0r.TravisCI -e "CREATE USER 'froxlor010'@'%' IDENTIFIED WITH mysql_native_password BY 'fr0xl0r.TravisCI';"
mysql -h 127.0.0.1 --protocol=TCP -u root -pfr0xl0r.TravisCI -e "GRANT ALL ON froxlor010.* TO 'froxlor010'@'%';"
php -r "echo include('install/froxlor.sql.php');" > /tmp/froxlor.sql
mysql -h 127.0.0.1 --protocol=TCP -u root -pfr0xl0r.TravisCI froxlor010 < /tmp/froxlor.sql
- name: Setup database (5.7)
if: matrix.mysql-version == '5.7'
run: |
mysql -h 127.0.0.1 --protocol=TCP -u root -pfr0xl0r.TravisCI -e "CREATE USER 'froxlor010'@'%' IDENTIFIED BY 'fr0xl0r.TravisCI';"
mysql -h 127.0.0.1 --protocol=TCP -u root -pfr0xl0r.TravisCI -e "GRANT ALL ON froxlor010.* TO 'froxlor010'@'%';"
php -r "echo include('install/froxlor.sql.php');" > /tmp/froxlor.sql
mysql -h 127.0.0.1 --protocol=TCP -u root -pfr0xl0r.TravisCI froxlor010 < /tmp/froxlor.sql
- name: Run testing
run: ant quick-build

25
.gitignore vendored
View File

@@ -1,9 +1,28 @@
lib/classes/htmlpurifier/library/HTMLPurifier/DefinitionCache/Serializer/*/
templates/*
logs/*
install/update.log
install/*.json
lib/userdata.inc.php
lib/userdata.inc.php.bak
lib/config.inc.php
logs/*
!logs/index.html
.buildpath
.project
.settings/
.test/
*.diff
*~
.well-known
.idea
*.iml
img/
vendor/
node_modules/
fonts/
templates/*
!templates/index.html
!templates/Froxlor/
templates/Froxlor/assets/mix-manifest.json
templates/Froxlor/assets/css/
templates/Froxlor/assets/js/
templates/Froxlor/assets/webfonts/
!templates/misc/

154
2fa.php Normal file
View File

@@ -0,0 +1,154 @@
<?php
/**
* This file is part of the Froxlor project.
* Copyright (c) 2010 the Froxlor Team (see authors).
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, you can also view it online at
* https://files.froxlor.org/misc/COPYING.txt
*
* @copyright the authors
* @author Froxlor team <team@froxlor.org>
* @license https://files.froxlor.org/misc/COPYING.txt GPLv2
*/
if (!defined('AREA')) {
header("Location: index.php");
exit();
}
use Froxlor\Database\Database;
use Froxlor\FroxlorLogger;
use Froxlor\FroxlorTwoFactorAuth;
use Froxlor\Settings;
use Froxlor\UI\Panel\UI;
use Froxlor\UI\Response;
use Froxlor\PhpHelper;
use Froxlor\User;
if (Settings::Get('2fa.enabled') != '1') {
Response::dynamicError('2fa.2fa_not_activated');
}
// This file is being included in admin_index and customer_index
// and therefore does not need to require lib/init.php
if (AREA == 'admin') {
$upd_stmt = Database::prepare("UPDATE `" . TABLE_PANEL_ADMINS . "` SET `type_2fa` = :t2fa, `data_2fa` = :d2fa WHERE adminid = :id");
$uid = $userinfo['adminid'];
} elseif (AREA == 'customer') {
$upd_stmt = Database::prepare("UPDATE `" . TABLE_PANEL_CUSTOMERS . "` SET `type_2fa` = :t2fa, `data_2fa` = :d2fa WHERE customerid = :id");
$uid = $userinfo['customerid'];
}
$success_message = "";
$tfa = new FroxlorTwoFactorAuth('Froxlor ' . Settings::Get('system.hostname'));
// do the delete and then just show a success-message
if ($action == 'delete') {
Database::pexecute($upd_stmt, [
't2fa' => 0,
'd2fa' => "",
'id' => $uid
]);
Response::standardSuccess('2fa.2fa_removed');
} elseif ($action == 'preadd') {
$type = isset($_POST['type_2fa']) ? $_POST['type_2fa'] : '0';
$data = "";
if ($type > 0) {
// generate secret for TOTP
$data = $tfa->createSecret();
$userinfo['type_2fa'] = $type;
$userinfo['data_2fa'] = $data;
$userinfo['2fa_unsaved'] = true;
// if type = email, send a code there for confirmation
if ($type == 1) {
$code = $tfa->getCode($data);
$_mailerror = false;
$mailerr_msg = "";
$replace_arr = [
'CODE' => $code
];
$mail_body = html_entity_decode(PhpHelper::replaceVariables(lng('mails.2fa.mailbody'), $replace_arr));
try {
$mail->Subject = lng('mails.2fa.subject');
$mail->AltBody = $mail_body;
$mail->MsgHTML(str_replace("\n", "<br />", $mail_body));
$mail->AddAddress($userinfo['email'], User::getCorrectUserSalutation($userinfo));
$mail->Send();
} catch (\PHPMailer\PHPMailer\Exception $e) {
$mailerr_msg = $e->errorMessage();
$_mailerror = true;
} catch (Exception $e) {
$mailerr_msg = $e->getMessage();
$_mailerror = true;
}
if ($_mailerror) {
Response::dynamicError($mailerr_msg);
}
}
UI::twig()->addGlobal('userinfo', $userinfo);
} else {
Response::dynamicError('Select one of the possible values for 2FA');
}
} elseif ($action == 'add') {
$type = isset($_POST['type_2fa']) ? $_POST['type_2fa'] : '0';
$data = isset($_POST['data_2fa']) ? $_POST['data_2fa'] : '';
$code = isset($_POST['codevalidation']) ? $_POST['codevalidation'] : '';
// validate
$result = $tfa->verifyCode($data, $code, 3);
if ($result) {
if ($type == 0 || $type == 1) {
// no fixed secret for email validation, the validation code will be set on the fly
$data = "";
}
Database::pexecute($upd_stmt, [
't2fa' => $type,
'd2fa' => $data,
'id' => $uid
]);
Response::standardSuccess('2fa.2fa_added', $filename);
}
Response::dynamicError('Invalid/wrong code');
}
$log->logAction(FroxlorLogger::USR_ACTION, LOG_NOTICE, "viewed 2fa::overview");
$type_select_values = [];
$ga_qrcode = '';
if ($userinfo['type_2fa'] == '0') {
// available types
$type_select_values = [
0 => '-',
1 => 'E-Mail',
2 => 'Authenticator'
];
asort($type_select_values);
} elseif ($userinfo['type_2fa'] == '1') {
// email 2fa enabled
} elseif ($userinfo['type_2fa'] == '2') {
// authenticator 2fa enabled
$ga_qrcode = $tfa->getQRCodeImageAsDataUri($userinfo['loginname'], $userinfo['data_2fa']);
}
UI::view('user/2fa.html.twig', [
'type_select_values' => $type_select_values,
'ga_qrcode' => $ga_qrcode
]);

View File

@@ -1,3 +1,7 @@
[![Froxlor-CI](https://github.com/Froxlor/Froxlor/actions/workflows/build-mariadb.yml/badge.svg?branch=main)](https://github.com/Froxlor/Froxlor/actions/workflows/build-mariadb.yml)
[![Froxlor-CI](https://github.com/Froxlor/Froxlor/actions/workflows/build-mysql.yml/badge.svg?branch=main)](https://github.com/Froxlor/Froxlor/actions/workflows/build-mysql.yml)
[![Discord](https://badgen.net/badge/icon/discord?icon=discord&label)](https://discord.froxlor.org)
# Froxlor
The server administration software for your needs.
@@ -6,55 +10,73 @@ Developed by experienced server administrators, this panel simplifies the effort
## Installation
### Fast install
1. Ensure that your webserver serves /var/www
2. Extract froxlor into /var/www
1. Ensure that your webserver serves /var/www/html
2. Extract froxlor into /var/www/html
3. Point your browser to http://[ip-of-webserver]/froxlor
4. Follow the installer
5. Login as administrator
6. Adjust "Server > Settings" according to your needs
7. Choose your distribution under "Server > Configuration"
8. Follow the steps for your services
9. Have fun!
6. Have fun!
If you have chosen to do the configuration by hand during the installation, you have to complete some more steps:
1. Adjust "System > Settings" according to your needs
2. Choose your distribution under "System > Configuration"
3. Follow the steps for your services
### Detailed installation
http://redmine.froxlor.org/projects/froxlor/wiki/Installationtarball
https://docs.froxlor.org/latest/general/installation/
## Help
You may find help in the following places:
### Discord
The froxlor community discord server can be found here: https://discord.froxlor.org
### IRC
froxlor may be found on freenode.net, channel #froxlor:
irc://chat.freenode.net/froxlor
froxlor may be found on libera.chat, channel #froxlor:
irc://irc.libera.chat/froxlor
### Forum
The community is located on http://forum.froxlor.org
The community is located on https://forum.froxlor.org/
### Wiki
More documentation may be found in the froxlor - wiki:
http://redmine.froxlor.org/projects/froxlor/wiki
More documentation may be found in the froxlor - documentation:
https://docs.froxlor.org/
## License
May be found in COPYING
May be found in [COPYING](COPYING)
## Downloads
### Tarball
http://files.froxlor.org/releases/froxlor-latest.tar.gz [MD5](http://files.froxlor.org/releases/froxlor-latest.tar.gz.md5) [SHA1](http://files.froxlor.org/releases/froxlor-latest.tar.gz.sha1)
https://files.froxlor.org/releases/froxlor-latest.tar.gz [MD5](https://files.froxlor.org/releases/froxlor-latest.tar.gz.md5) [SHA1](https://files.froxlor.org/releases/froxlor-latest.tar.gz.sha1)
### Debian repository
### Debian / Ubuntu repository
[HowTo](http://redmine.froxlor.org/projects/froxlor/wiki/Installationdebian)
[HowTo](https://docs.froxlor.org/latest/general/installation/apt-package.html)
/etc/apt/sources.list.d/froxlor.list
> deb http://debian.froxlor.org [squeeze|wheezy] main
#### Debian
### Gentoo repository
```
apt-get -y install apt-transport-https lsb-release ca-certificates curl
curl -sSLo /usr/share/keyrings/deb.froxlor.org-froxlor.gpg https://deb.froxlor.org/froxlor.gpg
echo sh -c '"deb [signed-by=/usr/share/keyrings/deb.froxlor.org-froxlor.gpg] https://deb.froxlor.org/debian $(lsb_release -sc) main" > /etc/apt/sources.list.d/froxlor.list'
```
[HowTo](http://redmine.froxlor.org/projects/froxlor/wiki/Installationgentoo)
#### Ubuntu
http://files.froxlor.org/gentoo/repositories.xml
```
apt-get -y install apt-transport-https lsb-release ca-certificates curl
curl -sSLo /usr/share/keyrings/deb.froxlor.org-froxlor.gpg https://deb.froxlor.org/froxlor.gpg
echo sh -c '"deb [signed-by=/usr/share/keyrings/deb.froxlor.org-froxlor.gpg] https://deb.froxlor.org/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/froxlor.list'
```
## Contributing
[see here](.github/CONTRIBUTING.md)

47
SECURITY.md Normal file
View File

@@ -0,0 +1,47 @@
# froxlor's Security Policy
Welcome and thanks for taking interest in [froxlor](https://www.froxlor.org)!
We are mostly interested in reports by actual froxlor users but all high quality contributions are welcome.
Please try your best to describe a clear and realistic impact for your report and please don't open any public issues on GitHub or social media, we're doing our best to respond through huntr as quickly as we can.
With that, good luck hacking us ;)
## Supported versions
- ️✅ **2.x** (`main` git-branch)
- ❌ 0.10.x (`0.10.x` git-branch)
- ❌ 0.9.x (`0.9.x`git-branch)
## Qualifying Vulnerabilities
### Vulnerabilities we really care about
- SQL injection bugs
- server-side code execution bugs
- cross-site scripting vulnerabilities
- cross-site request forgery vulnerabilities
- authentication and authorization flaws
- sensitive information disclosure
### Vulnerabilities we accept
Only reproducable issues on a default/clean setup from the latest stable release of a supported version will be accepted.
## Non-Qualifying Vulnerabilities
- Reports from automated tools or scanners
- Theoretical attacks without proof of exploitability
- Attacks that are the result of a third party library should be reported to the library maintainers
- Social engineering
- Reflected file download
- Physical attacks
- Weak SSL/TLS/SSH algorithms or protocols
- Attacks involving physical access to a users device, or involving a device or network thats already seriously compromised (eg man-in-the-middle).
- The user attacks themselves
- anything in `/doc`
- anything in `/tests`
## Reporting a Vulnerability
If you think you have found a vulnerability in froxlor, please head over to [https://huntr.dev/repos/froxlor/froxlor](https://huntr.dev/repos/froxlor/froxlor) and use the reporting possibilities there as we are funding the prize-pot for froxlor on this platform. Also, please give us appropriate time to fix the issue and build update-packages before publishing anything into the wild. Alternatively you can send us an email to [team@froxlor.org](team@froxlor.org).

View File

@@ -1,72 +0,0 @@
<?php
/**
* This file is part of the Froxlor project.
* Copyright (c) 2003-2009 the SysCP Team (see authors).
* Copyright (c) 2010 the Froxlor Team (see authors).
*
* For the full copyright and license information, please view the COPYING
* file that was distributed with this source code. You can also view the
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
*
* @copyright (c) the authors
* @author Florian Lippert <flo@syscp.org> (2003-2009)
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Settings
*
*/
return array(
'groups' => array(
'version' => array(
'fields' => array(
'panel_version' => array(
'settinggroup' => 'panel',
'varname' => 'version',
'type' => 'hidden',
'default' => '',
),
'panel_frontend' => array(
'settinggroup' => 'panel',
'varname' => 'frontend',
'type' => 'hidden',
'default' => '',
),
'system_last_tasks_run' => array(
'settinggroup' => 'system',
'varname' => 'last_tasks_run',
'type' => 'hidden',
'default' => '',
'save_method' => 'storeSettingField',
),
'system_last_traffic_run' => array(
'settinggroup' => 'system',
'varname' => 'last_traffic_run',
'type' => 'hidden',
'default' => '',
),
'system_lastcronrun' => array(
'settinggroup' => 'system',
'varname' => 'lastcronrun',
'type' => 'hidden',
'default' => '',
),
'system_lastguid' => array(
'settinggroup' => 'system',
'varname' => 'lastguid',
'type' => 'hidden',
'default' => 9999,
),
'system_lastaccountnumber' => array(
'settinggroup' => 'system',
'varname' => 'lastaccountnumber',
'type' => 'hidden',
'default' => 0,
),
),
),
),
);
?>

View File

@@ -2,233 +2,343 @@
/**
* This file is part of the Froxlor project.
* Copyright (c) 2003-2009 the SysCP Team (see authors).
* Copyright (c) 2010 the Froxlor Team (see authors).
*
* For the full copyright and license information, please view the COPYING
* file that was distributed with this source code. You can also view the
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* @copyright (c) the authors
* @author Florian Lippert <flo@syscp.org> (2003-2009)
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Language
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, you can also view it online at
* https://files.froxlor.org/misc/COPYING.txt
*
* @copyright the authors
* @author Froxlor team <team@froxlor.org>
* @license https://files.froxlor.org/misc/COPYING.txt GPLv2
*/
return array(
'groups' => array(
'panel' => array(
'title' => $lng['admin']['panelsettings'],
'fields' => array(
'panel_standardlanguage' => array(
'label' => array('title' => $lng['login']['language'], 'description' => $lng['serversettings']['language']['description']),
return [
'groups' => [
'panel' => [
'title' => lng('admin.panelsettings'),
'icon' => 'fa-solid fa-chalkboard-user',
'fields' => [
'panel_standardlanguage' => [
'label' => [
'title' => lng('login.language'),
'description' => lng('serversettings.language.description')
],
'settinggroup' => 'panel',
'varname' => 'standardlanguage',
'type' => 'option',
'default' => 'English',
'option_mode' => 'one',
'option_options_method' => 'getLanguages',
'save_method' => 'storeSettingField',
),
'panel_default_theme' => array(
'label' => array('title' => $lng['panel']['theme'], 'description' => $lng['serversettings']['default_theme']),
'type' => 'select',
'default' => 'en',
'option_options_method' => [
'\\Froxlor\\Language',
'getLanguages'
],
'save_method' => 'storeSettingField'
],
'panel_default_theme' => [
'label' => [
'title' => lng('panel.theme'),
'description' => lng('serversettings.default_theme')
],
'settinggroup' => 'panel',
'varname' => 'default_theme',
'type' => 'option',
'type' => 'select',
'default' => 'Froxlor',
'option_mode' => 'one',
'option_options_method' => 'getThemes',
'save_method' => 'storeSettingDefaultTheme',
),
'panel_allow_theme_change_customer' => array(
'label' => $lng['serversettings']['panel_allow_theme_change_customer'],
'option_options_method' => [
'\\Froxlor\\UI\\Panel\\UI',
'getThemes'
],
'save_method' => 'storeSettingDefaultTheme'
],
'panel_allow_theme_change_customer' => [
'label' => lng('serversettings.panel_allow_theme_change_customer'),
'settinggroup' => 'panel',
'varname' => 'allow_theme_change_customer',
'type' => 'bool',
'default' => true,
'save_method' => 'storeSettingField',
),
'panel_allow_theme_change_admin' => array(
'label' => $lng['serversettings']['panel_allow_theme_change_admin'],
'settinggroup' => 'panel',
'varname' => 'allow_theme_change_admin',
'type' => 'bool',
'type' => 'checkbox',
'default' => true,
'save_method' => 'storeSettingField'
),
'panel_natsorting' => array(
'label' => $lng['serversettings']['natsorting'],
],
'panel_allow_theme_change_admin' => [
'label' => lng('serversettings.panel_allow_theme_change_admin'),
'settinggroup' => 'panel',
'varname' => 'allow_theme_change_admin',
'type' => 'checkbox',
'default' => true,
'save_method' => 'storeSettingField'
],
'panel_natsorting' => [
'label' => lng('serversettings.natsorting'),
'settinggroup' => 'panel',
'varname' => 'natsorting',
'type' => 'bool',
'type' => 'checkbox',
'default' => false,
'save_method' => 'storeSettingField',
),
'panel_no_robots' => array(
'label' => $lng['serversettings']['no_robots'],
'settinggroup' => 'panel',
'varname' => 'no_robots',
'type' => 'bool',
'default' => false,
'save_method' => 'storeSettingField',
),
'panel_paging' => array(
'label' => $lng['serversettings']['paging'],
'advanced_mode' => true
],
'panel_paging' => [
'label' => lng('serversettings.paging'),
'settinggroup' => 'panel',
'varname' => 'paging',
'type' => 'int',
'int_min' => 0,
'type' => 'number',
'min' => 0,
'default' => 0,
'save_method' => 'storeSettingField',
),
'panel_pathedit' => array(
'label' => $lng['serversettings']['pathedit'],
'save_method' => 'storeSettingField'
],
'panel_pathedit' => [
'label' => lng('serversettings.pathedit'),
'settinggroup' => 'panel',
'varname' => 'pathedit',
'type' => 'option',
'type' => 'select',
'default' => 'Manual',
'option_mode' => 'one',
'option_options' => array('Manual' => $lng['serversettings']['manual'], 'Dropdown' => $lng['serversettings']['dropdown']),
'save_method' => 'storeSettingField',
),
'use_webfonts' => array(
'label' => $lng['serversettings']['enablewebfonts'],
'settinggroup' => 'panel',
'varname' => 'use_webfonts',
'type' => 'bool',
'default' => true,
'save_method' => 'storeSettingField',
),
'webfont' => array(
'label' => $lng['serversettings']['definewebfont']['title'],
'settinggroup' => 'panel',
'varname' => 'webfont',
'type' => 'string',
'default' => 'Numans',
'string_emptyallowed' => false,
'save_method' => 'storeSettingField',
),
'panel_adminmail' => array(
'label' => $lng['serversettings']['adminmail'],
'select_var' => [
'Manual' => lng('serversettings.manual'),
'Dropdown' => lng('serversettings.dropdown')
],
'save_method' => 'storeSettingField'
],
'panel_adminmail' => [
'label' => lng('serversettings.adminmail'),
'settinggroup' => 'panel',
'varname' => 'adminmail',
'type' => 'string',
'string_type' => 'mail',
'string_emptyallowed' => false,
'type' => 'email',
'string_emptyallowed' => true,
'default' => '',
'save_method' => 'storeSettingField',
),
'panel_adminmail_defname' => array(
'label' => $lng['serversettings']['adminmail_defname'],
'save_method' => 'storeSettingField'
],
'panel_adminmail_defname' => [
'label' => lng('serversettings.adminmail_defname'),
'settinggroup' => 'panel',
'varname' => 'adminmail_defname',
'type' => 'string',
'type' => 'text',
'default' => 'Froxlor Administrator',
'save_method' => 'storeSettingField',
),
'panel_adminmail_return' => array(
'label' => $lng['serversettings']['adminmail_return'],
'save_method' => 'storeSettingField'
],
'panel_adminmail_return' => [
'label' => lng('serversettings.adminmail_return'),
'settinggroup' => 'panel',
'varname' => 'adminmail_return',
'type' => 'string',
'string_type' => 'mail',
'type' => 'email',
'string_emptyallowed' => true,
'default' => '',
'save_method' => 'storeSettingField',
),
'panel_decimal_places' => array(
'label' => $lng['serversettings']['decimal_places'],
'advanced_mode' => true
],
'panel_decimal_places' => [
'label' => lng('serversettings.decimal_places'),
'settinggroup' => 'panel',
'varname' => 'decimal_places',
'type' => 'int',
'int_min' => 0,
'int_max' => 15,
'type' => 'number',
'min' => 0,
'max' => 15,
'default' => 4,
'save_method' => 'storeSettingField',
),
'panel_phpmyadmin_url' => array(
'label' => $lng['serversettings']['phpmyadmin_url'],
'advanced_mode' => true
],
'panel_phpmyadmin_url' => [
'label' => lng('serversettings.phpmyadmin_url'),
'settinggroup' => 'panel',
'varname' => 'phpmyadmin_url',
'type' => 'string',
'string_type' => 'url',
'type' => 'url',
'string_emptyallowed' => true,
'default' => '',
'save_method' => 'storeSettingField',
),
'panel_webmail_url' => array(
'label' => $lng['serversettings']['webmail_url'],
'save_method' => 'storeSettingField'
],
'panel_webmail_url' => [
'label' => lng('serversettings.webmail_url'),
'settinggroup' => 'panel',
'varname' => 'webmail_url',
'type' => 'string',
'string_type' => 'url',
'type' => 'url',
'string_emptyallowed' => true,
'default' => '',
'save_method' => 'storeSettingField',
),
'panel_webftp_url' => array(
'label' => $lng['serversettings']['webftp_url'],
'save_method' => 'storeSettingField'
],
'panel_webftp_url' => [
'label' => lng('serversettings.webftp_url'),
'settinggroup' => 'panel',
'varname' => 'webftp_url',
'type' => 'string',
'string_type' => 'url',
'type' => 'url',
'string_emptyallowed' => true,
'default' => '',
'save_method' => 'storeSettingField',
),
'admin_show_version_login' => array(
'label' => $lng['admin']['show_version_login'],
'save_method' => 'storeSettingField'
],
'admin_show_version_login' => [
'label' => lng('admin.show_version_login'),
'settinggroup' => 'admin',
'varname' => 'show_version_login',
'type' => 'bool',
'type' => 'checkbox',
'default' => false,
'save_method' => 'storeSettingField',
),
'admin_show_version_footer' => array(
'label' => $lng['admin']['show_version_footer'],
'advanced_mode' => true
],
'admin_show_version_footer' => [
'label' => lng('admin.show_version_footer'),
'settinggroup' => 'admin',
'varname' => 'show_version_footer',
'type' => 'bool',
'type' => 'checkbox',
'default' => false,
'save_method' => 'storeSettingField',
),
'admin_show_news_feed' => array(
'label' => $lng['admin']['show_news_feed'],
'save_method' => 'storeSettingField'
],
'admin_show_news_feed' => [
'label' => lng('admin.show_news_feed'),
'settinggroup' => 'admin',
'varname' => 'show_news_feed',
'type' => 'bool',
'default' => true,
'save_method' => 'storeSettingField',
),
'panel_allow_domain_change_admin' => array(
'label' => $lng['serversettings']['panel_allow_domain_change_admin'],
'type' => 'checkbox',
'default' => false,
'save_method' => 'storeSettingField'
],
'customer_show_news_feed' => [
'label' => lng('admin.customer_show_news_feed'),
'settinggroup' => 'customer',
'varname' => 'show_news_feed',
'type' => 'checkbox',
'default' => false,
'save_method' => 'storeSettingField'
],
'customer_news_feed_url' => [
'label' => lng('admin.customer_news_feed_url'),
'settinggroup' => 'customer',
'varname' => 'news_feed_url',
'type' => 'url',
'string_emptyallowed' => true,
'default' => '',
'save_method' => 'storeSettingField'
],
'panel_allow_domain_change_admin' => [
'label' => lng('serversettings.panel_allow_domain_change_admin'),
'settinggroup' => 'panel',
'varname' => 'allow_domain_change_admin',
'type' => 'bool',
'type' => 'checkbox',
'default' => false,
'save_method' => 'storeSettingField',
),
'panel_allow_domain_change_customer' => array(
'label' => $lng['serversettings']['panel_allow_domain_change_customer'],
'advanced_mode' => true
],
'panel_allow_domain_change_customer' => [
'label' => lng('serversettings.panel_allow_domain_change_customer'),
'settinggroup' => 'panel',
'varname' => 'allow_domain_change_customer',
'type' => 'bool',
'type' => 'checkbox',
'default' => false,
'save_method' => 'storeSettingField',
),
'panel_phpconfigs_hidestdsubdomain' => array(
'label' => $lng['serversettings']['panel_phpconfigs_hidestdsubdomain'],
'advanced_mode' => true
],
'panel_phpconfigs_hidesubdomains' => [
'label' => lng('serversettings.panel_phpconfigs_hidesubdomains'),
'settinggroup' => 'panel',
'varname' => 'phpconfigs_hidesubdomains',
'type' => 'checkbox',
'default' => true,
'save_method' => 'storeSettingField',
'advanced_mode' => true
],
'panel_phpconfigs_hidestdsubdomain' => [
'label' => lng('serversettings.panel_phpconfigs_hidestdsubdomain'),
'settinggroup' => 'panel',
'varname' => 'phpconfigs_hidestdsubdomain',
'type' => 'bool',
'type' => 'checkbox',
'default' => false,
'save_method' => 'storeSettingField',
),
),
),
),
);
?>
'advanced_mode' => true
],
'panel_customer_hide_options' => [
'label' => lng('serversettings.panel_customer_hide_options'),
'settinggroup' => 'panel',
'varname' => 'customer_hide_options',
'type' => 'select',
'default' => '',
'select_mode' => 'multiple',
'option_emptyallowed' => true,
'select_var' => [
'email' => lng('menue.email.email'),
'mysql' => lng('menue.mysql.mysql'),
'domains' => lng('menue.domains.domains'),
'ftp' => lng('menue.ftp.ftp'),
'extras' => lng('menue.extras.extras'),
'extras.directoryprotection' => lng('menue.extras.extras') . " / " . lng('menue.extras.directoryprotection'),
'extras.pathoptions' => lng('menue.extras.extras') . " / " . lng('menue.extras.pathoptions'),
'extras.logger' => lng('menue.extras.extras') . " / " . lng('menue.logger.logger'),
'extras.backup' => lng('menue.extras.extras') . " / " . lng('menue.extras.backup'),
'traffic' => lng('menue.traffic.traffic'),
'traffic.http' => lng('menue.traffic.traffic') . " / HTTP",
'traffic.ftp' => lng('menue.traffic.traffic') . " / FTP",
'traffic.mail' => lng('menue.traffic.traffic') . " / Mail",
'misc.documentation' => lng('admin.documentation'),
],
'save_method' => 'storeSettingField',
'advanced_mode' => true
],
'panel_imprint_url' => [
'label' => lng('serversettings.imprint_url'),
'settinggroup' => 'panel',
'varname' => 'imprint_url',
'type' => 'url',
'string_emptyallowed' => true,
'default' => '',
'save_method' => 'storeSettingField'
],
'panel_terms_url' => [
'label' => lng('serversettings.terms_url'),
'settinggroup' => 'panel',
'varname' => 'terms_url',
'type' => 'url',
'string_emptyallowed' => true,
'default' => '',
'save_method' => 'storeSettingField'
],
'panel_privacy_url' => [
'label' => lng('serversettings.privacy_url'),
'settinggroup' => 'panel',
'varname' => 'privacy_url',
'type' => 'url',
'string_emptyallowed' => true,
'default' => '',
'save_method' => 'storeSettingField'
],
'panel_logo_overridetheme' => [
'label' => lng('serversettings.logo_overridetheme'),
'settinggroup' => 'panel',
'varname' => 'logo_overridetheme',
'type' => 'checkbox',
'default' => false,
'save_method' => 'storeSettingField'
],
'panel_logo_overridecustom' => [
'label' => lng('serversettings.logo_overridecustom'),
'settinggroup' => 'panel',
'varname' => 'logo_overridecustom',
'type' => 'checkbox',
'default' => false,
'save_method' => 'storeSettingField'
],
'panel_logo_image_header' => [
'label' => lng('serversettings.logo_image_header'),
'settinggroup' => 'panel',
'varname' => 'logo_image_header',
'type' => 'image',
'accept' => 'image/jpeg, image/jpg, image/png, image/gif',
'image_name' => 'logo_header',
'default' => '',
'save_method' => 'storeSettingImage'
],
'panel_logo_image_login' => [
'label' => lng('serversettings.logo_image_login'),
'settinggroup' => 'panel',
'varname' => 'logo_image_login',
'type' => 'image',
'accept' => 'image/jpeg, image/jpg, image/png, image/gif',
'image_name' => 'logo_login',
'default' => '',
'save_method' => 'storeSettingImage'
]
]
]
]
];

View File

@@ -2,152 +2,256 @@
/**
* This file is part of the Froxlor project.
* Copyright (c) 2003-2009 the SysCP Team (see authors).
* Copyright (c) 2010 the Froxlor Team (see authors).
*
* For the full copyright and license information, please view the COPYING
* file that was distributed with this source code. You can also view the
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* @copyright (c) the authors
* @author Florian Lippert <flo@syscp.org> (2003-2009)
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Settings
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, you can also view it online at
* https://files.froxlor.org/misc/COPYING.txt
*
* @copyright the authors
* @author Froxlor team <team@froxlor.org>
* @license https://files.froxlor.org/misc/COPYING.txt GPLv2
*/
return array(
'groups' => array(
'accounts' => array(
'title' => $lng['admin']['accountsettings'],
'fields' => array(
'session_sessiontimeout' => array(
'label' => $lng['serversettings']['session_timeout'],
return [
'groups' => [
'accounts' => [
'title' => lng('admin.accountsettings'),
'icon' => 'fa-solid fa-users-gear',
'fields' => [
'session_sessiontimeout' => [
'label' => lng('serversettings.session_timeout'),
'settinggroup' => 'session',
'varname' => 'sessiontimeout',
'type' => 'int',
'type' => 'number',
'min' => 60,
'default' => 600,
'save_method' => 'storeSettingField',
),
'session_allow_multiple_login' => array(
'label' => $lng['serversettings']['session_allow_multiple_login'],
'save_method' => 'storeSettingField'
],
'session_allow_multiple_login' => [
'label' => lng('serversettings.session_allow_multiple_login'),
'settinggroup' => 'session',
'varname' => 'allow_multiple_login',
'type' => 'bool',
'type' => 'checkbox',
'default' => false,
'save_method' => 'storeSettingField',
),
'login_domain_login' => array(
'label' => $lng['serversettings']['login_domain_login'],
'save_method' => 'storeSettingField'
],
'login_domain_login' => [
'label' => lng('serversettings.login_domain_login'),
'settinggroup' => 'login',
'varname' => 'domain_login',
'type' => 'bool',
'type' => 'checkbox',
'default' => false,
'save_method' => 'storeSettingField',
),
'login_maxloginattempts' => array(
'label' => $lng['serversettings']['maxloginattempts'],
'save_method' => 'storeSettingField'
],
'login_maxloginattempts' => [
'label' => lng('serversettings.maxloginattempts'),
'settinggroup' => 'login',
'varname' => 'maxloginattempts',
'type' => 'int',
'type' => 'number',
'min' => 1,
'default' => 3,
'save_method' => 'storeSettingField',
),
'login_deactivatetime' => array(
'label' => $lng['serversettings']['deactivatetime'],
'save_method' => 'storeSettingField'
],
'login_deactivatetime' => [
'label' => lng('serversettings.deactivatetime'),
'settinggroup' => 'login',
'varname' => 'deactivatetime',
'type' => 'int',
'type' => 'number',
'min' => 0,
'default' => 900,
'save_method' => 'storeSettingField',
),
'panel_password_min_length' => array(
'label' => $lng['serversettings']['panel_password_min_length'],
'save_method' => 'storeSettingField'
],
'2fa_enabled' => [
'label' => lng('2fa.2fa_enabled'),
'settinggroup' => '2fa',
'varname' => 'enabled',
'type' => 'checkbox',
'default' => true,
'save_method' => 'storeSettingField'
],
'panel_password_min_length' => [
'label' => lng('serversettings.panel_password_min_length'),
'settinggroup' => 'panel',
'varname' => 'password_min_length',
'type' => 'int',
'type' => 'number',
'min' => 0,
'default' => 0,
'save_method' => 'storeSettingField',
),
'panel_password_regex' => array(
'label' => $lng['serversettings']['panel_password_regex'],
'save_method' => 'storeSettingField'
],
'panel_password_alpha_lower' => [
'label' => lng('serversettings.panel_password_alpha_lower'),
'settinggroup' => 'panel',
'varname' => 'password_alpha_lower',
'type' => 'checkbox',
'default' => true,
'save_method' => 'storeSettingField'
],
'panel_password_alpha_upper' => [
'label' => lng('serversettings.panel_password_alpha_upper'),
'settinggroup' => 'panel',
'varname' => 'password_alpha_upper',
'type' => 'checkbox',
'default' => true,
'save_method' => 'storeSettingField'
],
'panel_password_numeric' => [
'label' => lng('serversettings.panel_password_numeric'),
'settinggroup' => 'panel',
'varname' => 'password_numeric',
'type' => 'checkbox',
'default' => false,
'save_method' => 'storeSettingField'
],
'panel_password_special_char_required' => [
'label' => lng('serversettings.panel_password_special_char_required'),
'settinggroup' => 'panel',
'varname' => 'password_special_char_required',
'type' => 'checkbox',
'default' => false,
'save_method' => 'storeSettingField'
],
'panel_password_special_char' => [
'label' => lng('serversettings.panel_password_special_char'),
'settinggroup' => 'panel',
'varname' => 'password_special_char',
'type' => 'text',
'default' => '!?<>§$%+#=@',
'save_method' => 'storeSettingField'
],
'panel_password_regex' => [
'label' => lng('serversettings.panel_password_regex'),
'settinggroup' => 'panel',
'varname' => 'password_regex',
'type' => 'string',
'type' => 'text',
'default' => '',
/* 'plausibility_check_method' => 'checkValidRegEx', */
'save_method' => 'storeSettingField',
),
'customer_accountprefix' => array(
'label' => $lng['serversettings']['accountprefix'],
'advanced_mode' => true
],
'system_req_limit_per_interval' => [
'label' => lng('serversettings.req_limit_per_interval'),
'settinggroup' => 'system',
'varname' => 'req_limit_per_interval',
'type' => 'number',
'min' => 30,
'default' => 60,
'save_method' => 'storeSettingField',
'advanced_mode' => true
],
'system_req_limit_interval' => [
'label' => lng('serversettings.req_limit_interval'),
'settinggroup' => 'system',
'varname' => 'req_limit_interval',
'type' => 'number',
'min' => 5,
'default' => 60,
'save_method' => 'storeSettingField',
'advanced_mode' => true
],
'customer_accountprefix' => [
'label' => lng('serversettings.accountprefix'),
'settinggroup' => 'customer',
'varname' => 'accountprefix',
'type' => 'string',
'type' => 'text',
'default' => '',
'plausibility_check_method' => 'checkUsername',
'save_method' => 'storeSettingField',
),
'customer_mysqlprefix' => array(
'label' => $lng['serversettings']['mysqlprefix'],
'plausibility_check_method' => [
'\\Froxlor\\Validate\\Check',
'checkUsername'
],
'save_method' => 'storeSettingField'
],
'customer_mysqlprefix' => [
'label' => lng('serversettings.mysqlprefix'),
'settinggroup' => 'customer',
'varname' => 'mysqlprefix',
'type' => 'string',
'type' => 'text',
'default' => '',
'plausibility_check_method' => 'checkUsername',
'save_method' => 'storeSettingField',
),
'customer_ftpprefix' => array(
'label' => $lng['serversettings']['ftpprefix'],
'plausibility_check_method' => [
'\\Froxlor\\Validate\\Check',
'checkUsername'
],
'save_method' => 'storeSettingField'
],
'customer_ftpprefix' => [
'label' => lng('serversettings.ftpprefix'),
'settinggroup' => 'customer',
'varname' => 'ftpprefix',
'type' => 'string',
'type' => 'text',
'default' => '',
'save_method' => 'storeSettingField',
),
'customer_ftpatdomain' => array(
'label' => $lng['serversettings']['ftpdomain'],
'save_method' => 'storeSettingField'
],
'customer_ftpatdomain' => [
'label' => lng('serversettings.ftpdomain'),
'settinggroup' => 'customer',
'varname' => 'ftpatdomain',
'type' => 'bool',
'type' => 'checkbox',
'default' => false,
'save_method' => 'storeSettingField',
),
'panel_allow_preset' => array(
'label' => $lng['serversettings']['allow_password_reset'],
'save_method' => 'storeSettingField'
],
'panel_allow_preset' => [
'label' => lng('serversettings.allow_password_reset'),
'settinggroup' => 'panel',
'varname' => 'allow_preset',
'type' => 'bool',
'type' => 'checkbox',
'default' => false,
'save_method' => 'storeSettingField',
'dependency' => array(
'dependency' => [
'fieldname' => 'panel_allow_preset_admin',
'fielddata' => array(
'fielddata' => [
'settinggroup' => 'panel',
'varname' => 'allow_preset_admin',
),
'varname' => 'allow_preset_admin'
],
'onlyif' => 0
)
),
'panel_allow_preset_admin' => array(
'label' => $lng['serversettings']['allow_password_reset_admin'],
]
],
'panel_allow_preset_admin' => [
'label' => lng('serversettings.allow_password_reset_admin'),
'settinggroup' => 'panel',
'varname' => 'allow_preset_admin',
'type' => 'bool',
'type' => 'checkbox',
'default' => false,
'save_method' => 'storeSettingField',
'dependency' => array(
'dependency' => [
'fieldname' => 'panel_allow_preset',
'fielddata' => array(
'fielddata' => [
'settinggroup' => 'panel',
'varname' => 'allow_preset',
),
'varname' => 'allow_preset'
],
'onlyif' => 1
)
),
),
),
),
);
?>
]
],
'system_backupenabled' => [
'label' => lng('serversettings.backupenabled'),
'settinggroup' => 'system',
'varname' => 'backupenabled',
'type' => 'checkbox',
'default' => false,
'cronmodule' => 'froxlor/backup',
'save_method' => 'storeSettingField'
],
'system_createstdsubdom_default' => [
'label' => lng('serversettings.createstdsubdom_default'),
'settinggroup' => 'system',
'varname' => 'createstdsubdom_default',
'type' => 'select',
'default' => '1',
'select_var' => [
'0' => lng('panel.no'),
'1' => lng('panel.yes')
],
'save_method' => 'storeSettingField'
],
]
]
]
];

View File

@@ -2,165 +2,333 @@
/**
* This file is part of the Froxlor project.
* Copyright (c) 2003-2009 the SysCP Team (see authors).
* Copyright (c) 2010 the Froxlor Team (see authors).
*
* For the full copyright and license information, please view the COPYING
* file that was distributed with this source code. You can also view the
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* @copyright (c) the authors
* @author Florian Lippert <flo@syscp.org> (2003-2009)
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Settings
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, you can also view it online at
* https://files.froxlor.org/misc/COPYING.txt
*
* @copyright the authors
* @author Froxlor team <team@froxlor.org>
* @license https://files.froxlor.org/misc/COPYING.txt GPLv2
*/
return array(
'groups' => array(
'system' => array(
'title' => $lng['admin']['systemsettings'],
'fields' => array(
'system_documentroot_prefix' => array(
'label' => $lng['serversettings']['documentroot_prefix'],
return [
'groups' => [
'system' => [
'title' => lng('admin.systemsettings'),
'icon' => 'fa-solid fa-gears',
'fields' => [
'system_documentroot_prefix' => [
'label' => lng('serversettings.documentroot_prefix'),
'settinggroup' => 'system',
'varname' => 'documentroot_prefix',
'type' => 'string',
'type' => 'text',
'string_type' => 'dir',
'default' => '/var/customers/webs/',
'save_method' => 'storeSettingField',
'plausibility_check_method' => 'checkPathConflicts'
),
'system_documentroot_use_default_value' => array(
'label' => $lng['serversettings']['documentroot_use_default_value'],
'plausibility_check_method' => [
'\\Froxlor\\Validate\\Check',
'checkPathConflicts'
],
'requires_reconf' => ['http']
],
'system_documentroot_use_default_value' => [
'label' => lng('serversettings.documentroot_use_default_value'),
'settinggroup' => 'system',
'varname' => 'documentroot_use_default_value',
'type' => 'bool',
'type' => 'checkbox',
'default' => false,
'save_method' => 'storeSettingField',
),
'system_ipaddress' => array(
'label' => $lng['serversettings']['ipaddress'],
'save_method' => 'storeSettingField'
],
'system_ipaddress' => [
'label' => lng('serversettings.ipaddress'),
'settinggroup' => 'system',
'varname' => 'ipaddress',
'type' => 'option',
'option_mode' => 'one',
'option_options_method' => 'getIpAddresses',
'type' => 'select',
'option_options_method' => [
'\\Froxlor\\Domain\\IpAddr',
'getIpAddresses'
],
'default' => '',
'save_method' => 'storeSettingIpAddress',
),
'system_defaultip' => array(
'label' => $lng['serversettings']['defaultip'],
'save_method' => 'storeSettingIpAddress'
],
'system_defaultip' => [
'label' => lng('serversettings.defaultip'),
'settinggroup' => 'system',
'varname' => 'defaultip',
'type' => 'option',
'option_mode' => 'one',
'option_options_method' => 'getIpPortCombinations',
'type' => 'select',
'select_mode' => 'multiple',
'option_options_method' => [
'\\Froxlor\\Domain\\IpAddr',
'getIpPortCombinations'
],
'default' => '',
'save_method' => 'storeSettingDefaultIp',
),
'system_hostname' => array(
'label' => $lng['serversettings']['hostname'],
'save_method' => 'storeSettingDefaultIp'
],
'system_defaultsslip' => [
'label' => lng('serversettings.defaultsslip'),
'settinggroup' => 'system',
'varname' => 'defaultsslip',
'type' => 'select',
'select_mode' => 'multiple',
'option_options_method' => [
'\\Froxlor\\Domain\\IpAddr',
'getSslIpPortCombinations'
],
'default' => '',
'save_method' => 'storeSettingDefaultSslIp'
],
'system_hostname' => [
'label' => lng('serversettings.hostname'),
'settinggroup' => 'system',
'varname' => 'hostname',
'type' => 'string',
'type' => 'text',
'default' => '',
'save_method' => 'storeSettingHostname',
'plausibility_check_method' => 'checkHostname',
),
'system_froxlordirectlyviahostname' => array(
'label' => $lng['serversettings']['froxlordirectlyviahostname'],
'settinggroup' => 'system',
'varname' => 'froxlordirectlyviahostname',
'type' => 'bool',
'plausibility_check_method' => [
'\\Froxlor\\Validate\\Check',
'checkHostname'
]
],
'api_enabled' => [
'label' => lng('serversettings.enable_api'),
'settinggroup' => 'api',
'varname' => 'enabled',
'type' => 'checkbox',
'default' => false,
'save_method' => 'storeSettingField'
],
'api_customer_default' => [
'label' => lng('serversettings.api_customer_default'),
'settinggroup' => 'api',
'varname' => 'customer_default',
'type' => 'select',
'default' => 1,
'select_var' => [
1 => lng('panel.yes'),
0 => lng('panel.no')
],
'save_method' => 'storeSettingField'
],
'system_update_channel' => [
'label' => lng('serversettings.update_channel'),
'settinggroup' => 'system',
'varname' => 'update_channel',
'type' => 'select',
'default' => 'stable',
'select_var' => [
'stable' => lng('serversettings.uc_stable'),
'testing' => lng('serversettings.uc_testing')
],
'save_method' => 'storeSettingField',
),
'system_validatedomain' => array(
'label' => $lng['serversettings']['validate_domain'],
'advanced_mode' => true
],
'system_validate_domain' => [
'label' => lng('serversettings.validate_domain'),
'settinggroup' => 'system',
'varname' => 'validate_domain',
'type' => 'bool',
'type' => 'checkbox',
'default' => true,
'save_method' => 'storeSettingField',
),
'system_stdsubdomain' => array(
'label' => $lng['serversettings']['stdsubdomainhost'],
'save_method' => 'storeSettingField'
],
'system_stdsubdomain' => [
'label' => lng('serversettings.stdsubdomainhost'),
'settinggroup' => 'system',
'varname' => 'stdsubdomain',
'type' => 'string',
'type' => 'text',
'default' => '',
'save_method' => 'storeSettingHostname',
),
'system_mysql_access_host' => array(
'label' => $lng['serversettings']['mysql_access_host'],
'save_method' => 'storeSettingHostname'
],
'system_mysql_access_host' => [
'label' => lng('serversettings.mysql_access_host'),
'settinggroup' => 'system',
'varname' => 'mysql_access_host',
'type' => 'string',
'type' => 'text',
'default' => '127.0.0.1,localhost',
'plausibility_check_method' => 'checkMysqlAccessHost',
'save_method' => 'storeSettingMysqlAccessHost',
),
'system_index_file_extension' => array(
'label' => $lng['serversettings']['index_file_extension'],
'plausibility_check_method' => [
'\\Froxlor\\Validate\\Check',
'checkMysqlAccessHost'
],
'save_method' => 'storeSettingMysqlAccessHost'
],
'system_nssextrausers' => [
'label' => lng('serversettings.nssextrausers'),
'settinggroup' => 'system',
'varname' => 'nssextrausers',
'type' => 'checkbox',
'default' => false,
'save_method' => 'storeSettingField'
],
'system_index_file_extension' => [
'label' => lng('serversettings.index_file_extension'),
'settinggroup' => 'system',
'varname' => 'index_file_extension',
'type' => 'string',
'type' => 'text',
'string_regexp' => '/^[a-zA-Z0-9]{1,6}$/',
'default' => 'html',
'save_method' => 'storeSettingField',
),
'system_store_index_file_subs' => array(
'label' => $lng['serversettings']['system_store_index_file_subs'],
'advanced_mode' => true
],
'system_store_index_file_subs' => [
'label' => lng('serversettings.system_store_index_file_subs'),
'settinggroup' => 'system',
'varname' => 'store_index_file_subs',
'type' => 'bool',
'type' => 'checkbox',
'default' => true,
'save_method' => 'storeSettingField',
),
'system_httpuser' => array(
'save_method' => 'storeSettingField'
],
'system_httpuser' => [
'settinggroup' => 'system',
'varname' => 'httpuser',
'type' => 'hidden',
'default' => 'www-data',
),
'system_httpgroup' => array(
'default' => 'www-data'
],
'system_httpgroup' => [
'settinggroup' => 'system',
'varname' => 'httpgroup',
'type' => 'hidden',
'default' => 'www-data',
),
'system_report_enable' => array(
'label' => $lng['serversettings']['report']['report'],
'default' => 'www-data'
],
'system_report_enable' => [
'label' => lng('serversettings.report.report'),
'settinggroup' => 'system',
'varname' => 'report_enable',
'type' => 'bool',
'type' => 'checkbox',
'default' => true,
'cronmodule' => 'froxlor/reports',
'save_method' => 'storeSettingField',
),
'system_report_webmax' => array(
'label' => $lng['serversettings']['report']['webmax'],
'save_method' => 'storeSettingField'
],
'system_report_webmax' => [
'label' => lng('serversettings.report.webmax'),
'settinggroup' => 'system',
'varname' => 'report_webmax',
'type' => 'int',
'int_min' => 1,
'int_max' => 150,
'type' => 'number',
'min' => 0,
'max' => 150,
'default' => 90,
'save_method' => 'storeSettingField',
),
'system_report_trafficmax' => array(
'label' => $lng['serversettings']['report']['trafficmax'],
'save_method' => 'storeSettingField'
],
'system_report_trafficmax' => [
'label' => lng('serversettings.report.trafficmax'),
'settinggroup' => 'system',
'varname' => 'report_trafficmax',
'type' => 'int',
'int_min' => 1,
'int_max' => 150,
'type' => 'number',
'min' => 0,
'max' => 150,
'default' => 90,
'save_method' => 'storeSettingField'
],
'system_mail_use_smtp' => [
'label' => lng('serversettings.mail_use_smtp'),
'settinggroup' => 'system',
'varname' => 'mail_use_smtp',
'type' => 'checkbox',
'default' => false,
'save_method' => 'storeSettingField'
],
'system_mail_smtp_host' => [
'label' => lng('serversettings.mail_smtp_host'),
'settinggroup' => 'system',
'varname' => 'mail_smtp_host',
'type' => 'text',
'default' => 'localhost',
'save_method' => 'storeSettingField'
],
'system_mail_smtp_port' => [
'label' => lng('serversettings.mail_smtp_port'),
'settinggroup' => 'system',
'varname' => 'mail_smtp_port',
'type' => 'number',
'min' => 1,
'max' => 65535,
'default' => 25,
'save_method' => 'storeSettingField'
],
'system_mail_smtp_usetls' => [
'label' => lng('serversettings.mail_smtp_usetls'),
'settinggroup' => 'system',
'varname' => 'mail_smtp_usetls',
'type' => 'checkbox',
'default' => true,
'save_method' => 'storeSettingField'
],
'system_mail_smtp_auth' => [
'label' => lng('serversettings.mail_smtp_auth'),
'settinggroup' => 'system',
'varname' => 'mail_smtp_auth',
'type' => 'checkbox',
'default' => true,
'save_method' => 'storeSettingField'
],
'system_mail_smtp_user' => [
'label' => lng('serversettings.mail_smtp_user'),
'settinggroup' => 'system',
'varname' => 'mail_smtp_user',
'type' => 'text',
'default' => '',
'save_method' => 'storeSettingField'
],
'system_mail_smtp_passwd' => [
'label' => lng('serversettings.mail_smtp_passwd'),
'settinggroup' => 'system',
'varname' => 'mail_smtp_passwd',
'type' => 'password',
'default' => '',
'save_method' => 'storeSettingField'
],
'system_apply_specialsettings_default' => [
'label' => lng('serversettings.apply_specialsettings_default'),
'settinggroup' => 'system',
'varname' => 'apply_specialsettings_default',
'type' => 'checkbox',
'default' => true,
'save_method' => 'storeSettingField',
),
),
),
),
);
'advanced_mode' => true
],
'system_apply_phpconfigs_default' => [
'label' => lng('serversettings.apply_phpconfigs_default'),
'settinggroup' => 'system',
'varname' => 'apply_phpconfigs_default',
'type' => 'checkbox',
'default' => true,
'save_method' => 'storeSettingField',
'advanced_mode' => true
],
'system_domaindefaultalias' => [
'label' => lng('admin.domaindefaultalias'),
'settinggroup' => 'system',
'varname' => 'domaindefaultalias',
'type' => 'select',
'default' => '0',
'select_var' => [
'0' => lng('domains.serveraliasoption_wildcard'),
'1' => lng('domains.serveraliasoption_www'),
'2' => lng('domains.serveraliasoption_none')
],
'save_method' => 'storeSettingField',
'advanced_mode' => true
],
'system_hide_incompatible_settings' => [
'label' => lng('serversettings.hide_incompatible_settings'),
'settinggroup' => 'system',
'varname' => 'hide_incompatible_settings',
'type' => 'checkbox',
'default' => true,
'save_method' => 'storeSettingField',
'advanced_mode' => true
],
]
]
]
];

View File

@@ -0,0 +1,297 @@
<?php
/**
* This file is part of the Froxlor project.
* Copyright (c) 2010 the Froxlor Team (see authors).
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, you can also view it online at
* https://files.froxlor.org/misc/COPYING.txt
*
* @copyright the authors
* @author Froxlor team <team@froxlor.org>
* @license https://files.froxlor.org/misc/COPYING.txt GPLv2
*/
use Froxlor\Settings;
return [
'groups' => [
'froxlorvhost' => [
'title' => lng('admin.froxlorvhost') . (call_user_func([
'\Froxlor\Settings\FroxlorVhostSettings',
'hasVhostContainerEnabled'
]) == false ? lng('admin.novhostcontainer') : ''),
'icon' => 'fa-solid fa-wrench',
'fields' => [
/**
* Webserver-Vhost
*/
'system_froxlordirectlyviahostname' => [
'label' => lng('serversettings.froxlordirectlyviahostname'),
'settinggroup' => 'system',
'varname' => 'froxlordirectlyviahostname',
'type' => 'checkbox',
'default' => true,
'save_method' => 'storeSettingField'
],
'system_froxloraliases' => [
'label' => lng('serversettings.froxloraliases'),
'settinggroup' => 'system',
'varname' => 'froxloraliases',
'type' => 'text',
'string_regexp' => '/^(([a-z0-9\-\._]+, ?)*[a-z0-9\-\._]+)?$/i',
'string_emptyallowed' => true,
'default' => '',
'save_method' => 'storeSettingClearCertificates',
'advanced_mode' => true
],
/**
* SSL / Let's Encrypt
*/
'system_le_froxlor_enabled' => [
'label' => lng('serversettings.le_froxlor_enabled'),
'settinggroup' => 'system',
'varname' => 'le_froxlor_enabled',
'type' => 'checkbox',
'default' => false,
'save_method' => 'storeSettingClearCertificates',
'visible' => Settings::Get('system.leenabled') && call_user_func([
'\Froxlor\Settings\FroxlorVhostSettings',
'hasVhostContainerEnabled'
], true),
'requires_reconf' => ['http']
],
'system_le_froxlor_redirect' => [
'label' => lng('serversettings.le_froxlor_redirect'),
'settinggroup' => 'system',
'varname' => 'le_froxlor_redirect',
'type' => 'checkbox',
'default' => false,
'save_method' => 'storeSettingField',
'visible' => Settings::Get('system.use_ssl') && call_user_func([
'\Froxlor\Settings\FroxlorVhostSettings',
'hasVhostContainerEnabled'
], true)
],
'system_hsts_maxage' => [
'label' => lng('admin.domain_hsts_maxage'),
'settinggroup' => 'system',
'varname' => 'hsts_maxage',
'type' => 'number',
'min' => 0,
'max' => 94608000, // 3-years
'default' => 10368000,
'save_method' => 'storeSettingField',
'visible' => Settings::Get('system.use_ssl') && call_user_func([
'\Froxlor\Settings\FroxlorVhostSettings',
'hasVhostContainerEnabled'
], true),
'advanced_mode' => true
],
'system_hsts_incsub' => [
'label' => lng('admin.domain_hsts_incsub'),
'settinggroup' => 'system',
'varname' => 'hsts_incsub',
'type' => 'checkbox',
'default' => false,
'save_method' => 'storeSettingField',
'visible' => Settings::Get('system.use_ssl') && call_user_func([
'\Froxlor\Settings\FroxlorVhostSettings',
'hasVhostContainerEnabled'
], true),
'advanced_mode' => true
],
'system_hsts_preload' => [
'label' => lng('admin.domain_hsts_preload'),
'settinggroup' => 'system',
'varname' => 'hsts_preload',
'type' => 'checkbox',
'default' => false,
'save_method' => 'storeSettingField',
'visible' => Settings::Get('system.use_ssl') && call_user_func([
'\Froxlor\Settings\FroxlorVhostSettings',
'hasVhostContainerEnabled'
], true),
'advanced_mode' => true
],
'system_honorcipherorder' => [
'label' => lng('admin.domain_honorcipherorder'),
'settinggroup' => 'system',
'varname' => 'honorcipherorder',
'type' => 'checkbox',
'default' => false,
'save_method' => 'storeSettingField',
'visible' => Settings::Get('system.use_ssl') && call_user_func([
'\Froxlor\Settings\FroxlorVhostSettings',
'hasVhostContainerEnabled'
], true),
'advanced_mode' => true
],
'system_sessiontickets' => [
'label' => lng('admin.domain_sessiontickets'),
'settinggroup' => 'system',
'varname' => 'sessiontickets',
'type' => 'checkbox',
'default' => true,
'save_method' => 'storeSettingField',
'visible' => Settings::Get('system.use_ssl') && call_user_func([
'\Froxlor\Settings\FroxlorVhostSettings',
'hasVhostContainerEnabled'
], true),
'advanced_mode' => true
],
/**
* FCGID
*/
'system_mod_fcgid_ownvhost' => [
'label' => lng('serversettings.mod_fcgid_ownvhost'),
'settinggroup' => 'system',
'varname' => 'mod_fcgid_ownvhost',
'type' => 'checkbox',
'default' => true,
'save_method' => 'storeSettingField',
'websrv_avail' => [
'apache2'
],
'visible' => Settings::Get('system.mod_fcgid') && call_user_func([
'\Froxlor\Settings\FroxlorVhostSettings',
'hasVhostContainerEnabled'
]),
'requires_reconf' => ['system:fcgid']
],
'system_mod_fcgid_httpuser' => [
'label' => lng('admin.mod_fcgid_user'),
'settinggroup' => 'system',
'varname' => 'mod_fcgid_httpuser',
'type' => 'text',
'default' => 'froxlorlocal',
'save_method' => 'storeSettingWebserverFcgidFpmUser',
'websrv_avail' => [
'apache2'
],
'visible' => Settings::Get('system.mod_fcgid') && call_user_func([
'\Froxlor\Settings\FroxlorVhostSettings',
'hasVhostContainerEnabled'
]),
'requires_reconf' => ['system:fcgid']
],
'system_mod_fcgid_httpgroup' => [
'label' => lng('admin.mod_fcgid_group'),
'settinggroup' => 'system',
'varname' => 'mod_fcgid_httpgroup',
'type' => 'text',
'default' => 'froxlorlocal',
'save_method' => 'storeSettingField',
'websrv_avail' => [
'apache2'
],
'visible' => Settings::Get('system.mod_fcgid') && call_user_func([
'\Froxlor\Settings\FroxlorVhostSettings',
'hasVhostContainerEnabled'
]),
'requires_reconf' => ['system:fcgid']
],
'system_mod_fcgid_defaultini_ownvhost' => [
'label' => lng('serversettings.mod_fcgid.defaultini_ownvhost'),
'settinggroup' => 'system',
'varname' => 'mod_fcgid_defaultini_ownvhost',
'type' => 'select',
'default' => '2',
'option_options_method' => [
'\\Froxlor\\Http\\PhpConfig',
'getPhpConfigs'
],
'save_method' => 'storeSettingField',
'websrv_avail' => [
'apache2'
],
'visible' => Settings::Get('system.mod_fcgid') && call_user_func([
'\Froxlor\Settings\FroxlorVhostSettings',
'hasVhostContainerEnabled'
])
],
/**
* php-fpm
*/
'phpfpm_enabled_ownvhost' => [
'label' => lng('phpfpm.ownvhost'),
'settinggroup' => 'phpfpm',
'varname' => 'enabled_ownvhost',
'type' => 'checkbox',
'default' => true,
'save_method' => 'storeSettingField',
'visible' => Settings::Get('phpfpm.enabled') && call_user_func([
'\Froxlor\Settings\FroxlorVhostSettings',
'hasVhostContainerEnabled'
]),
'requires_reconf' => ['system:php-fpm']
],
'phpfpm_vhost_httpuser' => [
'label' => lng('phpfpm.vhost_httpuser'),
'settinggroup' => 'phpfpm',
'varname' => 'vhost_httpuser',
'type' => 'text',
'default' => 'froxlorlocal',
'save_method' => 'storeSettingWebserverFcgidFpmUser',
'visible' => Settings::Get('phpfpm.enabled') && call_user_func([
'\Froxlor\Settings\FroxlorVhostSettings',
'hasVhostContainerEnabled'
]),
'requires_reconf' => ['system:php-fpm']
],
'phpfpm_vhost_httpgroup' => [
'label' => lng('phpfpm.vhost_httpgroup'),
'settinggroup' => 'phpfpm',
'varname' => 'vhost_httpgroup',
'type' => 'text',
'default' => 'froxlorlocal',
'save_method' => 'storeSettingField',
'visible' => Settings::Get('phpfpm.enabled') && call_user_func([
'\Froxlor\Settings\FroxlorVhostSettings',
'hasVhostContainerEnabled'
]),
'requires_reconf' => ['system:php-fpm']
],
'phpfpm_vhost_defaultini' => [
'label' => lng('serversettings.mod_fcgid.defaultini_ownvhost'),
'settinggroup' => 'phpfpm',
'varname' => 'vhost_defaultini',
'type' => 'select',
'default' => '2',
'option_options_method' => [
'\\Froxlor\\Http\\PhpConfig',
'getPhpConfigs'
],
'save_method' => 'storeSettingField',
'visible' => Settings::Get('phpfpm.enabled') && call_user_func([
'\Froxlor\Settings\FroxlorVhostSettings',
'hasVhostContainerEnabled'
])
],
/**
* DNS
*/
'system_dns_createhostnameentry' => [
'label' => lng('serversettings.dns_createhostnameentry'),
'settinggroup' => 'system',
'varname' => 'dns_createhostnameentry',
'type' => 'checkbox',
'default' => false,
'save_method' => 'storeSettingField',
'visible' => Settings::Get('system.bind_enable')
]
]
]
]
];

View File

@@ -2,50 +2,70 @@
/**
* This file is part of the Froxlor project.
* Copyright (c) 2014 the Froxlor Team (see authors).
* Copyright (c) 2010 the Froxlor Team (see authors).
*
* For the full copyright and license information, please view the COPYING
* file that was distributed with this source code. You can also view the
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* @copyright (c) the authors
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Settings
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, you can also view it online at
* https://files.froxlor.org/misc/COPYING.txt
*
* @copyright the authors
* @author Froxlor team <team@froxlor.org>
* @license https://files.froxlor.org/misc/COPYING.txt GPLv2
*/
return array(
'groups' => array(
'crond' => array(
'title' => $lng['admin']['cronsettings'],
'fields' => array(
'system_cronconfig' => array(
'label' => $lng['serversettings']['system_cronconfig'],
return [
'groups' => [
'crond' => [
'title' => lng('admin.cronsettings'),
'icon' => 'fa-solid fa-clock-rotate-left',
'advanced_mode' => true,
'fields' => [
'system_cronconfig' => [
'label' => lng('serversettings.system_cronconfig'),
'settinggroup' => 'system',
'varname' => 'cronconfig',
'type' => 'string',
'type' => 'text',
'string_type' => 'file',
'default' => '/etc/cron.d/froxlor',
'save_method' => 'storeSettingField',
),
'system_crondreload' => array(
'label' => $lng['serversettings']['system_crondreload'],
'save_method' => 'storeSettingField'
],
'system_croncmdline' => [
'label' => lng('serversettings.system_croncmdline'),
'settinggroup' => 'system',
'varname' => 'croncmdline',
'type' => 'text',
'string_regexp' => '/^[a-z0-9\/\._\- ]+$/i',
'default' => '/usr/bin/nice -n 5 /usr/bin/php -q',
'save_method' => 'storeSettingField'
],
'system_crondreload' => [
'label' => lng('serversettings.system_crondreload'),
'settinggroup' => 'system',
'varname' => 'crondreload',
'type' => 'string',
'type' => 'text',
'string_regexp' => '/^[a-z0-9\/\._\- ]+$/i',
'default' => '/etc/init.d/cron reload',
'save_method' => 'storeSettingField',
),
'system_debug_cron' => array(
'label' => $lng['serversettings']['cron']['debug'],
'save_method' => 'storeSettingField'
],
'system_cron_allowautoupdate' => [
'label' => lng('serversettings.system_cron_allowautoupdate'),
'settinggroup' => 'system',
'varname' => 'debug_cron',
'type' => 'bool',
'varname' => 'cron_allowautoupdate',
'type' => 'checkbox',
'default' => false,
'save_method' => 'storeSettingField',
)
)
)
)
);
'save_method' => 'storeSettingField'
]
]
]
]
];

View File

@@ -2,235 +2,423 @@
/**
* This file is part of the Froxlor project.
* Copyright (c) 2003-2009 the SysCP Team (see authors).
* Copyright (c) 2010 the Froxlor Team (see authors).
*
* For the full copyright and license information, please view the COPYING
* file that was distributed with this source code. You can also view the
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* @copyright (c) the authors
* @author Florian Lippert <flo@syscp.org> (2003-2009)
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Settings
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, you can also view it online at
* https://files.froxlor.org/misc/COPYING.txt
*
* @copyright the authors
* @author Froxlor team <team@froxlor.org>
* @license https://files.froxlor.org/misc/COPYING.txt GPLv2
*/
return array(
'groups' => array(
'webserver' => array(
'title' => $lng['admin']['webserversettings'],
'fields' => array(
'system_webserver' => array(
'label' => $lng['admin']['webserver'],
use Froxlor\Settings;
return [
'groups' => [
'webserver' => [
'title' => lng('admin.webserversettings'),
'icon' => 'fa-solid fa-server',
'fields' => [
'system_webserver' => [
'label' => lng('admin.webserver'),
'settinggroup' => 'system',
'varname' => 'webserver',
'type' => 'option',
'type' => 'select',
'default' => 'apache2',
'option_mode' => 'one',
'option_options' => array('apache2' => 'Apache 2', 'lighttpd' => 'ligHTTPd', 'nginx' => 'Nginx'),
'select_var' => [
'apache2' => 'Apache 2',
'lighttpd' => 'ligHTTPd',
'nginx' => 'Nginx'
],
'save_method' => 'storeSettingField',
'plausibility_check_method' => 'checkPhpInterfaceSetting',
'overview_option' => true
),
'system_apache_24' => array(
'label' => $lng['serversettings']['apache_24'],
'plausibility_check_method' => [
'\\Froxlor\\Validate\\Check',
'checkPhpInterfaceSetting'
],
'requires_reconf' => ['http']
],
'system_apache_24' => [
'label' => lng('serversettings.apache_24'),
'settinggroup' => 'system',
'varname' => 'apache24',
'type' => 'bool',
'type' => 'checkbox',
'default' => false,
'save_method' => 'storeSettingField',
'websrv_avail' => array('apache2')
),
'system_httpuser' => array(
'label' => $lng['admin']['webserver_user'],
'websrv_avail' => [
'apache2'
]
],
'system_apacheitksupport' => [
'label' => lng('serversettings.apache_itksupport'),
'settinggroup' => 'system',
'varname' => 'apacheitksupport',
'type' => 'checkbox',
'default' => false,
'save_method' => 'storeSettingField',
'visible' => (Settings::Get('system.mod_fcgid') == 0 && Settings::Get('phpfpm.enabled') == 0),
'websrv_avail' => [
'apache2'
],
'advanced_mode' => true
],
'system_http2_support' => [
'label' => lng('serversettings.http2_support'),
'settinggroup' => 'system',
'varname' => 'http2_support',
'type' => 'checkbox',
'default' => false,
'save_method' => 'storeSettingField',
'websrv_avail' => [
'apache2',
'nginx'
],
'visible' => Settings::Get('system.use_ssl')
],
'system_dhparams_file' => [
'label' => lng('serversettings.dhparams_file'),
'settinggroup' => 'system',
'varname' => 'dhparams_file',
'type' => 'text',
'string_type' => 'file',
'string_emptyallowed' => true,
'default' => '',
'save_method' => 'storeSettingField',
'visible' => Settings::Get('system.use_ssl'),
'advanced_mode' => true
],
'system_httpuser' => [
'label' => lng('admin.webserver_user'),
'settinggroup' => 'system',
'varname' => 'httpuser',
'type' => 'string',
'type' => 'text',
'default' => 'www-data',
'save_method' => 'storeSettingField',
),
'system_httpgroup' => array(
'label' => $lng['admin']['webserver_group'],
'save_method' => 'storeSettingWebserverFcgidFpmUser'
],
'system_httpgroup' => [
'label' => lng('admin.webserver_group'),
'settinggroup' => 'system',
'varname' => 'httpgroup',
'type' => 'string',
'type' => 'text',
'default' => 'www-data',
'save_method' => 'storeSettingField',
),
'system_apacheconf_vhost' => array(
'label' => $lng['serversettings']['apacheconf_vhost'],
'save_method' => 'storeSettingField'
],
'system_apacheconf_vhost' => [
'label' => lng('serversettings.apacheconf_vhost'),
'settinggroup' => 'system',
'varname' => 'apacheconf_vhost',
'type' => 'string',
'type' => 'text',
'string_type' => 'filedir',
'default' => '/etc/apache2/sites-enabled/',
'save_method' => 'storeSettingField',
),
'system_apacheconf_diroptions' => array(
'label' => $lng['serversettings']['apacheconf_diroptions'],
'requires_reconf' => ['http']
],
'system_apacheconf_diroptions' => [
'label' => lng('serversettings.apacheconf_diroptions'),
'settinggroup' => 'system',
'varname' => 'apacheconf_diroptions',
'type' => 'string',
'type' => 'text',
'string_type' => 'filedir',
'default' => '/etc/apache2/sites-enabled/',
'save_method' => 'storeSettingField',
),
'system_apacheconf_htpasswddir' => array(
'label' => $lng['serversettings']['apacheconf_htpasswddir'],
'requires_reconf' => ['http']
],
'system_apacheconf_htpasswddir' => [
'label' => lng('serversettings.apacheconf_htpasswddir'),
'settinggroup' => 'system',
'varname' => 'apacheconf_htpasswddir',
'type' => 'string',
'type' => 'text',
'string_type' => 'confdir',
'default' => '/etc/apache2/htpasswd/',
'save_method' => 'storeSettingField',
),
'system_logfiles_directory' => array(
'label' => $lng['serversettings']['logfiles_directory'],
'save_method' => 'storeSettingField'
],
'system_logfiles_directory' => [
'label' => lng('serversettings.logfiles_directory'),
'settinggroup' => 'system',
'varname' => 'logfiles_directory',
'type' => 'string',
'type' => 'text',
'string_type' => 'dir',
'default' => '/var/customers/logs/',
'save_method' => 'storeSettingField',
),
'system_customersslpath' => array(
'label' => $lng['serversettings']['customerssl_directory'],
'requires_reconf' => ['http']
],
'system_logfiles_script' => [
'label' => lng('serversettings.logfiles_script'),
'settinggroup' => 'system',
'varname' => 'logfiles_script',
'type' => 'text',
'default' => '',
'save_method' => 'storeSettingField',
'websrv_avail' => [
'apache2'
],
'advanced_mode' => true
],
'system_logfiles_piped' => [
'label' => lng('serversettings.logfiles_piped'),
'settinggroup' => 'system',
'varname' => 'logfiles_piped',
'type' => 'checkbox',
'default' => false,
'save_method' => 'storeSettingField',
'websrv_avail' => [
'apache2'
],
'advanced_mode' => true
],
'system_logfiles_format' => [
'label' => lng('serversettings.logfiles_format'),
'settinggroup' => 'system',
'varname' => 'logfiles_format',
'type' => 'text',
'default' => '',
'string_emptyallowed' => true,
'save_method' => 'storeSettingField',
'websrv_avail' => [
'apache2',
'nginx'
],
'visible' => Settings::Get('system.traffictool') != 'webalizer',
'advanced_mode' => true
],
'system_logfiles_type' => [
'label' => lng('serversettings.logfiles_type'),
'settinggroup' => 'system',
'varname' => 'logfiles_type',
'type' => 'select',
'default' => '1',
'select_var' => [
'1' => 'combined',
'2' => 'vhost_combined'
],
'save_method' => 'storeSettingField',
'websrv_avail' => [
'apache2'
]
],
'system_errorlog_level' => [
'label' => lng('serversettings.errorlog_level'),
'settinggroup' => 'system',
'varname' => 'errorlog_level',
'type' => 'select',
'default' => (Settings::Get('system.webserver') == 'nginx' ? 'error' : 'warn'),
'select_var' => [
'emerg' => 'emerg',
'alert' => 'alert',
'crit' => 'crit',
'error' => 'error',
'warn' => 'warn',
'notice' => 'notice',
'info' => 'info',
'debug' => 'debug'
],
'save_method' => 'storeSettingField',
'websrv_avail' => [
'apache2',
'nginx'
]
],
'system_customer_ssl_path' => [
'label' => lng('serversettings.customerssl_directory'),
'settinggroup' => 'system',
'varname' => 'customer_ssl_path',
'type' => 'string',
'type' => 'text',
'string_type' => 'confdir',
'default' => '/etc/ssl/froxlor-custom/',
'save_method' => 'storeSettingField',
),
'system_phpappendopenbasedir' => array(
'label' => $lng['serversettings']['phpappendopenbasedir'],
'save_method' => 'storeSettingField'
],
'system_phpappendopenbasedir' => [
'label' => lng('serversettings.phpappendopenbasedir'),
'settinggroup' => 'system',
'varname' => 'phpappendopenbasedir',
'type' => 'string',
'type' => 'text',
'string_emptyallowed' => true,
'default' => '',
'save_method' => 'storeSettingField',
),
'system_deactivateddocroot' => array(
'label' => $lng['serversettings']['deactivateddocroot'],
'advanced_mode' => true
],
'system_deactivateddocroot' => [
'label' => lng('serversettings.deactivateddocroot'),
'settinggroup' => 'system',
'varname' => 'deactivateddocroot',
'type' => 'string',
'type' => 'text',
'string_type' => 'dir',
'string_emptyallowed' => true,
'default' => '',
'save_method' => 'storeSettingField',
),
'system_default_vhostconf' => array(
'label' => $lng['serversettings']['default_vhostconf'],
'requires_reconf' => ['http']
],
'system_default_vhostconf' => [
'label' => lng('serversettings.default_vhostconf'),
'settinggroup' => 'system',
'varname' => 'default_vhostconf',
'type' => 'text',
'type' => 'textarea',
'default' => '',
'save_method' => 'storeSettingField',
),
'system_apachereload_command' => array(
'label' => $lng['serversettings']['apachereload_command'],
'advanced_mode' => true
],
'system_default_sslvhostconf' => [
'label' => lng('serversettings.default_sslvhostconf'),
'settinggroup' => 'system',
'varname' => 'default_sslvhostconf',
'type' => 'textarea',
'default' => '',
'save_method' => 'storeSettingField',
'visible' => Settings::Get('system.use_ssl') == 1,
'advanced_mode' => true
],
'system_include_default_vhostconf' => [
'label' => lng('serversettings.includedefault_sslvhostconf'),
'settinggroup' => 'system',
'varname' => 'include_default_vhostconf',
'type' => 'checkbox',
'default' => false,
'save_method' => 'storeSettingField',
'advanced_mode' => true
],
'system_apacheglobaldiropt' => [
'label' => lng('serversettings.apache_globaldiropt'),
'settinggroup' => 'system',
'varname' => 'apacheglobaldiropt',
'type' => 'textarea',
'default' => '',
'save_method' => 'storeSettingField',
'visible' => (Settings::Get('system.mod_fcgid') == 0 && Settings::Get('phpfpm.enabled') == 0),
'websrv_avail' => [
'apache2'
],
'advanced_mode' => true
],
'system_apachereload_command' => [
'label' => lng('serversettings.apachereload_command'),
'settinggroup' => 'system',
'varname' => 'apachereload_command',
'type' => 'string',
'type' => 'text',
'string_regexp' => '/^[a-z0-9\/\._\- ]+$/i',
'default' => '/etc/init.d/apache2 reload',
'save_method' => 'storeSettingField',
),
'system_phpreload_command' => array(
'label' => $lng['serversettings']['phpreload_command'],
'save_method' => 'storeSettingField'
],
'system_phpreload_command' => [
'label' => lng('serversettings.phpreload_command'),
'settinggroup' => 'system',
'varname' => 'phpreload_command',
'type' => 'string',
'type' => 'text',
'string_regexp' => '/^[a-z0-9\/\._\- ]+$/i',
'default' => '',
'save_method' => 'storeSettingField',
'websrv_avail' => array('nginx')
),
'system_nginx_php_backend' => array(
'label' => $lng['serversettings']['nginx_php_backend'],
'websrv_avail' => [
'nginx'
]
],
'system_nginx_php_backend' => [
'label' => lng('serversettings.nginx_php_backend'),
'settinggroup' => 'system',
'varname' => 'nginx_php_backend',
'type' => 'string',
'type' => 'text',
'default' => '127.0.0.1:8888',
'save_method' => 'storeSettingField',
'websrv_avail' => array('nginx')
),
'nginx_fastcgiparams' => array(
'label' => $lng['serversettings']['nginx_fastcgiparams'],
'websrv_avail' => [
'nginx'
]
],
'nginx_fastcgiparams' => [
'label' => lng('serversettings.nginx_fastcgiparams'),
'settinggroup' => 'nginx',
'varname' => 'fastcgiparams',
'type' => 'string',
'type' => 'text',
'string_type' => 'file',
'default' => '/etc/nginx/fastcgi_params',
'save_method' => 'storeSettingField',
'websrv_avail' => array('nginx')
),
'defaultwebsrverrhandler_enabled' => array(
'label' => $lng['serversettings']['defaultwebsrverrhandler_enabled'],
'websrv_avail' => [
'nginx'
]
],
'defaultwebsrverrhandler_enabled' => [
'label' => lng('serversettings.defaultwebsrverrhandler_enabled'),
'settinggroup' => 'defaultwebsrverrhandler',
'varname' => 'enabled',
'type' => 'bool',
'type' => 'checkbox',
'default' => false,
'save_method' => 'storeSettingField',
),
'defaultwebsrverrhandler_err401' => array(
'label' => $lng['serversettings']['defaultwebsrverrhandler_err401'],
'advanced_mode' => true
],
'defaultwebsrverrhandler_err401' => [
'label' => lng('serversettings.defaultwebsrverrhandler_err401'),
'settinggroup' => 'defaultwebsrverrhandler',
'varname' => 'err401',
'type' => 'string',
'type' => 'text',
'default' => '',
'save_method' => 'storeSettingField',
'websrv_avail' => array('apache2', 'nginx')
),
'defaultwebsrverrhandler_err403' => array(
'label' => $lng['serversettings']['defaultwebsrverrhandler_err403'],
'websrv_avail' => [
'apache2',
'nginx'
],
'advanced_mode' => true
],
'defaultwebsrverrhandler_err403' => [
'label' => lng('serversettings.defaultwebsrverrhandler_err403'),
'settinggroup' => 'defaultwebsrverrhandler',
'varname' => 'err403',
'type' => 'string',
'type' => 'text',
'default' => '',
'save_method' => 'storeSettingField',
'websrv_avail' => array('apache2', 'nginx')
),
'defaultwebsrverrhandler_err404' => array(
'label' => $lng['serversettings']['defaultwebsrverrhandler_err404'],
'websrv_avail' => [
'apache2',
'nginx'
],
'advanced_mode' => true
],
'defaultwebsrverrhandler_err404' => [
'label' => lng('serversettings.defaultwebsrverrhandler_err404'),
'settinggroup' => 'defaultwebsrverrhandler',
'varname' => 'err404',
'type' => 'string',
'type' => 'text',
'default' => '',
'save_method' => 'storeSettingField',
),
'defaultwebsrverrhandler_err500' => array(
'label' => $lng['serversettings']['defaultwebsrverrhandler_err500'],
'advanced_mode' => true
],
'defaultwebsrverrhandler_err500' => [
'label' => lng('serversettings.defaultwebsrverrhandler_err500'),
'settinggroup' => 'defaultwebsrverrhandler',
'varname' => 'err500',
'type' => 'string',
'type' => 'text',
'default' => '',
'save_method' => 'storeSettingField',
'websrv_avail' => array('apache2', 'nginx')
),
'customredirect_enabled' => array(
'label' => $lng['serversettings']['customredirect_enabled'],
'websrv_avail' => [
'apache2',
'nginx'
],
'advanced_mode' => true
],
'customredirect_enabled' => [
'label' => lng('serversettings.customredirect_enabled'),
'settinggroup' => 'customredirect',
'varname' => 'enabled',
'type' => 'bool',
'type' => 'checkbox',
'default' => false,
'save_method' => 'storeSettingField',
'websrv_avail' => array('apache2', 'lighttpd')
),
'customredirect_default' => array(
'label' => $lng['serversettings']['customredirect_default'],
'save_method' => 'storeSettingField'
],
'customredirect_default' => [
'label' => lng('serversettings.customredirect_default'),
'settinggroup' => 'customredirect',
'varname' => 'default',
'type' => 'option',
'type' => 'select',
'default' => '1',
'option_mode' => 'one',
'option_options_method' => 'getRedirectCodes',
'save_method' => 'storeSettingField',
'websrv_avail' => array('apache2', 'lighttpd')
)
)
)
)
);
'option_options_method' => ['\\Froxlor\\Domain\\Domain', 'getRedirectCodes'],
'save_method' => 'storeSettingField'
]
]
]
]
];

View File

@@ -2,85 +2,257 @@
/**
* This file is part of the Froxlor project.
* Copyright (c) 2003-2009 the SysCP Team (see authors).
* Copyright (c) 2010 the Froxlor Team (see authors).
*
* For the full copyright and license information, please view the COPYING
* file that was distributed with this source code. You can also view the
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* @copyright (c) the authors
* @author Florian Lippert <flo@syscp.org> (2003-2009)
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Settings
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, you can also view it online at
* https://files.froxlor.org/misc/COPYING.txt
*
* @copyright the authors
* @author Froxlor team <team@froxlor.org>
* @license https://files.froxlor.org/misc/COPYING.txt GPLv2
*/
return array(
'groups' => array(
'ssl' => array(
'title' => $lng['admin']['sslsettings'],
'fields' => array(
'system_ssl_enabled' => array(
'label' => $lng['serversettings']['ssl']['use_ssl'],
use Froxlor\Froxlor;
use Froxlor\Settings;
return [
'groups' => [
'ssl' => [
'title' => lng('admin.sslsettings'),
'icon' => 'fa-solid fa-shield',
'fields' => [
'system_use_ssl' => [
'label' => lng('serversettings.ssl.use_ssl'),
'settinggroup' => 'system',
'varname' => 'use_ssl',
'type' => 'bool',
'type' => 'checkbox',
'default' => false,
'save_method' => 'storeSettingField',
'overview_option' => true
),
'system_ssl_cipher_list' => array(
'label' => $lng['serversettings']['ssl']['ssl_cipher_list'],
'overview_option' => true,
'requires_reconf' => ['http']
],
'system_ssl_protocols' => [
'label' => lng('serversettings.ssl.ssl_protocols'),
'settinggroup' => 'system',
'varname' => 'ssl_protocols',
'type' => 'select',
'default' => 'TLSv1.2',
'select_mode' => 'multiple',
'select_var' => [
'TLSv1' => 'TLSv1',
'TLSv1.1' => 'TLSv1.1',
'TLSv1.2' => 'TLSv1.2',
'TLSv1.3' => 'TLSv1.3'
],
'save_method' => 'storeSettingField'
],
'system_ssl_cipher_list' => [
'label' => lng('serversettings.ssl.ssl_cipher_list'),
'settinggroup' => 'system',
'varname' => 'ssl_cipher_list',
'type' => 'string',
'type' => 'text',
'string_emptyallowed' => false,
'default' => 'ECDHE-RSA-AES128-SHA256:AES128-GCM-SHA256:RC4:HIGH:!MD5:!aNULL:!EDH',
'default' => 'ECDH+AESGCM:ECDH+AES256:!aNULL:!MD5:!DSS:!DH:!AES128',
'save_method' => 'storeSettingField',
),
'system_ssl_cert_file' => array(
'label' => $lng['serversettings']['ssl']['ssl_cert_file'],
'advanced_mode' => true
],
'system_tlsv13_cipher_list' => [
'label' => lng('serversettings.ssl.tlsv13_cipher_list'),
'settinggroup' => 'system',
'varname' => 'tlsv13_cipher_list',
'type' => 'text',
'string_emptyallowed' => true,
'default' => '',
'visible' => Settings::Get('system.webserver') == "apache2" && Settings::Get('system.apache24') == 1,
'save_method' => 'storeSettingField',
'advanced_mode' => true
],
'system_ssl_cert_file' => [
'label' => lng('serversettings.ssl.ssl_cert_file'),
'settinggroup' => 'system',
'varname' => 'ssl_cert_file',
'type' => 'string',
'type' => 'text',
'string_type' => 'file',
'string_emptyallowed' => true,
'default' => '/etc/apache2/apache2.pem',
'save_method' => 'storeSettingField',
),
'system_ssl_key_file' => array(
'label' => $lng['serversettings']['ssl']['ssl_key_file'],
'default' => '/etc/ssl/froxlor_selfsigned.pem',
'save_method' => 'storeSettingField'
],
'system_ssl_key_file' => [
'label' => lng('serversettings.ssl.ssl_key_file'),
'settinggroup' => 'system',
'varname' => 'ssl_key_file',
'type' => 'string',
'type' => 'text',
'string_type' => 'file',
'string_emptyallowed' => true,
'default' => '/etc/apache2/apache2.key',
'save_method' => 'storeSettingField',
),
'system_ssl_cert_chainfile' => array(
'label' => $lng['admin']['ipsandports']['ssl_cert_chainfile'],
'default' => '/etc/ssl/froxlor_selfsigned.key',
'save_method' => 'storeSettingField'
],
'system_ssl_cert_chainfile' => [
'label' => lng('admin.ipsandports.ssl_cert_chainfile'),
'settinggroup' => 'system',
'varname' => 'ssl_cert_chainfile',
'type' => 'string',
'type' => 'text',
'string_type' => 'file',
'string_emptyallowed' => true,
'default' => '',
'save_method' => 'storeSettingField',
),
'system_ssl_ca_file' => array(
'label' => $lng['serversettings']['ssl']['ssl_ca_file'],
'save_method' => 'storeSettingField'
],
'system_ssl_ca_file' => [
'label' => lng('serversettings.ssl.ssl_ca_file'),
'settinggroup' => 'system',
'varname' => 'ssl_ca_file',
'type' => 'string',
'type' => 'text',
'string_type' => 'file',
'string_emptyallowed' => true,
'default' => '',
'save_method' => 'storeSettingField'
],
'system_apache24_ocsp_cache_path' => [
'label' => lng('serversettings.ssl.apache24_ocsp_cache_path'),
'settinggroup' => 'system',
'varname' => 'apache24_ocsp_cache_path',
'type' => 'text',
'string_emptyallowed' => false,
'default' => 'shmcb:/var/run/apache2/ocsp-stapling.cache(131072)',
'visible' => Settings::Get('system.webserver') == "apache2" && Settings::Get('system.apache24') == 1,
'save_method' => 'storeSettingField',
)
)
)
)
);
'advanced_mode' => true
],
'system_sessionticketsenabled' => [
'label' => lng('admin.domain_sessionticketsenabled'),
'settinggroup' => 'system',
'varname' => 'sessionticketsenabled',
'type' => 'checkbox',
'default' => true,
'save_method' => 'storeSettingField',
'visible' => Settings::Get('system.use_ssl') && (Settings::Get('system.webserver') == "nginx" || (Settings::Get('system.webserver') == "apache2" && Settings::Get('system.apache24') == 1)),
'advanced_mode' => true
],
'system_leenabled' => [
'label' => lng('serversettings.leenabled'),
'settinggroup' => 'system',
'varname' => 'leenabled',
'type' => 'checkbox',
'default' => false,
'cronmodule' => 'froxlor/letsencrypt',
'save_method' => 'storeSettingField',
'requires_reconf' => ['http']
],
'system_acmeshpath' => [
'label' => lng('serversettings.acmeshpath'),
'settinggroup' => 'system',
'varname' => 'acmeshpath',
'type' => 'text',
'string_type' => 'file',
'default' => '/root/.acme.sh/acme.sh',
'save_method' => 'storeSettingField',
'advanced_mode' => true
],
'system_letsencryptacmeconf' => [
'label' => lng('serversettings.letsencryptacmeconf'),
'settinggroup' => 'system',
'varname' => 'letsencryptacmeconf',
'type' => 'text',
'string_type' => 'file',
'default' => '/etc/apache2/conf-enabled/acme.conf',
'save_method' => 'storeSettingField',
'requires_reconf' => ['http']
],
'system_letsencryptca' => [
'label' => lng('serversettings.letsencryptca'),
'settinggroup' => 'system',
'varname' => 'letsencryptca',
'type' => 'select',
'default' => 'letsencrypt',
'select_var' => [
'letsencrypt_test' => 'Let\'s Encrypt (Test / Staging)',
'letsencrypt' => 'Let\'s Encrypt (Live)',
'buypass_test' => 'Buypass (Test / Staging)',
'buypass' => 'Buypass (Live)',
'zerossl' => 'ZeroSSL (Live)',
'google' => 'Google (Live)',
'google_test' => 'Google (Test / Staging)',
],
'save_method' => 'storeSettingField'
],
'system_letsencryptchallengepath' => [
'label' => lng('serversettings.letsencryptchallengepath'),
'settinggroup' => 'system',
'varname' => 'letsencryptchallengepath',
'type' => 'text',
'string_emptyallowed' => false,
'default' => Froxlor::getInstallDir(),
'save_method' => 'storeSettingField',
'advanced_mode' => true,
'requires_reconf' => ['http']
],
'system_letsencryptkeysize' => [
'label' => lng('serversettings.letsencryptkeysize'),
'settinggroup' => 'system',
'varname' => 'letsencryptkeysize',
'type' => 'select',
'default' => '2048',
'select_var' => [
'2048' => '2048',
'3072' => '3072',
'4096' => '4096',
'8192' => '8192'
],
'save_method' => 'storeSettingField'
],
'system_leecc' => [
'label' => lng('serversettings.letsencryptecc'),
'settinggroup' => 'system',
'varname' => 'leecc',
'type' => 'select',
'default' => '0',
'select_var' => [
'0' => '-',
'256' => 'ec-256',
'384' => 'ec-384'
],
'save_method' => 'storeSettingField',
'advanced_mode' => true
],
'system_letsencryptreuseold' => [
'label' => lng('serversettings.letsencryptreuseold'),
'settinggroup' => 'system',
'varname' => 'letsencryptreuseold',
'type' => 'checkbox',
'default' => true,
'save_method' => 'storeSettingField',
'advanced_mode' => true
],
'system_le_domain_dnscheck' => [
'label' => lng('serversettings.le_domain_dnscheck'),
'settinggroup' => 'system',
'varname' => 'le_domain_dnscheck',
'type' => 'checkbox',
'default' => true,
'save_method' => 'storeSettingField'
],
'system_le_domain_dnscheck_resolver' => [
'label' => lng('serversettings.le_domain_dnscheck_resolver'),
'settinggroup' => 'system',
'varname' => 'le_domain_dnscheck_resolver',
'type' => 'text',
'string_regexp' => '/^(([0-9]+ [a-z0-9\-\._]+, ?)*[0-9]+ [a-z0-9\-\._]+)?$/i',
'string_emptyallowed' => true,
'default' => '',
'save_method' => 'storeSettingField'
]
]
]
]
];

View File

@@ -4,148 +4,142 @@
* This file is part of the Froxlor project.
* Copyright (c) 2010 the Froxlor Team (see authors).
*
* For the full copyright and license information, please view the COPYING
* file that was distributed with this source code. You can also view the
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* @copyright (c) the authors
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Settings
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, you can also view it online at
* https://files.froxlor.org/misc/COPYING.txt
*
* @copyright the authors
* @author Froxlor team <team@froxlor.org>
* @license https://files.froxlor.org/misc/COPYING.txt GPLv2
*/
return array(
'groups' => array(
'fcgid' => array(
'title' => $lng['admin']['fcgid_settings'],
'websrv_avail' => array('apache2', 'lighttpd'),
'fields' => array(
'system_mod_fcgid_enabled' => array(
'label' => $lng['serversettings']['mod_fcgid'],
return [
'groups' => [
'fcgid' => [
'title' => lng('admin.fcgid_settings'),
'icon' => 'fa-brands fa-php',
'websrv_avail' => [
'apache2',
'lighttpd'
],
'fields' => [
'system_mod_fcgid' => [
'label' => lng('serversettings.mod_fcgid'),
'settinggroup' => 'system',
'varname' => 'mod_fcgid',
'type' => 'bool',
'type' => 'checkbox',
'default' => false,
'save_method' => 'storeSettingField',
'plausibility_check_method' => 'checkFcgidPhpFpm',
'overview_option' => true
),
'system_mod_fcgid_configdir' => array(
'label' => $lng['serversettings']['mod_fcgid']['configdir'],
'plausibility_check_method' => [
'\\Froxlor\\Validate\\Check',
'checkFcgidPhpFpm'
],
'overview_option' => true,
'requires_reconf' => ['http', 'system:fcgid']
],
'system_mod_fcgid_configdir' => [
'label' => lng('serversettings.mod_fcgid.configdir'),
'settinggroup' => 'system',
'varname' => 'mod_fcgid_configdir',
'type' => 'string',
'type' => 'text',
'string_type' => 'confdir',
'default' => '/var/www/php-fcgi-scripts/',
'plausibility_check_method' => 'checkPathConflicts',
'plausibility_check_method' => [
'\\Froxlor\\Validate\\Check',
'checkPathConflicts'
],
'save_method' => 'storeSettingField',
),
'system_mod_fcgid_tmpdir' => array(
'label' => $lng['serversettings']['mod_fcgid']['tmpdir'],
'requires_reconf' => ['system:fcgid']
],
'system_mod_fcgid_tmpdir' => [
'label' => lng('serversettings.mod_fcgid.tmpdir'),
'settinggroup' => 'system',
'varname' => 'mod_fcgid_tmpdir',
'type' => 'string',
'type' => 'text',
'string_type' => 'dir',
'default' => '/var/customers/tmp/',
'save_method' => 'storeSettingField',
),
'system_mod_fcgid_peardir' => array(
'label' => $lng['serversettings']['mod_fcgid']['peardir'],
'requires_reconf' => ['http']
],
'system_mod_fcgid_peardir' => [
'label' => lng('serversettings.mod_fcgid.peardir'),
'settinggroup' => 'system',
'varname' => 'mod_fcgid_peardir',
'type' => 'string',
'type' => 'text',
'string_type' => 'dir',
'string_delimiter' => ':',
'string_emptyallowed' => true,
'default' => '/usr/share/php/:/usr/share/php5/',
'save_method' => 'storeSettingField',
),
'system_mod_fcgid_wrapper' => array(
'label' => $lng['serversettings']['mod_fcgid']['wrapper'],
'advanced_mode' => true
],
'system_mod_fcgid_wrapper' => [
'label' => lng('serversettings.mod_fcgid.wrapper'),
'settinggroup' => 'system',
'varname' => 'mod_fcgid_wrapper',
'type' => 'option',
'option_options' => array(0 => 'ScriptAlias', 1=> 'FcgidWrapper'),
'type' => 'select',
'select_var' => [
0 => 'ScriptAlias',
1 => 'FcgidWrapper'
],
'default' => 1,
'save_method' => 'storeSettingField',
'websrv_avail' => array('apache2')
),
'system_mod_fcgid_starter' => array(
'label' => $lng['serversettings']['mod_fcgid']['starter'],
'websrv_avail' => [
'apache2'
],
'advanced_mode' => true
],
'system_mod_fcgid_starter' => [
'label' => lng('serversettings.mod_fcgid.starter'),
'settinggroup' => 'system',
'varname' => 'mod_fcgid_starter',
'type' => 'int',
'type' => 'number',
'min' => 0,
'default' => 0,
'save_method' => 'storeSettingField',
),
'system_mod_fcgid_maxrequests' => array(
'label' => $lng['serversettings']['mod_fcgid']['maxrequests'],
'advanced_mode' => true
],
'system_mod_fcgid_maxrequests' => [
'label' => lng('serversettings.mod_fcgid.maxrequests'),
'settinggroup' => 'system',
'varname' => 'mod_fcgid_maxrequests',
'type' => 'int',
'type' => 'number',
'default' => 250,
'save_method' => 'storeSettingField',
),
'system_mod_fcgid_defaultini' => array(
'label' => $lng['serversettings']['mod_fcgid']['defaultini'],
'advanced_mode' => true
],
'system_mod_fcgid_defaultini' => [
'label' => lng('serversettings.mod_fcgid.defaultini'),
'settinggroup' => 'system',
'varname' => 'mod_fcgid_defaultini',
'type' => 'option',
'type' => 'select',
'default' => '1',
'option_mode' => 'one',
'option_options_method' => 'getPhpConfigs',
'save_method' => 'storeSettingField',
),
'system_mod_fcgid_enabled_ownvhost' => array(
'label' => $lng['serversettings']['mod_fcgid_ownvhost'],
'settinggroup' => 'system',
'varname' => 'mod_fcgid_ownvhost',
'type' => 'bool',
'default' => false,
'save_method' => 'storeSettingField',
'websrv_avail' => array('apache2')
),
'system_mod_fcgid_httpuser' => array(
'label' => $lng['admin']['mod_fcgid_user'],
'settinggroup' => 'system',
'varname' => 'mod_fcgid_httpuser',
'type' => 'string',
'default' => 'froxlorlocal',
'save_method' => 'storeSettingField',
'websrv_avail' => array('apache2')
),
'system_mod_fcgid_httpgroup' => array(
'label' => $lng['admin']['mod_fcgid_group'],
'settinggroup' => 'system',
'varname' => 'mod_fcgid_httpgroup',
'type' => 'string',
'default' => 'froxlorlocal',
'save_method' => 'storeSettingField',
'websrv_avail' => array('apache2')
),
'system_mod_fcgid_defaultini_ownvhost' => array(
'label' => $lng['serversettings']['mod_fcgid']['defaultini_ownvhost'],
'settinggroup' => 'system',
'varname' => 'mod_fcgid_defaultini_ownvhost',
'type' => 'option',
'default' => '2',
'option_mode' => 'one',
'option_options_method' => 'getPhpConfigs',
'save_method' => 'storeSettingField',
'websrv_avail' => array('apache2')
),
'system_mod_fcgid_idle_timeout' => array(
'label' => $lng['serversettings']['mod_fcgid']['idle_timeout'],
'option_options_method' => [
'\\Froxlor\\Http\\PhpConfig',
'getPhpConfigs'
],
'save_method' => 'storeSettingField'
],
'system_mod_fcgid_idle_timeout' => [
'label' => lng('serversettings.mod_fcgid.idle_timeout'),
'settinggroup' => 'system',
'varname' => 'mod_fcgid_idle_timeout',
'type' => 'int',
'type' => 'number',
'default' => 30,
'save_method' => 'storeSettingField'
),
)
)
)
);
?>
'save_method' => 'storeSettingField',
'advanced_mode' => true
]
]
]
]
];

View File

@@ -4,190 +4,158 @@
* This file is part of the Froxlor project.
* Copyright (c) 2010 the Froxlor Team (see authors).
*
* For the full copyright and license information, please view the COPYING
* file that was distributed with this source code. You can also view the
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* @copyright (c) the authors
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Settings
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, you can also view it online at
* https://files.froxlor.org/misc/COPYING.txt
*
* @copyright the authors
* @author Froxlor team <team@froxlor.org>
* @license https://files.froxlor.org/misc/COPYING.txt GPLv2
*/
return array(
'groups' => array(
'phpfpm' => array(
'title' => $lng['admin']['phpfpm_settings'],
'fields' => array(
'system_phpfpm_enabled' => array(
'label' => $lng['serversettings']['phpfpm'],
use Froxlor\Settings;
return [
'groups' => [
'phpfpm' => [
'title' => lng('admin.phpfpm_settings'),
'icon' => 'fa-brands fa-php',
'fields' => [
'phpfpm_enabled' => [
'label' => lng('serversettings.phpfpm'),
'settinggroup' => 'phpfpm',
'varname' => 'enabled',
'type' => 'bool',
'type' => 'checkbox',
'default' => false,
'save_method' => 'storeSettingField',
'plausibility_check_method' => 'checkFcgidPhpFpm',
'overview_option' => true
),
'system_phpfpm_enabled_ownvhost' => array(
'label' => $lng['phpfpm']['ownvhost'],
'settinggroup' => 'phpfpm',
'varname' => 'enabled_ownvhost',
'type' => 'bool',
'default' => false,
'save_method' => 'storeSettingField'
),
'system_phpfpm_httpuser' => array(
'label' => $lng['phpfpm']['vhost_httpuser'],
'settinggroup' => 'phpfpm',
'varname' => 'vhost_httpuser',
'type' => 'string',
'default' => 'froxlorlocal',
'save_method' => 'storeSettingField'
),
'system_phpfpm_httpgroup' => array(
'label' => $lng['phpfpm']['vhost_httpgroup'],
'settinggroup' => 'phpfpm',
'varname' => 'vhost_httpgroup',
'type' => 'string',
'default' => 'froxlorlocal',
'save_method' => 'storeSettingField'
),
'system_phpfpm_defaultini' => array(
'label' => $lng['serversettings']['mod_fcgid']['defaultini'],
'plausibility_check_method' => [
'\\Froxlor\\Validate\\Check',
'checkFcgidPhpFpm'
],
'overview_option' => true,
'requires_reconf' => ['http', 'system:php-fpm']
],
'phpfpm_defaultini' => [
'label' => lng('serversettings.mod_fcgid.defaultini'),
'settinggroup' => 'phpfpm',
'varname' => 'defaultini',
'type' => 'option',
'type' => 'select',
'default' => '1',
'option_mode' => 'one',
'option_options_method' => 'getPhpConfigs',
'option_options_method' => [
'\\Froxlor\\Http\\PhpConfig',
'getPhpConfigs'
],
'save_method' => 'storeSettingField'
),
'system_phpfpm_defaultini_ownvhost' => array(
'label' => $lng['serversettings']['mod_fcgid']['defaultini_ownvhost'],
'settinggroup' => 'phpfpm',
'varname' => 'vhost_defaultini',
'type' => 'option',
'default' => '2',
'option_mode' => 'one',
'option_options_method' => 'getPhpConfigs',
'save_method' => 'storeSettingField'
),
'system_phpfpm_configdir' => array(
'label' => $lng['serversettings']['phpfpm_settings']['configdir'],
'settinggroup' => 'phpfpm',
'varname' => 'configdir',
'type' => 'string',
'string_type' => 'confdir',
'default' => '/etc/php-fpm.d/',
'save_method' => 'storeSettingField'
),
'system_phpfpm_aliasconfigdir' => array(
'label' => $lng['serversettings']['phpfpm_settings']['aliasconfigdir'],
],
'phpfpm_aliasconfigdir' => [
'label' => lng('serversettings.phpfpm_settings.aliasconfigdir'),
'settinggroup' => 'phpfpm',
'varname' => 'aliasconfigdir',
'type' => 'string',
'type' => 'text',
'string_type' => 'confdir',
'default' => '/var/www/php-fpm/',
'save_method' => 'storeSettingField'
),
'system_phpfpm_tmpdir' => array(
'label' => $lng['serversettings']['mod_fcgid']['tmpdir'],
'save_method' => 'storeSettingField',
'advanced_mode' => true
],
'phpfpm_tmpdir' => [
'label' => lng('serversettings.mod_fcgid.tmpdir'),
'settinggroup' => 'phpfpm',
'varname' => 'tmpdir',
'type' => 'string',
'type' => 'text',
'string_type' => 'dir',
'default' => '/var/customers/tmp/',
'save_method' => 'storeSettingField'
),
'system_phpfpm_peardir' => array(
'label' => $lng['serversettings']['mod_fcgid']['peardir'],
],
'phpfpm_peardir' => [
'label' => lng('serversettings.mod_fcgid.peardir'),
'settinggroup' => 'phpfpm',
'varname' => 'peardir',
'type' => 'string',
'type' => 'text',
'string_type' => 'dir',
'string_delimiter' => ':',
'string_emptyallowed' => true,
'default' => '/usr/share/php/:/usr/share/php5/',
'save_method' => 'storeSettingField'
),
'system_phpfpm_fastcgi_ipcdir' => array(
'label' => $lng['serversettings']['phpfpm_settings']['ipcdir'],
'save_method' => 'storeSettingField',
'advanced_mode' => true
],
'phpfpm_envpath' => [
'label' => lng('serversettings.phpfpm_settings.envpath'),
'settinggroup' => 'phpfpm',
'varname' => 'envpath',
'type' => 'text',
'string_type' => 'dir',
'string_delimiter' => ':',
'string_emptyallowed' => true,
'default' => '/usr/local/bin:/usr/bin:/bin',
'save_method' => 'storeSettingField',
'advanced_mode' => true
],
'phpfpm_fastcgi_ipcdir' => [
'label' => lng('serversettings.phpfpm_settings.ipcdir'),
'settinggroup' => 'phpfpm',
'varname' => 'fastcgi_ipcdir',
'type' => 'string',
'type' => 'text',
'string_type' => 'dir',
'default' => '/var/lib/apache2/fastcgi/',
'save_method' => 'storeSettingField'
),
'system_phpfpm_reload' => array(
'label' => $lng['serversettings']['phpfpm_settings']['reload'],
'save_method' => 'storeSettingField',
'advanced_mode' => true
],
'phpfpm_use_mod_proxy' => [
'label' => lng('phpfpm.use_mod_proxy'),
'settinggroup' => 'phpfpm',
'varname' => 'reload',
'type' => 'string',
'default' => '/etc/init.d/php-fpm restart',
'varname' => 'use_mod_proxy',
'type' => 'checkbox',
'default' => true,
'visible' => Settings::Get('system.apache24'),
'save_method' => 'storeSettingField'
),
'system_phpfpm_pm' => array(
'label' => $lng['serversettings']['phpfpm_settings']['pm'],
],
'phpfpm_ini_flags' => [
'label' => lng('phpfpm.ini_flags'),
'settinggroup' => 'phpfpm',
'varname' => 'pm',
'type' => 'option',
'default' => 'static',
'option_mode' => 'one',
'option_options' => array('static' => 'static', 'dynamic' => 'dynamic', 'ondemand' => 'ondemand'),
'save_method' => 'storeSettingField'
),
'system_phpfpm_max_children' => array(
'label' => $lng['serversettings']['phpfpm_settings']['max_children'],
'varname' => 'ini_flags',
'type' => 'textarea',
'default' => '',
'save_method' => 'storeSettingField',
'advanced_mode' => true
],
'phpfpm_ini_values' => [
'label' => lng('phpfpm.ini_values'),
'settinggroup' => 'phpfpm',
'varname' => 'max_children',
'type' => 'int',
'default' => 1,
'save_method' => 'storeSettingField'
),
'system_phpfpm_start_servers' => array(
'label' => $lng['serversettings']['phpfpm_settings']['start_servers'],
'varname' => 'ini_values',
'type' => 'textarea',
'default' => '',
'save_method' => 'storeSettingField',
'advanced_mode' => true
],
'phpfpm_ini_admin_flags' => [
'label' => lng('phpfpm.ini_admin_flags'),
'settinggroup' => 'phpfpm',
'varname' => 'start_servers',
'type' => 'int',
'default' => 20,
'save_method' => 'storeSettingField'
),
'system_phpfpm_min_spare_servers' => array(
'label' => $lng['serversettings']['phpfpm_settings']['min_spare_servers'],
'varname' => 'ini_admin_flags',
'type' => 'textarea',
'default' => '',
'save_method' => 'storeSettingField',
'advanced_mode' => true
],
'phpfpm_ini_admin_values' => [
'label' => lng('phpfpm.ini_admin_values'),
'settinggroup' => 'phpfpm',
'varname' => 'min_spare_servers',
'type' => 'int',
'default' => 5,
'save_method' => 'storeSettingField'
),
'system_phpfpm_max_spare_servers' => array(
'label' => $lng['serversettings']['phpfpm_settings']['max_spare_servers'],
'settinggroup' => 'phpfpm',
'varname' => 'max_spare_servers',
'type' => 'int',
'default' => 35,
'save_method' => 'storeSettingField'
),
'system_phpfpm_max_requests' => array(
'label' => $lng['serversettings']['phpfpm_settings']['max_requests'],
'settinggroup' => 'phpfpm',
'varname' => 'max_requests',
'type' => 'int',
'default' => 0,
'save_method' => 'storeSettingField'
),
'system_phpfpm_idle_timeout' => array(
'label' => $lng['serversettings']['phpfpm_settings']['idle_timeout'],
'settinggroup' => 'phpfpm',
'varname' => 'idle_timeout',
'type' => 'int',
'default' => 30,
'save_method' => 'storeSettingField'
),
),
),
),
);
?>
'varname' => 'ini_admin_values',
'type' => 'textarea',
'default' => '',
'save_method' => 'storeSettingField',
'advanced_mode' => true
]
]
]
]
];

View File

@@ -4,62 +4,77 @@
* This file is part of the Froxlor project.
* Copyright (c) 2010 the Froxlor Team (see authors).
*
* For the full copyright and license information, please view the COPYING
* file that was distributed with this source code. You can also view the
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* @copyright (c) the authors
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Settings
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, you can also view it online at
* https://files.froxlor.org/misc/COPYING.txt
*
* @copyright the authors
* @author Froxlor team <team@froxlor.org>
* @license https://files.froxlor.org/misc/COPYING.txt GPLv2
*/
return array(
'groups' => array(
'perl' => array(
'title' => $lng['admin']['perl_settings'],
'fields' => array(
'perl_path' => array(
'label' => $lng['serversettings']['perl_path'],
return [
'groups' => [
'perl' => [
'title' => lng('admin.perl_settings'),
'icon' => 'fa-solid fa-code',
'fields' => [
'system_perl_path' => [
'label' => lng('serversettings.perl_path'),
'settinggroup' => 'system',
'varname' => 'perl_path',
'type' => 'string',
'type' => 'text',
'default' => '/usr/bin/perl',
'save_method' => 'storeSettingField',
'websrv_avail' => array('lighttpd')
),
'system_perl_suexecworkaround' => array(
'label' => $lng['serversettings']['perl']['suexecworkaround'],
'websrv_avail' => [
'lighttpd'
]
],
'perl_suexecworkaround' => [
'label' => lng('serversettings.perl.suexecworkaround'),
'settinggroup' => 'perl',
'varname' => 'suexecworkaround',
'type' => 'bool',
'type' => 'checkbox',
'default' => false,
'save_method' => 'storeSettingField',
'websrv_avail' => array('apache2')
),
'system_perl_suexeccgipath' => array(
'label' => $lng['serversettings']['perl']['suexeccgipath'],
'websrv_avail' => [
'apache2'
]
],
'perl_suexecpath' => [
'label' => lng('serversettings.perl.suexeccgipath'),
'settinggroup' => 'perl',
'varname' => 'suexecpath',
'type' => 'string',
'type' => 'text',
'string_type' => 'dir',
'default' => '/var/www/cgi-bin/',
'save_method' => 'storeSettingField',
'websrv_avail' => array('apache2')
),
'perl_server' => array(
'label' => $lng['serversettings']['perl_server'],
'websrv_avail' => [
'apache2'
]
],
'serversettings_perl_server' => [
'label' => lng('serversettings.perl_server'),
'settinggroup' => 'serversettings',
'varname' => 'perl_server',
'type' => 'string',
'type' => 'text',
'default' => 'unix:/var/run/nginx/cgiwrap-dispatch.sock',
'save_method' => 'storeSettingField',
'websrv_avail' => array('nginx')
),
),
),
),
);
?>
'websrv_avail' => [
'nginx'
]
]
]
]
]
];

View File

@@ -2,83 +2,115 @@
/**
* This file is part of the Froxlor project.
* Copyright (c) 2003-2009 the SysCP Team (see authors).
* Copyright (c) 2010 the Froxlor Team (see authors).
*
* For the full copyright and license information, please view the COPYING
* file that was distributed with this source code. You can also view the
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* @copyright (c) the authors
* @author Florian Lippert <flo@syscp.org> (2003-2009)
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Settings
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, you can also view it online at
* https://files.froxlor.org/misc/COPYING.txt
*
* @copyright the authors
* @author Froxlor team <team@froxlor.org>
* @license https://files.froxlor.org/misc/COPYING.txt GPLv2
*/
return array(
'groups' => array(
'statistics' => array(
'title' => $lng['admin']['statisticsettings'],
'fields' => array(
'system_webalizer_quiet' => array(
'label' => $lng['serversettings']['webalizer_quiet'],
use Froxlor\Settings;
return [
'groups' => [
'statistics' => [
'title' => lng('admin.statisticsettings'),
'icon' => 'fa-solid fa-chart-area',
'fields' => [
'system_traffictool' => [
'label' => lng('serversettings.traffictool.toolselect'),
'settinggroup' => 'system',
'varname' => 'traffictool',
'type' => 'select',
'default' => 'goaccess',
'select_var' => [
'webalizer' => lng('serversettings.traffictool.webalizer'),
'awstats' => lng('serversettings.traffictool.awstats'),
'goaccess' => lng('serversettings.traffictool.goaccess')
],
'save_method' => 'storeSettingUpdateTrafficTool',
'requires_reconf' => ['system']
],
'system_webalizer_quiet' => [
'label' => lng('serversettings.webalizer_quiet'),
'settinggroup' => 'system',
'varname' => 'webalizer_quiet',
'type' => 'option',
'type' => 'select',
'default' => 2,
'option_mode' => 'one',
'option_options' => array(0 => $lng['admin']['webalizer']['normal'], 1 => $lng['admin']['webalizer']['quiet'], 2 => $lng['admin']['webalizer']['veryquiet']),
'select_var' => [
0 => lng('admin.webalizer.normal'),
1 => lng('admin.webalizer.quiet'),
2 => lng('admin.webalizer.veryquiet')
],
'save_method' => 'storeSettingField',
),
'system_awstats_enabled' => array(
'label' => $lng['serversettings']['awstats_enabled'],
'settinggroup' => 'system',
'varname' => 'awstats_enabled',
'type' => 'bool',
'default' => false,
'save_method' => 'storeSettingField',
),
'system_awstats_path' => array(
'label' => $lng['serversettings']['awstats_path'],
'visible' => Settings::Get('system.traffictool') == 'webalizer'
],
'system_awstats_path' => [
'label' => lng('serversettings.awstats_path'),
'settinggroup' => 'system',
'varname' => 'awstats_path',
'type' => 'string',
'type' => 'text',
'string_type' => 'dir',
'default' => '/usr/bin/',
'default' => '/usr/share/awstats/tools/',
'save_method' => 'storeSettingField',
),
'system_awstats_awstatspath' => array(
'label' => $lng['serversettings']['awstats_awstatspath'],
'visible' => Settings::Get('system.traffictool') == 'awstats'
],
'system_awstats_awstatspath' => [
'label' => lng('serversettings.awstats_awstatspath'),
'settinggroup' => 'system',
'varname' => 'awstats_awstatspath',
'type' => 'string',
'type' => 'text',
'string_type' => 'dir',
'default' => '/usr/bin/',
'default' => '/usr/lib/cgi-bin/',
'save_method' => 'storeSettingField',
),
'system_awstats_conf' => array(
'label' => $lng['serversettings']['awstats_conf'],
'visible' => Settings::Get('system.traffictool') == 'awstats'
],
'system_awstats_conf' => [
'label' => lng('serversettings.awstats_conf'),
'settinggroup' => 'system',
'varname' => 'awstats_conf',
'type' => 'string',
'type' => 'text',
'string_type' => 'dir',
'default' => '/etc/awstats/',
'save_method' => 'storeSettingField',
),
'system_awstats_icons' => array(
'label' => $lng['serversettings']['awstats_icons'],
'visible' => Settings::Get('system.traffictool') == 'awstats',
'requires_reconf' => ['system:awstats']
],
'system_awstats_icons' => [
'label' => lng('serversettings.awstats_icons'),
'settinggroup' => 'system',
'varname' => 'awstats_icons',
'type' => 'string',
'type' => 'text',
'string_type' => 'dir',
'default' => '/usr/share/awstats/icon/',
'save_method' => 'storeSettingField',
)
)
)
)
);
?>
'visible' => Settings::Get('system.traffictool') == 'awstats'
],
'system_awstats_logformat' => [
'label' => lng('serversettings.awstats.logformat'),
'settinggroup' => 'system',
'varname' => 'awstats_logformat',
'type' => 'text',
'default' => '1',
'save_method' => 'storeSettingField',
'visible' => Settings::Get('system.traffictool') == 'awstats',
'advanced_mode' => true
]
]
]
]
];

View File

@@ -2,148 +2,168 @@
/**
* This file is part of the Froxlor project.
* Copyright (c) 2003-2009 the SysCP Team (see authors).
* Copyright (c) 2010 the Froxlor Team (see authors).
*
* For the full copyright and license information, please view the COPYING
* file that was distributed with this source code. You can also view the
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* @copyright (c) the authors
* @author Florian Lippert <flo@syscp.org> (2003-2009)
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Settings
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, you can also view it online at
* https://files.froxlor.org/misc/COPYING.txt
*
* @copyright the authors
* @author Froxlor team <team@froxlor.org>
* @license https://files.froxlor.org/misc/COPYING.txt GPLv2
*/
return array(
'groups' => array(
'mail' => array(
'title' => $lng['admin']['mailserversettings'],
'fields' => array(
'system_vmail_uid' => array(
'label' => $lng['serversettings']['vmail_uid'],
return [
'groups' => [
'mail' => [
'title' => lng('admin.mailserversettings'),
'icon' => 'fa-solid fa-envelope',
'fields' => [
'system_vmail_uid' => [
'label' => lng('serversettings.vmail_uid'),
'settinggroup' => 'system',
'varname' => 'vmail_uid',
'type' => 'int',
'type' => 'number',
'default' => 2000,
'int_min' => 1,
'int_max' => 65535,
'min' => 2,
'max' => 65535,
'save_method' => 'storeSettingField',
),
'system_vmail_gid' => array(
'label' => $lng['serversettings']['vmail_gid'],
'advanced_mode' => true,
'requires_reconf' => ['smtp']
],
'system_vmail_gid' => [
'label' => lng('serversettings.vmail_gid'),
'settinggroup' => 'system',
'varname' => 'vmail_gid',
'type' => 'int',
'type' => 'number',
'default' => 2000,
'int_min' => 1,
'int_max' => 65535,
'min' => 2,
'max' => 65535,
'save_method' => 'storeSettingField',
),
'system_vmail_homedir' => array(
'label' => $lng['serversettings']['vmail_homedir'],
'advanced_mode' => true,
'requires_reconf' => ['smtp']
],
'system_vmail_homedir' => [
'label' => lng('serversettings.vmail_homedir'),
'settinggroup' => 'system',
'varname' => 'vmail_homedir',
'type' => 'string',
'type' => 'text',
'string_type' => 'dir',
'default' => '/var/customers/mail/',
'save_method' => 'storeSettingField',
),
'system_vmail_maildirname' => array(
'label' => $lng['serversettings']['vmail_maildirname'],
'requires_reconf' => ['smtp']
],
'system_vmail_maildirname' => [
'label' => lng('serversettings.vmail_maildirname'),
'settinggroup' => 'system',
'varname' => 'vmail_maildirname',
'type' => 'string',
'type' => 'text',
'string_type' => 'dir',
'default' => 'Maildir',
'string_emptyallowed' => true,
'save_method' => 'storeSettingField',
),
'panel_sendalternativemail' => array(
'label' => $lng['serversettings']['sendalternativemail'],
'advanced_mode' => true
],
'panel_sendalternativemail' => [
'label' => lng('serversettings.sendalternativemail'),
'settinggroup' => 'panel',
'varname' => 'sendalternativemail',
'type' => 'bool',
'type' => 'checkbox',
'default' => false,
'save_method' => 'storeSettingField',
),
'system_mail_quota_enabled' => array(
'label' => $lng['serversettings']['mail_quota_enabled'],
'save_method' => 'storeSettingField'
],
'system_mail_quota_enabled' => [
'label' => lng('serversettings.mail_quota_enabled'),
'settinggroup' => 'system',
'varname' => 'mail_quota_enabled',
'type' => 'bool',
'type' => 'checkbox',
'default' => false,
'save_method' => 'storeSettingField',
),
'system_mail_quota' => array(
'label' => $lng['serversettings']['mail_quota'],
'save_method' => 'storeSettingField'
],
'system_mail_quota' => [
'label' => lng('serversettings.mail_quota'),
'settinggroup' => 'system',
'varname' => 'mail_quota',
'type' => 'int',
'type' => 'number',
'default' => 100,
'save_method' => 'storeSettingField',
),
'system_catchall_enabled' => array(
'label' => $lng['serversettings']['catchall_enabled'],
'save_method' => 'storeSettingField'
],
'catchall_catchall_enabled' => [
'label' => lng('serversettings.catchall_enabled'),
'settinggroup' => 'catchall',
'varname' => 'catchall_enabled',
'type' => 'bool',
'type' => 'checkbox',
'default' => true,
'save_method' => 'storeSettingResetCatchall',
),
'system_mailtraffic_enabled' => array(
'label' => $lng['serversettings']['mailtraffic_enabled'],
'save_method' => 'storeSettingResetCatchall'
],
'system_mailtraffic_enabled' => [
'label' => lng('serversettings.mailtraffic_enabled'),
'settinggroup' => 'system',
'varname' => 'mailtraffic_enabled',
'type' => 'bool',
'type' => 'checkbox',
'default' => true,
'save_method' => 'storeSettingField',
),
'system_mdaserver' => array(
'label' => $lng['serversettings']['mdaserver'],
'advanced_mode' => true
],
'system_mdaserver' => [
'label' => lng('serversettings.mdaserver'),
'settinggroup' => 'system',
'varname' => 'mdaserver',
'type' => 'option',
'option_mode' => 'one',
'type' => 'select',
'default' => 'dovecot',
'option_options' => array('courier' => 'Courier', 'dovecot' => 'Dovecot'),
'select_var' => [
'courier' => 'Courier',
'dovecot' => 'Dovecot'
],
'save_method' => 'storeSettingField',
),
'system_mdalog' => array(
'label' => $lng['serversettings']['mdalog'],
'advanced_mode' => true
],
'system_mdalog' => [
'label' => lng('serversettings.mdalog'),
'settinggroup' => 'system',
'varname' => 'mdalog',
'type' => 'string',
'type' => 'text',
'string_type' => 'file',
'default' => '/var/log/mail.log',
'string_emptyallowed' => true,
'save_method' => 'storeSettingField',
),
'system_mtaserver' => array(
'label' => $lng['serversettings']['mtaserver'],
'advanced_mode' => true
],
'system_mtaserver' => [
'label' => lng('serversettings.mtaserver'),
'settinggroup' => 'system',
'varname' => 'mtaserver',
'type' => 'option',
'option_mode' => 'one',
'type' => 'select',
'default' => 'postfix',
'option_options' => array('exim4' => 'Exim4', 'postfix' => 'Postfix'),
'select_var' => [
'exim4' => 'Exim4',
'postfix' => 'Postfix'
],
'save_method' => 'storeSettingField',
),
'system_mtalog' => array(
'label' => $lng['serversettings']['mtalog'],
'advanced_mode' => true
],
'system_mtalog' => [
'label' => lng('serversettings.mtalog'),
'settinggroup' => 'system',
'varname' => 'mtalog',
'type' => 'string',
'type' => 'text',
'string_type' => 'file',
'default' => '/var/log/mail.log',
'string_emptyallowed' => true,
'save_method' => 'storeSettingField',
),
),
),
),
);
?>
'advanced_mode' => true
]
]
]
]
];

View File

@@ -2,39 +2,46 @@
/**
* This file is part of the Froxlor project.
* Copyright (c) 2003-2009 the SysCP Team (see authors).
* Copyright (c) 2010 the Froxlor Team (see authors).
*
* For the full copyright and license information, please view the COPYING
* file that was distributed with this source code. You can also view the
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* @copyright (c) the authors
* @author Florian Lippert <flo@syscp.org> (2003-2009)
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Settings
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, you can also view it online at
* https://files.froxlor.org/misc/COPYING.txt
*
* @copyright the authors
* @author Froxlor team <team@froxlor.org>
* @license https://files.froxlor.org/misc/COPYING.txt GPLv2
*/
return array(
'groups' => array(
'ftpserver' => array(
'title' => $lng['admin']['ftpserversettings'],
'fields' => array(
'ftpserver' => array(
'label' => $lng['admin']['ftpserver'],
return [
'groups' => [
'ftpserver' => [
'title' => lng('admin.ftpserversettings'),
'icon' => 'fa-solid fa-arrow-right-arrow-left',
'fields' => [
'system_ftpserver' => [
'label' => lng('admin.ftpserver'),
'settinggroup' => 'system',
'varname' => 'ftpserver',
'type' => 'option',
'type' => 'select',
'default' => 'proftpd',
'option_mode' => 'one',
'option_options' => array('proftpd' => 'Proftpd', 'pureftpd' => 'Pureftpd'),
'save_method' => 'storeSettingField',
),
),
),
)
);
?>
'select_var' => [
'proftpd' => 'Proftpd',
'pureftpd' => 'Pureftpd'
],
'save_method' => 'storeSettingField'
]
]
]
]
];

View File

@@ -2,103 +2,177 @@
/**
* This file is part of the Froxlor project.
* Copyright (c) 2003-2009 the SysCP Team (see authors).
* Copyright (c) 2010 the Froxlor Team (see authors).
*
* For the full copyright and license information, please view the COPYING
* file that was distributed with this source code. You can also view the
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* @copyright (c) the authors
* @author Florian Lippert <flo@syscp.org> (2003-2009)
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Settings
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, you can also view it online at
* https://files.froxlor.org/misc/COPYING.txt
*
* @copyright the authors
* @author Froxlor team <team@froxlor.org>
* @license https://files.froxlor.org/misc/COPYING.txt GPLv2
*/
return array(
'groups' => array(
'nameserver' => array(
'title' => $lng['admin']['nameserversettings'],
'fields' => array(
'nameserver_enable' => array(
'label' => $lng['serversettings']['bindenable'],
use Froxlor\Settings;
return [
'groups' => [
'nameserver' => [
'title' => lng('admin.nameserversettings'),
'icon' => 'fa-solid fa-globe',
'fields' => [
'system_bind_enable' => [
'label' => lng('serversettings.bindenable'),
'settinggroup' => 'system',
'varname' => 'bind_enable',
'type' => 'bool',
'type' => 'checkbox',
'default' => true,
'save_method' => 'storeSettingField',
'overview_option' => true
),
'system_bindconf_directory' => array(
'label' => $lng['serversettings']['bindconf_directory'],
'overview_option' => true,
'requires_reconf' => ['dns']
],
'system_dnsenabled' => [
'label' => lng('serversettings.dnseditorenable'),
'settinggroup' => 'system',
'varname' => 'dnsenabled',
'type' => 'checkbox',
'default' => false,
'save_method' => 'storeSettingField'
],
'system_dns_server' => [
'label' => lng('serversettings.dns_server'),
'settinggroup' => 'system',
'varname' => 'dns_server',
'type' => 'select',
'default' => 'Bind',
'select_var' => [
'Bind' => 'Bind9',
'PowerDNS' => 'PowerDNS'
],
'save_method' => 'storeSettingField',
'requires_reconf' => ['dns']
],
'system_bindconf_directory' => [
'label' => lng('serversettings.bindconf_directory'),
'settinggroup' => 'system',
'varname' => 'bindconf_directory',
'type' => 'string',
'type' => 'text',
'string_type' => 'dir',
'default' => '/etc/bind/',
'save_method' => 'storeSettingField',
),
'system_bindreload_command' => array(
'label' => $lng['serversettings']['bindreload_command'],
'visible' => Settings::Get('system.dns_server') == 'Bind',
'requires_reconf' => ['dns:bind']
],
'system_bindreload_command' => [
'label' => lng('serversettings.bindreload_command'),
'settinggroup' => 'system',
'varname' => 'bindreload_command',
'type' => 'string',
'type' => 'text',
'string_regexp' => '/^[a-z0-9\/\._\- ]+$/i',
'default' => '/etc/init.d/bind9 reload',
'save_method' => 'storeSettingField',
),
'system_nameservers' => array(
'label' => $lng['serversettings']['nameservers'],
'save_method' => 'storeSettingField'
],
'system_nameservers' => [
'label' => lng('serversettings.nameservers'),
'settinggroup' => 'system',
'varname' => 'nameservers',
'type' => 'string',
'type' => 'text',
'string_regexp' => '/^(([a-z0-9\-\._]+, ?)*[a-z0-9\-\._]+)?$/i',
'string_emptyallowed' => true,
'default' => '',
'save_method' => 'storeSettingFieldInsertBindTask',
),
'system_mxservers' => array(
'label' => $lng['serversettings']['mxservers'],
'save_method' => 'storeSettingFieldInsertBindTask'
],
'system_mxservers' => [
'label' => lng('serversettings.mxservers'),
'settinggroup' => 'system',
'varname' => 'mxservers',
'type' => 'string',
'type' => 'text',
'string_regexp' => '/^(([0-9]+ [a-z0-9\-\._]+, ?)*[0-9]+ [a-z0-9\-\._]+)?$/i',
'string_emptyallowed' => true,
'default' => '',
'save_method' => 'storeSettingField',
),
'system_axfrservers' => array(
'label' => $lng['serversettings']['axfrservers'],
'save_method' => 'storeSettingField'
],
'system_axfrservers' => [
'label' => lng('serversettings.axfrservers'),
'settinggroup' => 'system',
'varname' => 'axfrservers',
'type' => 'string',
'string_type' => 'validate_ip',
'type' => 'text',
'string_type' => 'validate_ip_incl_private',
'string_delimiter' => ',',
'string_emptyallowed' => true,
'default' => '',
'save_method' => 'storeSettingField'
],
'system_powerdns_mode' => [
'label' => lng('serversettings.powerdns_mode'),
'settinggroup' => 'system',
'varname' => 'powerdns_mode',
'type' => 'select',
'default' => 'Native',
'select_var' => [
'Native' => 'Native',
'Master' => 'Master'
],
'save_method' => 'storeSettingField',
),
'system_dns_createmailentry' => array(
'label' => $lng['serversettings']['mail_also_with_mxservers'],
'advanced_mode' => true,
'visible' => Settings::Get('system.dns_server') == 'PowerDNS',
],
'system_dns_createmailentry' => [
'label' => lng('serversettings.mail_also_with_mxservers'),
'settinggroup' => 'system',
'varname' => 'dns_createmailentry',
'type' => 'bool',
'type' => 'checkbox',
'default' => false,
'save_method' => 'storeSettingField'
),
'system_defaultttl' => array(
'label' => $lng['serversettings']['defaultttl'],
],
'system_dns_createcaaentry' => [
'label' => lng('serversettings.caa_entry'),
'settinggroup' => 'system',
'varname' => 'dns_createcaaentry',
'type' => 'checkbox',
'default' => true,
'save_method' => 'storeSettingField',
'advanced_mode' => true
],
'caa_caa_entry' => [
'label' => lng('serversettings.caa_entry_custom'),
'settinggroup' => 'caa',
'varname' => 'caa_entry',
'type' => 'textarea',
'default' => '',
'save_method' => 'storeSettingField',
'advanced_mode' => true
],
'system_defaultttl' => [
'label' => lng('serversettings.defaultttl'),
'settinggroup' => 'system',
'varname' => 'defaultttl',
'type' => 'int',
'type' => 'number',
'default' => 604800, /* 1 week */
'int_min' => 3600, /* 1 hour */
'int_max' => 2147483647, /* integer max */
'save_method' => 'storeSettingField',
),
),
),
),
);
?>
'min' => 3600, /* 1 hour */
'max' => 2147483647, /* integer max */
'save_method' => 'storeSettingField'
],
'system_soaemail' => [
'label' => lng('serversettings.soaemail'),
'settinggroup' => 'system',
'varname' => 'soaemail',
'type' => 'email',
'string_emptyallowed' => true,
'default' => '',
'save_method' => 'storeSettingField'
]
]
]
]
];

View File

@@ -2,76 +2,92 @@
/**
* This file is part of the Froxlor project.
* Copyright (c) 2003-2009 the SysCP Team (see authors).
* Copyright (c) 2010 the Froxlor Team (see authors).
*
* For the full copyright and license information, please view the COPYING
* file that was distributed with this source code. You can also view the
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* @copyright (c) the authors
* @author Florian Lippert <flo@syscp.org> (2003-2009)
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Settings
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, you can also view it online at
* https://files.froxlor.org/misc/COPYING.txt
*
* @copyright the authors
* @author Froxlor team <team@froxlor.org>
* @license https://files.froxlor.org/misc/COPYING.txt GPLv2
*/
return array(
'groups' => array(
'logging' => array(
'title' => $lng['admin']['loggersettings'],
'fields' => array(
'logger_enabled' => array(
'label' => $lng['serversettings']['logger']['enable'],
return [
'groups' => [
'logging' => [
'title' => lng('admin.loggersettings'),
'icon' => 'fa-solid fa-file-lines',
'fields' => [
'logger_enabled' => [
'label' => lng('serversettings.logger.enable'),
'settinggroup' => 'logger',
'varname' => 'enabled',
'type' => 'bool',
'type' => 'checkbox',
'default' => false,
'save_method' => 'storeSettingField',
'overview_option' => true
),
'logger_severity' => array(
'label' => $lng['serversettings']['logger']['severity'],
],
'logger_severity' => [
'label' => lng('serversettings.logger.severity'),
'settinggroup' => 'logger',
'varname' => 'severity',
'type' => 'option',
'type' => 'select',
'default' => 1,
'option_mode' => 'one',
'option_options' => array(1 => $lng['admin']['logger']['normal'], 2 => $lng['admin']['logger']['paranoid']),
'save_method' => 'storeSettingField',
),
'logger_logtypes' => array(
'label' => $lng['serversettings']['logger']['types'],
'select_var' => [
1 => lng('admin.logger.normal'),
2 => lng('admin.logger.paranoid')
],
'save_method' => 'storeSettingField'
],
'logger_logtypes' => [
'label' => lng('serversettings.logger.types'),
'settinggroup' => 'logger',
'varname' => 'logtypes',
'type' => 'option',
'type' => 'select',
'default' => 'syslog,mysql',
'option_mode' => 'multiple',
'option_options' => array('syslog' => 'syslog', 'file' => 'file', 'mysql' => 'mysql'),
'save_method' => 'storeSettingField',
),
'logger_logfile' => array(
'label' => $lng['serversettings']['logger']['logfile'],
'select_mode' => 'multiple',
'select_var' => [
'syslog' => 'syslog',
'file' => 'file',
'mysql' => 'mysql'
],
'save_method' => 'storeSettingField'
],
'logger_logfile' => [
'label' => lng('serversettings.logger.logfile'),
'settinggroup' => 'logger',
'varname' => 'logfile',
'type' => 'string',
'type' => 'text',
'string_type' => 'file',
'string_emptyallowed' => true,
'default' => '',
'save_method' => 'storeSettingField',
),
'logger_log_cron' => array(
'label' => $lng['serversettings']['logger']['logcron'],
'save_method' => 'storeSettingField'
],
'logger_log_cron' => [
'label' => lng('serversettings.logger.logcron'),
'settinggroup' => 'logger',
'varname' => 'log_cron',
'type' => 'bool',
'default' => false,
'save_method' => 'storeSettingField',
),
),
),
)
);
?>
'type' => 'select',
'default' => 0,
'select_var' => [
0 => lng('serversettings.logger.logcronoption.never'),
1 => lng('serversettings.logger.logcronoption.once'),
2 => lng('serversettings.logger.logcronoption.always')
],
'save_method' => 'storeSettingField'
]
]
]
]
];

View File

@@ -2,133 +2,144 @@
/**
* This file is part of the Froxlor project.
* Copyright (c) 2003-2009 the SysCP Team (see authors).
* Copyright (c) 2010 the Froxlor Team (see authors).
*
* For the full copyright and license information, please view the COPYING
* file that was distributed with this source code. You can also view the
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* @copyright (c) the authors
* @author Florian Lippert <flo@syscp.org> (2003-2009)
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Settings
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, you can also view it online at
* https://files.froxlor.org/misc/COPYING.txt
*
* @copyright the authors
* @author Froxlor team <team@froxlor.org>
* @license https://files.froxlor.org/misc/COPYING.txt GPLv2
*/
return array(
'groups' => array(
'dkim' => array(
'title' => $lng['admin']['dkimsettings'],
'fields' => array(
'dkim_enabled' => array(
'label' => $lng['dkim']['use_dkim'],
use Froxlor\Settings;
return [
'groups' => [
'dkim' => [
'title' => lng('admin.dkimsettings'),
'icon' => 'fa-solid fa-fingerprint',
'fields' => [
'dkim_use_dkim' => [
'label' => lng('dkim.use_dkim'),
'settinggroup' => 'dkim',
'varname' => 'use_dkim',
'type' => 'bool',
'type' => 'checkbox',
'default' => false,
'save_method' => 'storeSettingFieldInsertBindTask',
'overview_option' => true
),
'dkim_prefix' => array(
'label' => $lng['dkim']['dkim_prefix'],
],
'dkim_dkim_prefix' => [
'label' => lng('dkim.dkim_prefix'),
'settinggroup' => 'dkim',
'varname' => 'dkim_prefix',
'type' => 'string',
'type' => 'text',
'string_type' => 'dir',
'default' => '/etc/postfix/dkim/',
'save_method' => 'storeSettingField'
],
'dkim_privkeysuffix' => [
'label' => lng('dkim.privkeysuffix'),
'settinggroup' => 'dkim',
'varname' => 'privkeysuffix',
'type' => 'text',
'string_regexp' => '/^[a-z0-9\._]+$/i',
'default' => '.priv',
'save_method' => 'storeSettingField',
),
'dkim_domains' => array(
'label' => $lng['dkim']['dkim_domains'],
'advanced_mode' => true
],
'dkim_dkim_domains' => [
'label' => lng('dkim.dkim_domains'),
'settinggroup' => 'dkim',
'varname' => 'dkim_domains',
'type' => 'string',
'type' => 'text',
'string_regexp' => '/^[a-z0-9\._]+$/i',
'default' => 'domains',
'save_method' => 'storeSettingField',
),
'dkim_dkimkeys' => array(
'label' => $lng['dkim']['dkim_dkimkeys'],
'save_method' => 'storeSettingField'
],
'dkim_dkim_dkimkeys' => [
'label' => lng('dkim.dkim_dkimkeys'),
'settinggroup' => 'dkim',
'varname' => 'dkim_dkimkeys',
'type' => 'string',
'type' => 'text',
'string_regexp' => '/^[a-z0-9\._]+$/i',
'default' => 'dkim-keys.conf',
'save_method' => 'storeSettingField',
),
'dkim_algorithm' => array(
'label' => $lng['dkim']['dkim_algorithm'],
'save_method' => 'storeSettingField'
],
'dkim_dkim_algorithm' => [
'label' => lng('dkim.dkim_algorithm'),
'settinggroup' => 'dkim',
'varname' => 'dkim_algorithm',
'type' => 'option',
'type' => 'select',
'default' => 'all',
'option_mode' => 'multiple',
'option_options' => array('all' => 'All', 'sha1' => 'SHA1', 'sha256' => 'SHA256'),
'select_mode' => 'multiple',
'select_var' => [
'all' => 'All',
'sha1' => 'SHA1',
'sha256' => 'SHA256'
],
'save_method' => 'storeSettingFieldInsertBindTask',
),
'dkim_servicetype' => array(
'label' => $lng['dkim']['dkim_servicetype'],
'advanced_mode' => true
],
'dkim_dkim_servicetype' => [
'label' => lng('dkim.dkim_servicetype'),
'settinggroup' => 'dkim',
'varname' => 'dkim_servicetype',
'type' => 'option',
'type' => 'select',
'default' => '0',
'option_mode' => 'one',
'option_options' => array('0' => 'All', '1' => 'E-Mail'),
'select_var' => [
'0' => 'All',
'1' => 'E-Mail'
],
'save_method' => 'storeSettingFieldInsertBindTask',
),
'dkim_keylength' => array(
'label' => array(
'title' => $lng['dkim']['dkim_keylength']['title'],
'description' => sprintf($lng['dkim']['dkim_keylength']['description'], Settings::Get('dkim.dkim_prefix'))
),
'advanced_mode' => true
],
'dkim_dkim_keylength' => [
'label' => [
'title' => lng('dkim.dkim_keylength.title'),
'description' => lng('dkim.dkim_keylength.description', [Settings::Get('dkim.dkim_prefix')])
],
'settinggroup' => 'dkim',
'varname' => 'dkim_keylength',
'type' => 'option',
'type' => 'select',
'default' => '1024',
'option_mode' => 'one',
'option_options' => array('1024' => '1024 Bit', '2048' => '2048 Bit'),
'save_method' => 'storeSettingFieldInsertBindTask',
),
'dkim_notes' => array(
'label' => $lng['dkim']['dkim_notes'],
'select_var' => [
'1024' => '1024 Bit',
'2048' => '2048 Bit'
],
'save_method' => 'storeSettingFieldInsertBindTask'
],
'dkim_dkim_notes' => [
'label' => lng('dkim.dkim_notes'),
'settinggroup' => 'dkim',
'varname' => 'dkim_notes',
'type' => 'string',
'type' => 'text',
'string_regexp' => '/^[a-z0-9\._]+$/i',
'default' => '',
'save_method' => 'storeSettingFieldInsertBindTask',
),
'dkim_add_adsp' => array(
'label' => $lng['dkim']['dkim_add_adsp'],
'settinggroup' => 'dkim',
'varname' => 'dkim_add_adsp',
'type' => 'bool',
'default' => true,
'save_method' => 'storeSettingFieldInsertBindTask',
),
'dkim_add_adsppolicy' => array(
'label' => $lng['dkim']['dkim_add_adsppolicy'],
'settinggroup' => 'dkim',
'varname' => 'dkim_add_adsppolicy',
'type' => 'option',
'default' => '1',
'option_mode' => 'one',
'option_options' => array('0' => 'Unknown', '1' => 'All', '2' => 'Discardable'),
'save_method' => 'storeSettingFieldInsertBindTask',
),
'dkimrestart_command' => array(
'label' => $lng['dkim']['dkimrestart_command'],
'advanced_mode' => true
],
'dkim_dkimrestart_command' => [
'label' => lng('dkim.dkimrestart_command'),
'settinggroup' => 'dkim',
'varname' => 'dkimrestart_command',
'type' => 'string',
'type' => 'text',
'string_regexp' => '/^[a-z0-9\/\._\- ]+$/i',
'default' => '/etc/init.d/dkim-filter restart',
'save_method' => 'storeSettingField',
),
),
),
),
);
?>
'save_method' => 'storeSettingField'
]
]
]
]
];

View File

@@ -4,42 +4,49 @@
* This file is part of the Froxlor project.
* Copyright (c) 2010 the Froxlor Team (see authors).
*
* For the full copyright and license information, please view the COPYING
* file that was distributed with this source code. You can also view the
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* @copyright (c) the authors
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Settings
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, you can also view it online at
* https://files.froxlor.org/misc/COPYING.txt
*
* @copyright the authors
* @author Froxlor team <team@froxlor.org>
* @license https://files.froxlor.org/misc/COPYING.txt GPLv2
*/
return array(
'groups' => array(
'spf' => array(
'title' => $lng['admin']['spfsettings'],
'fields' => array(
'spf_enabled' => array(
'label' => $lng['spf']['use_spf'],
return [
'groups' => [
'spf' => [
'title' => lng('admin.spfsettings'),
'icon' => 'fa-solid fa-clipboard-check',
'fields' => [
'spf_use_spf' => [
'label' => lng('spf.use_spf'),
'settinggroup' => 'spf',
'varname' => 'use_spf',
'type' => 'bool',
'type' => 'checkbox',
'default' => false,
'save_method' => 'storeSettingField',
'overview_option' => true
),
'spf_entry' => array(
'label' => $lng['spf']['spf_entry'],
],
'spf_spf_entry' => [
'label' => lng('spf.spf_entry'),
'settinggroup' => 'spf',
'varname' => 'spf_entry',
'type' => 'string',
'default' => '@ IN TXT "v=spf1 a mx -all"',
'type' => 'text',
'default' => '"v=spf1 a mx -all"',
'save_method' => 'storeSettingField'
)
)
)
)
);
?>
]
]
]
]
];

View File

@@ -1,144 +0,0 @@
<?php
/**
* This file is part of the Froxlor project.
* Copyright (c) 2003-2009 the SysCP Team (see authors).
* Copyright (c) 2010 the Froxlor Team (see authors).
*
* For the full copyright and license information, please view the COPYING
* file that was distributed with this source code. You can also view the
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
*
* @copyright (c) the authors
* @author Florian Lippert <flo@syscp.org> (2003-2009)
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Settings
*
*/
return array(
'groups' => array(
'ticket' => array(
'title' => $lng['admin']['ticketsettings'],
'fields' => array(
'ticket_enabled' => array(
'label' => $lng['serversettings']['ticket']['enable'],
'settinggroup' => 'ticket',
'varname' => 'enabled',
'type' => 'bool',
'default' => false,
'cronmodule' => 'froxlor/ticket',
'save_method' => 'storeSettingField',
'overview_option' => true
),
'ticket_noreply_email' => array(
'label' => $lng['serversettings']['ticket']['noreply_email'],
'settinggroup' => 'ticket',
'varname' => 'noreply_email',
'type' => 'string',
'string_type' => 'mail',
'default' => '',
'save_method' => 'storeSettingField',
),
'ticket_noreply_name' => array(
'label' => $lng['serversettings']['ticket']['noreply_name'],
'settinggroup' => 'ticket',
'varname' => 'noreply_name',
'type' => 'string',
'default' => '',
'save_method' => 'storeSettingField',
),
'ticket_reset_cycle' => array(
'label' => $lng['serversettings']['ticket']['reset_cycle'],
'settinggroup' => 'ticket',
'varname' => 'reset_cycle',
'type' => 'option',
'default' => 1,
'option_mode' => 'one',
'option_options' => array(0 => html_entity_decode($lng['admin']['tickets']['daily']), 1 => html_entity_decode($lng['admin']['tickets']['weekly']), 2 => html_entity_decode($lng['admin']['tickets']['monthly']), 3 => html_entity_decode($lng['admin']['tickets']['yearly'])),
'save_method' => 'storeSettingField',
'plausibility_check_method' => 'setCycleOfCronjob',
),
'ticket_concurrently_open' => array(
'label' => $lng['serversettings']['ticket']['concurrentlyopen'],
'settinggroup' => 'ticket',
'varname' => 'concurrently_open',
'type' => 'int',
'default' => 5,
'save_method' => 'storeSettingField',
),
'ticket_archiving_days' => array(
'label' => $lng['serversettings']['ticket']['archiving_days'],
'settinggroup' => 'ticket',
'varname' => 'archiving_days',
'type' => 'int',
'int_min' => 1,
'int_max' => 99,
'default' => 5,
'save_method' => 'storeSettingField',
),
'ticket_worktime_all' => array(
'label' => $lng['serversettings']['ticket']['worktime_all'],
'settinggroup' => 'ticket',
'varname' => 'worktime_all',
'type' => 'bool',
'default' => false,
'save_method' => 'storeSettingField',
),
'ticket_worktime_begin' => array(
'label' => $lng['serversettings']['ticket']['worktime_begin'],
'settinggroup' => 'ticket',
'varname' => 'worktime_begin',
'type' => 'string',
'string_regexp' => '/^[012][0-9]:[0-6][0-9]$/',
'default' => '',
'save_method' => 'storeSettingField',
),
'ticket_worktime_end' => array(
'label' => $lng['serversettings']['ticket']['worktime_end'],
'settinggroup' => 'ticket',
'varname' => 'worktime_end',
'type' => 'string',
'string_regexp' => '/^[012][0-9]:[0-6][0-9]$/',
'default' => '',
'save_method' => 'storeSettingField',
),
'ticket_worktime_sat' => array(
'label' => $lng['serversettings']['ticket']['worktime_sat'],
'settinggroup' => 'ticket',
'varname' => 'worktime_sat',
'type' => 'bool',
'default' => false,
'save_method' => 'storeSettingField',
),
'ticket_worktime_sun' => array(
'label' => $lng['serversettings']['ticket']['worktime_sun'],
'settinggroup' => 'ticket',
'varname' => 'worktime_sun',
'type' => 'bool',
'default' => false,
'save_method' => 'storeSettingField',
),
'system_last_archive_run' => array(
'settinggroup' => 'system',
'varname' => 'last_archive_run',
'type' => 'hidden',
'default' => '',
),
'ticket_default_priority' => array(
'label' => $lng['serversettings']['ticket']['default_priority'],
'settinggroup' => 'ticket',
'varname' => 'default_priority',
'type' => 'option',
'default' => 2,
'option_mode' => 'one',
'option_options' => array(1 => $lng['ticket']['high'], 2 => $lng['ticket']['normal'], 3 => $lng['ticket']['low']),
'save_method' => 'storeSettingField',
),
),
),
)
);
?>

View File

@@ -2,69 +2,115 @@
/**
* This file is part of the Froxlor project.
* Copyright (c) 2003-2009 the SysCP Team (see authors).
* Copyright (c) 2010 the Froxlor Team (see authors).
*
* For the full copyright and license information, please view the COPYING
* file that was distributed with this source code. You can also view the
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* @copyright (c) the authors
* @author Florian Lippert <flo@syscp.org> (2003-2009)
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Settings
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, you can also view it online at
* https://files.froxlor.org/misc/COPYING.txt
*
* @copyright the authors
* @author Froxlor team <team@froxlor.org>
* @license https://files.froxlor.org/misc/COPYING.txt GPLv2
*/
return array(
'groups' => array(
'security' => array(
'title' => $lng['admin']['security_settings'],
'fields' => array(
'panel_unix_names' => array(
'label' => $lng['serversettings']['unix_names'],
use Froxlor\Settings;
return [
'groups' => [
'security' => [
'title' => lng('admin.security_settings'),
'icon' => 'fa-solid fa-user-lock',
'fields' => [
'panel_unix_names' => [
'label' => lng('serversettings.unix_names'),
'settinggroup' => 'panel',
'varname' => 'unix_names',
'type' => 'bool',
'type' => 'checkbox',
'default' => true,
'save_method' => 'storeSettingField',
),
'system_mailpwcleartext' => array(
'label' => $lng['serversettings']['mailpwcleartext'],
'save_method' => 'storeSettingField'
],
'system_mailpwcleartext' => [
'label' => lng('serversettings.mailpwcleartext'),
'settinggroup' => 'system',
'varname' => 'mailpwcleartext',
'type' => 'bool',
'default' => true,
'type' => 'checkbox',
'default' => false,
'save_method' => 'storeSettingField',
),
'system_passwordcryptfunc' => array(
'label' => $lng['serversettings']['passwordcryptfunc'],
'advanced_mode' => true
],
'system_passwordcryptfunc' => [
'label' => lng('serversettings.passwordcryptfunc'),
'settinggroup' => 'system',
'varname' => 'passwordcryptfunc',
'type' => 'option',
'default' => 0,
'option_mode' => 'one',
'option_options' => array(0 => $lng['serversettings']['systemdefault'], 1 => 'MD5', 2 => 'BLOWFISH', 3 => 'SHA-256', 4 => 'SHA-512'),
'type' => 'select',
'default' => PASSWORD_DEFAULT,
'option_options_method' => [
'\\Froxlor\\System\\Crypt',
'getAvailablePasswordHashes'
],
'save_method' => 'storeSettingField',
),
'system_allow_error_report_admin' => array(
'label' => $lng['serversettings']['allow_error_report_admin'],
'advanced_mode' => true
],
'system_allow_error_report_admin' => [
'label' => lng('serversettings.allow_error_report_admin'),
'settinggroup' => 'system',
'varname' => 'allow_error_report_admin',
'type' => 'bool',
'type' => 'checkbox',
'default' => false,
'save_method' => 'storeSettingField',
),
'system_allow_error_report_customer' => array(
'label' => $lng['serversettings']['allow_error_report_customer'],
'save_method' => 'storeSettingField'
],
'system_allow_error_report_customer' => [
'label' => lng('serversettings.allow_error_report_customer'),
'settinggroup' => 'system',
'varname' => 'allow_error_report_customer',
'type' => 'bool',
'type' => 'checkbox',
'default' => false,
'save_method' => 'storeSettingField'
],
'system_allow_customer_shell' => [
'label' => lng('serversettings.allow_allow_customer_shell'),
'settinggroup' => 'system',
'varname' => 'allow_customer_shell',
'type' => 'checkbox',
'default' => false,
'save_method' => 'storeSettingField',
)
)
)
)
);
'advanced_mode' => true
],
'system_available_shells' => [
'label' => lng('serversettings.available_shells'),
'settinggroup' => 'system',
'varname' => 'available_shells',
'type' => 'text',
'string_emptyallowed' => true,
'default' => '',
'save_method' => 'storeSettingField',
'advanced_mode' => true
],
'system_froxlorusergroup' => [
'label' => lng('serversettings.froxlorusergroup'),
'settinggroup' => 'system',
'varname' => 'froxlorusergroup',
'type' => 'text',
'default' => '',
'save_method' => 'storeSettingField',
'plausibility_check_method' => [
'\\Froxlor\\Validate\\Check',
'checkLocalGroup'
],
'visible' => Settings::Get('system.nssextrausers'),
'advanced_mode' => true
],
]
]
]
];

View File

@@ -1,60 +1,69 @@
<?php
/**
* This file is part of the Froxlor project.
* Copyright (c) 2011- the Froxlor Team (see authors).
* Copyright (c) 2010 the Froxlor Team (see authors).
*
* For the full copyright and license information, please view the COPYING
* file that was distributed with this source code. You can also view the
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* @copyright (c) the authors
* @author Froxlor team <team@froxlor.org> (2011-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Settings
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, you can also view it online at
* https://files.froxlor.org/misc/COPYING.txt
*
* @copyright the authors
* @author Froxlor team <team@froxlor.org>
* @license https://files.froxlor.org/misc/COPYING.txt GPLv2
*/
return array(
'groups' => array(
'diskquota' => array(
'title' => $lng['diskquota'],
'fields' => array(
'diskquota_enabled' => array(
'label' => $lng['serversettings']['diskquota_enabled'],
return [
'groups' => [
'diskquota' => [
'title' => lng('diskquota'),
'icon' => 'fa-solid fa-sliders',
'advanced_mode' => true,
'fields' => [
'system_diskquota_enabled' => [
'label' => lng('serversettings.diskquota_enabled'),
'settinggroup' => 'system',
'varname' => 'diskquota_enabled',
'type' => 'bool',
'type' => 'checkbox',
'default' => false,
'save_method' => 'storeSettingField',
'overview_option' => true
),
'diskquota_repquota_path' => array(
'label' => $lng['serversettings']['diskquota_repquota_path']['description'],
],
'system_diskquota_repquota_path' => [
'label' => lng('serversettings.diskquota_repquota_path.description'),
'settinggroup' => 'system',
'varname' => 'diskquota_repquota_path',
'type' => 'string',
'type' => 'text',
'default' => '/usr/sbin/repquota',
'save_method' => 'storeSettingField',
),
'diskquota_quotatool_path' => array(
'label' => $lng['serversettings']['diskquota_quotatool_path']['description'],
'save_method' => 'storeSettingField'
],
'system_diskquota_quotatool_path' => [
'label' => lng('serversettings.diskquota_quotatool_path.description'),
'settinggroup' => 'system',
'varname' => 'diskquota_quotatool_path',
'type' => 'string',
'type' => 'text',
'default' => '/usr/bin/quotatool',
'save_method' => 'storeSettingField',
),
'diskquota_customer_partition' => array(
'label' => $lng['serversettings']['diskquota_customer_partition']['description'],
'save_method' => 'storeSettingField'
],
'system_diskquota_customer_partition' => [
'label' => lng('serversettings.diskquota_customer_partition.description'),
'settinggroup' => 'system',
'varname' => 'diskquota_customer_partition',
'type' => 'string',
'type' => 'text',
'default' => '/dev/root',
'save_method' => 'storeSettingField',
),
),
),
),
);
?>
'save_method' => 'storeSettingField'
]
]
]
]
];

View File

@@ -2,850 +2,196 @@
/**
* This file is part of the Froxlor project.
* Copyright (c) 2003-2009 the SysCP Team (see authors).
* Copyright (c) 2010 the Froxlor Team (see authors).
*
* For the full copyright and license information, please view the COPYING
* file that was distributed with this source code. You can also view the
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* @copyright (c) the authors
* @author Florian Lippert <flo@syscp.org> (2003-2009)
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Panel
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, you can also view it online at
* https://files.froxlor.org/misc/COPYING.txt
*
* @copyright the authors
* @author Froxlor team <team@froxlor.org>
* @license https://files.froxlor.org/misc/COPYING.txt GPLv2
*/
define('AREA', 'admin');
require './lib/init.php';
const AREA = 'admin';
require __DIR__ . '/lib/init.php';
if (isset($_POST['id'])) {
$id = intval($_POST['id']);
} elseif(isset($_GET['id'])) {
$id = intval($_GET['id']);
}
use Froxlor\Api\Commands\Admins;
use Froxlor\CurrentUser;
use Froxlor\Database\Database;
use Froxlor\FroxlorLogger;
use Froxlor\PhpHelper;
use Froxlor\Settings;
use Froxlor\UI\Collection;
use Froxlor\UI\HTML;
use Froxlor\UI\Listing;
use Froxlor\UI\Panel\UI;
use Froxlor\UI\Request;
use Froxlor\UI\Response;
if ($page == 'admins'
&& $userinfo['change_serversettings'] == '1'
) {
$id = (int)Request::any('id');
if (($page == 'admins' || $page == 'overview') && $userinfo['change_serversettings'] == '1') {
if ($action == '') {
$log->logAction(FroxlorLogger::ADM_ACTION, LOG_NOTICE, "viewed admin_admins");
$log->logAction(ADM_ACTION, LOG_NOTICE, "viewed admin_admins");
$fields = array(
'loginname' => $lng['login']['username'],
'name' => $lng['customer']['name'],
'diskspace' => $lng['customer']['diskspace'],
'diskspace_used' => $lng['customer']['diskspace'] . ' (' . $lng['panel']['used'] . ')',
'traffic' => $lng['customer']['traffic'],
'traffic_used' => $lng['customer']['traffic'] . ' (' . $lng['panel']['used'] . ')',
'deactivated' => $lng['admin']['deactivated']
);
$paging = new paging($userinfo, TABLE_PANEL_ADMINS, $fields);
$admins = '';
$result_stmt = Database::query("SELECT * FROM `" . TABLE_PANEL_ADMINS . "` " . $paging->getSqlWhere(false) . " " . $paging->getSqlOrderBy() . " " . $paging->getSqlLimit());
$numrows_admins = Database::num_rows();
$paging->setEntries($numrows_admins);
$sortcode = $paging->getHtmlSortCode($lng, true);
$arrowcode = $paging->getHtmlArrowCode($filename . '?page=' . $page . '&s=' . $s);
$searchcode = $paging->getHtmlSearchCode($lng);
$pagingcode = $paging->getHtmlPagingCode($filename . '?page=' . $page . '&s=' . $s);
$i = 0;
$count = 0;
$dec_places = Settings::Get('panel.decimal_places');
while ($row = $result_stmt->fetch(PDO::FETCH_ASSOC)) {
if ($paging->checkDisplay($i)) {
$row['traffic_used'] = round($row['traffic_used'] / (1024 * 1024), $dec_places);
$row['traffic'] = round($row['traffic'] / (1024 * 1024), $dec_places);
$row['diskspace_used'] = round($row['diskspace_used'] / 1024, $dec_places);
$row['diskspace'] = round($row['diskspace'] / 1024, $dec_places);
// percent-values for progressbar
// For Disk usage
if ($row['diskspace'] > 0) {
$disk_percent = round(($row['diskspace_used']*100)/$row['diskspace'], 2);
$disk_doublepercent = round($disk_percent*2, 2);
} else {
$disk_percent = 0;
$disk_doublepercent = 0;
}
// For Traffic usage
if ($row['traffic'] > 0) {
$traffic_percent = round(($row['traffic_used']*100)/$row['traffic'], 2);
$traffic_doublepercent = round($traffic_percent*2, 2);
} else {
$traffic_percent = 0;
$traffic_doublepercent = 0;
try {
$admin_list_data = include_once dirname(__FILE__) . '/lib/tablelisting/admin/tablelisting.admins.php';
$collection = (new Collection(Admins::class, $userinfo))
->withPagination($admin_list_data['admin_list']['columns'], $admin_list_data['admin_list']['default_sorting']);
} catch (Exception $e) {
Response::dynamicError($e->getMessage());
}
$row = str_replace_array('-1', 'UL', $row, 'customers domains diskspace traffic mysqls emails email_accounts email_forwarders email_quota ftps subdomains tickets');
$row = htmlentities_array($row);
eval("\$admins.=\"" . getTemplate("admins/admins_admin") . "\";");
$count++;
}
$i++;
}
$admincount = $numrows_admins;
eval("echo \"" . getTemplate("admins/admins") . "\";");
UI::view('user/table.html.twig', [
'listing' => Listing::format($collection, $admin_list_data, 'admin_list'),
'actions_links' => [
[
'href' => $linker->getLink(['section' => 'admins', 'page' => $page, 'action' => 'add']),
'label' => lng('admin.admin_add')
]
]
]);
} elseif ($action == 'su') {
$result_stmt = Database::prepare("
SELECT * FROM `" . TABLE_PANEL_ADMINS . "` WHERE `adminid` = :adminid
");
$result = Database::pexecute_first($result_stmt, array('adminid' => $id));
try {
$json_result = Admins::getLocal($userinfo, [
'id' => $id
])->get();
} catch (Exception $e) {
Response::dynamicError($e->getMessage());
}
$result = json_decode($json_result, true)['data'];
$destination_admin = $result['loginname'];
if ($destination_admin != ''
&& $result['adminid'] != $userinfo['userid']
) {
$result_stmt = Database::prepare("
SELECT * FROM `" . TABLE_PANEL_SESSIONS . "` WHERE `userid` = :userid
");
$result = Database::pexecute_first($result_stmt, array('userid' => $userinfo['userid']));
if ($destination_admin != '' && $result['adminid'] != $userinfo['userid']) {
$result['switched_user'] = CurrentUser::getData();
$result['adminsession'] = 1;
$result['userid'] = $result['adminid'];
session_regenerate_id(true);
CurrentUser::setData($result);
$s = md5(uniqid(microtime(), 1));
$ins_stmt = Database::prepare("
INSERT INTO `" . TABLE_PANEL_SESSIONS . "` SET
`hash` = :hash, `userid` = :userid, `ipaddress` = :ip,
`useragent` = :ua, `lastactivity` = :la,
`language` = :lang, `adminsession` = '1'
");
$ins_data = array(
'hash' => $s,
'userid' => $id,
'ip' => $result['ipaddress'],
'ua' => $result['useragent'],
'la' => time(),
'lang' => $result['language']
$log->logAction(
FroxlorLogger::ADM_ACTION,
LOG_INFO,
"switched adminuser and is now '" . $destination_admin . "'"
);
Database::pexecute($ins_stmt, $ins_data);
$log->logAction(ADM_ACTION, LOG_INFO, "switched adminuser and is now '" . $destination_admin . "'");
redirectTo('admin_index.php', array('s' => $s));
Response::redirectTo('admin_index.php');
} else {
redirectTo('index.php', array('action' => 'login'));
Response::redirectTo('index.php', [
'action' => 'login'
]);
}
} elseif ($action == 'delete'
&& $id != 0
) {
$result_stmt = Database::prepare("
SELECT * FROM `" . TABLE_PANEL_ADMINS . "` WHERE `adminid` = :adminid
");
$result = Database::pexecute_first($result_stmt, array('adminid' => $id));
} elseif ($action == 'delete' && $id != 0) {
try {
$json_result = Admins::getLocal($userinfo, [
'id' => $id
])->get();
} catch (Exception $e) {
Response::dynamicError($e->getMessage());
}
$result = json_decode($json_result, true)['data'];
if ($result['loginname'] != '') {
if ($result['adminid'] == $userinfo['userid']) {
standard_error('youcantdeleteyourself');
exit;
Response::standardError('youcantdeleteyourself');
}
if (isset($_POST['send'])
&& $_POST['send'] == 'send'
) {
$del_stmt = Database::prepare("
DELETE FROM `" . TABLE_PANEL_ADMINS . "` WHERE `adminid` = :adminid
");
Database::pexecute($del_stmt, array('adminid' => $id));
$del_stmt = Database::prepare("
DELETE FROM `" . TABLE_PANEL_TRAFFIC_ADMINS . "` WHERE `adminid` = :adminid
");
Database::pexecute($del_stmt, array('adminid' => $id));
$upd_stmt = Database::prepare("
UPDATE `" . TABLE_PANEL_CUSTOMERS . "` SET
`adminid` = :userid WHERE `adminid` = :adminid
");
Database::pexecute($upd_stmt, array('userid' => $userinfo['userid'], 'adminid' => $id));
$upd_stmt = Database::prepare("
UPDATE `" . TABLE_PANEL_DOMAINS . "` SET
`adminid` = :userid WHERE `adminid` = :adminid
");
Database::pexecute($upd_stmt, array('userid' => $userinfo['userid'], 'adminid' => $id));
$log->logAction(ADM_ACTION, LOG_INFO, "deleted admin '" . $result['loginname'] . "'");
updateCounters();
redirectTo($filename, array('page' => $page, 's' => $s));
if (isset($_POST['send']) && $_POST['send'] == 'send') {
Admins::getLocal($userinfo, [
'id' => $id
])->delete();
Response::redirectTo($filename, [
'page' => $page
]);
} else {
ask_yesno('admin_admin_reallydelete', $filename, array('id' => $id, 'page' => $page, 'action' => $action), $result['loginname']);
HTML::askYesNo('admin_admin_reallydelete', $filename, [
'id' => $id,
'page' => $page,
'action' => $action
], $result['loginname']);
}
}
} elseif ($action == 'add') {
if (isset($_POST['send'])
&& $_POST['send'] == 'send'
) {
$name = validate($_POST['name'], 'name');
$email = $idna_convert->encode(validate($_POST['email'], 'email'));
$loginname = validate($_POST['loginname'], 'loginname');
$password = validate($_POST['admin_password'], 'password');
$password = validatePassword($password);
$def_language = validate($_POST['def_language'], 'default language');
$customers = intval_ressource($_POST['customers']);
if (isset($_POST['customers_ul'])) {
$customers = -1;
}
$domains = intval_ressource($_POST['domains']);
if (isset($_POST['domains_ul'])) {
$domains = -1;
}
$subdomains = intval_ressource($_POST['subdomains']);
if (isset($_POST['subdomains_ul'])) {
$subdomains = -1;
}
$emails = intval_ressource($_POST['emails']);
if (isset($_POST['emails_ul'])) {
$emails = -1;
}
$email_accounts = intval_ressource($_POST['email_accounts']);
if (isset($_POST['email_accounts_ul'])) {
$email_accounts = -1;
}
$email_forwarders = intval_ressource($_POST['email_forwarders']);
if (isset($_POST['email_forwarders_ul'])) {
$email_forwarders = -1;
}
if (Settings::Get('system.mail_quota_enabled') == '1') {
$email_quota = validate($_POST['email_quota'], 'email_quota', '/^\d+$/', 'vmailquotawrong', array('0', ''));
if (isset($_POST['email_quota_ul'])) {
$email_quota = -1;
if (isset($_POST['send']) && $_POST['send'] == 'send') {
try {
Admins::getLocal($userinfo, $_POST)->add();
} catch (Exception $e) {
Response::dynamicError($e->getMessage());
}
Response::redirectTo($filename, [
'page' => $page
]);
} else {
$email_quota = -1;
}
$ftps = intval_ressource($_POST['ftps']);
if (isset($_POST['ftps_ul'])) {
$ftps = -1;
}
if (Settings::Get('ticket.enabled') == 1) {
$tickets = intval_ressource($_POST['tickets']);
if (isset($_POST['tickets_ul'])) {
$tickets = -1;
}
} else {
$tickets = 0;
}
$mysqls = intval_ressource($_POST['mysqls']);
if (isset($_POST['mysqls_ul'])) {
$mysqls = -1;
}
$customers_see_all = 0;
if (isset($_POST['customers_see_all'])) {
$customers_see_all = intval($_POST['customers_see_all']);
}
$domains_see_all = 0;
if (isset($_POST['domains_see_all'])) {
$domains_see_all = intval($_POST['domains_see_all']);
}
$caneditphpsettings = 0;
if (isset($_POST['caneditphpsettings'])) {
$caneditphpsettings = intval($_POST['caneditphpsettings']);
}
$change_serversettings = 0;
if (isset($_POST['change_serversettings'])) {
$change_serversettings = intval($_POST['change_serversettings']);
}
$diskspace = intval_ressource($_POST['diskspace']);
if (isset($_POST['diskspace_ul'])) {
$diskspace = -1;
}
$traffic = doubleval_ressource($_POST['traffic']);
if (isset($_POST['traffic_ul'])) {
$traffic = -1;
}
$tickets_see_all = 0;
if (isset($_POST['tickets_see_all'])) {
$tickets_see_all = intval($_POST['tickets_see_all']);
}
$diskspace = $diskspace * 1024;
$traffic = $traffic * 1024 * 1024;
$ipaddress = intval_ressource($_POST['ipaddress']);
// Check if the account already exists
$loginname_check_stmt = Database::prepare("
SELECT `loginname` FROM `" . TABLE_PANEL_CUSTOMERS . "` WHERE `loginname` = :login
");
$loginname_check = Database::pexecute_first($loginname_check_stmt, array('login' => $loginname));
$loginname_check_admin_stmt = Database::prepare("
SELECT `loginname` FROM `" . TABLE_PANEL_ADMINS . "` WHERE `loginname` = :login
");
$loginname_check_admin = Database::pexecute_first($loginname_check_admin_stmt, array('login' => $loginname));
if ($loginname == '') {
standard_error(array('stringisempty', 'myloginname'));
}
elseif (strtolower($loginname_check['loginname']) == strtolower($loginname)
|| strtolower($loginname_check_admin['loginname']) == strtolower($loginname)
) {
standard_error('loginnameexists', $loginname);
}
// Accounts which match systemaccounts are not allowed, filtering them
elseif (preg_match('/^' . preg_quote(Settings::Get('customer.accountprefix'), '/') . '([0-9]+)/', $loginname)) {
standard_error('loginnameissystemaccount', Settings::Get('customer.accountprefix'));
}
elseif (!validateUsername($loginname)) {
standard_error('loginnameiswrong', $loginname);
}
elseif ($name == '') {
standard_error(array('stringisempty', 'myname'));
}
elseif ($email == '') {
standard_error(array('stringisempty', 'emailadd'));
}
elseif ($password == '') {
standard_error(array('stringisempty', 'mypassword'));
}
elseif (!validateEmail($email)) {
standard_error('emailiswrong', $email);
} else {
if ($customers_see_all != '1') {
$customers_see_all = '0';
}
if ($domains_see_all != '1') {
$domains_see_all = '0';
}
if ($caneditphpsettings != '1') {
$caneditphpsettings = '0';
}
if ($change_serversettings != '1') {
$change_serversettings = '0';
}
if ($tickets_see_all != '1') {
$tickets_see_all = '0';
}
$_theme = Settings::Get('panel.default_theme');
$ins_data = array(
'loginname' => $loginname,
'password' => md5($password),
'name' => $name,
'email' => $email,
'lang' => $def_language,
'change_serversettings' => $change_serversettings,
'customers' => $customers,
'customers_see_all' => $customers_see_all,
'domains' => $domains,
'domains_see_all' => $domains_see_all,
'caneditphpsettings' => $caneditphpsettings,
'diskspace' => $diskspace,
'traffic' => $traffic,
'subdomains' => $subdomains,
'emails' => $emails,
'accounts' => $email_accounts,
'forwarders' => $email_forwarders,
'quota' => $email_quota,
'ftps' => $ftps,
'tickets' => $tickets,
'tickets_see_all' => $tickets_see_all,
'mysqls' => $mysqls,
'ip' => $ipaddress,
'theme' => $_theme
);
$ins_stmt = Database::prepare("
INSERT INTO `" . TABLE_PANEL_ADMINS . "` SET
`loginname` = :loginname,
`password` = :password,
`name` = :name,
`email` = :email,
`def_language` = :lang,
`change_serversettings` = :change_serversettings,
`customers` = :customers,
`customers_see_all` = :customers_see_all,
`domains` = :domains,
`domains_see_all` = :domains_see_all,
`caneditphpsettings` = :caneditphpsettings,
`diskspace` = :diskspace,
`traffic` = :traffic,
`subdomains` = :subdomains,
`emails` = :emails,
`email_accounts` = :accounts,
`email_forwarders` = :forwarders,
`email_quota` = :quota,
`ftps` = :ftps,
`tickets` = :tickets,
`tickets_see_all` = :tickets_see_all,
`mysqls` = :mysqls,
`ip` = :ip,
`theme` = :theme
");
Database::pexecute($ins_stmt, $ins_data);
$adminid = Database::lastInsertId();
$log->logAction(ADM_ACTION, LOG_INFO, "added admin '" . $loginname . "'");
redirectTo($filename, array('page' => $page, 's' => $s));
}
} else {
$language_options = '';
while (list($language_file, $language_name) = each($languages)) {
$language_options.= makeoption($language_name, $language_file, $userinfo['language'], true);
}
$ipaddress = makeoption($lng['admin']['allips'], "-1");
$ips = array();
$ipaddress = [];
$ipaddress[-1] = lng('admin.allips');
$ipsandports_stmt = Database::query("
SELECT `id`, `ip` FROM `" . TABLE_PANEL_IPSANDPORTS . "` ORDER BY `ip`, `port` ASC
SELECT `id`, `ip` FROM `" . TABLE_PANEL_IPSANDPORTS . "` GROUP BY `ip` ORDER BY `ip` ASC
");
while ($row = $ipsandports_stmt->fetch(PDO::FETCH_ASSOC)) {
if (filter_var($row['ip'], FILTER_VALIDATE_IP, FILTER_FLAG_IPV6)) {
$row['ip'] = '[' . $row['ip'] . ']';
$ipaddress[$row['id']] = $row['ip'];
}
if (!in_array($row['ip'], $ips)) {
$ipaddress.= makeoption($row['ip'], $row['id']);
$ips[] = $row['ip'];
}
}
$customers_ul = makecheckbox('customers_ul', $lng['customer']['unlimited'], '-1', false, '0', true, true);
$diskspace_ul = makecheckbox('diskspace_ul', $lng['customer']['unlimited'], '-1', false, '0', true, true);
$traffic_ul = makecheckbox('traffic_ul', $lng['customer']['unlimited'], '-1', false, '0', true, true);
$domains_ul = makecheckbox('domains_ul', $lng['customer']['unlimited'], '-1', false, '0', true, true);
$subdomains_ul = makecheckbox('subdomains_ul', $lng['customer']['unlimited'], '-1', false, '0', true, true);
$emails_ul = makecheckbox('emails_ul', $lng['customer']['unlimited'], '-1', false, '0', true, true);
$email_accounts_ul = makecheckbox('email_accounts_ul', $lng['customer']['unlimited'], '-1', false, '0', true, true);
$email_forwarders_ul = makecheckbox('email_forwarders_ul', $lng['customer']['unlimited'], '-1', false, '0', true, true);
$email_quota_ul = makecheckbox('email_quota_ul', $lng['customer']['unlimited'], '-1', false, '0', true, true);
$ftps_ul = makecheckbox('ftps_ul', $lng['customer']['unlimited'], '-1', false, '0', true, true);
$tickets_ul = makecheckbox('tickets_ul', $lng['customer']['unlimited'], '-1', false, '0', true, true);
$mysqls_ul = makecheckbox('mysqls_ul', $lng['customer']['unlimited'], '-1', false, '0', true, true);
$admin_add_data = include_once dirname(__FILE__) . '/lib/formfields/admin/admin/formfield.admin_add.php';
$admin_add_form = htmlform::genHTMLForm($admin_add_data);
$title = $admin_add_data['admin_add']['title'];
$image = $admin_add_data['admin_add']['image'];
eval("echo \"" . getTemplate("admins/admins_add") . "\";");
UI::view('user/form.html.twig', [
'formaction' => $linker->getLink(['section' => 'admins']),
'formdata' => $admin_add_data['admin_add']
]);
}
} elseif($action == 'edit'
&& $id != 0
) {
$result_stmt = Database::prepare("
SELECT * FROM `" . TABLE_PANEL_ADMINS . "` WHERE `adminid` = :adminid
");
$result = Database::pexecute_first($result_stmt, array('adminid' => $id));
} elseif ($action == 'edit' && $id != 0) {
try {
$json_result = Admins::getLocal($userinfo, [
'id' => $id
])->get();
} catch (Exception $e) {
Response::dynamicError($e->getMessage());
}
$result = json_decode($json_result, true)['data'];
if ($result['loginname'] != '') {
if (isset($_POST['send'])
&& $_POST['send'] == 'send'
) {
$name = validate($_POST['name'], 'name');
$email = $idna_convert->encode(validate($_POST['email'], 'email'));
if ($result['adminid'] == $userinfo['userid']) {
$password = '';
$def_language = $result['def_language'];
$deactivated = $result['deactivated'];
$customers = $result['customers'];
$domains = $result['domains'];
$subdomains = $result['subdomains'];
$emails = $result['emails'];
$email_accounts = $result['email_accounts'];
$email_forwarders = $result['email_forwarders'];
$email_quota = $result['email_quota'];
$ftps = $result['ftps'];
$tickets = $result['tickets'];
$mysqls = $result['mysqls'];
$tickets_see_all = $result['tickets_see_all'];
$customers_see_all = $result['customers_see_all'];
$domains_see_all = $result['domains_see_all'];
$caneditphpsettings = $result['caneditphpsettings'];
$change_serversettings = $result['change_serversettings'];
$diskspace = $result['diskspace'];
$traffic = $result['traffic'];
$ipaddress = $result['ip'];
if (isset($_POST['send']) && $_POST['send'] == 'send') {
try {
Admins::getLocal($userinfo, $_POST)->update();
} catch (Exception $e) {
Response::dynamicError($e->getMessage());
}
Response::redirectTo($filename, [
'page' => $page
]);
} else {
$password = validate($_POST['admin_password'], 'new password');
$def_language = validate($_POST['def_language'], 'default language');
$deactivated = isset($_POST['deactivated']) ? 1 : 0;
$customers = intval_ressource($_POST['customers']);
if (isset($_POST['customers_ul'])) {
$customers = -1;
}
$domains = intval_ressource($_POST['domains']);
if (isset($_POST['domains_ul'])) {
$domains = -1;
}
$subdomains = intval_ressource($_POST['subdomains']);
if (isset($_POST['subdomains_ul'])) {
$subdomains = -1;
}
$emails = intval_ressource($_POST['emails']);
if (isset($_POST['emails_ul'])) {
$emails = -1;
}
$email_accounts = intval_ressource($_POST['email_accounts']);
if (isset($_POST['email_accounts_ul'])) {
$email_accounts = -1;
}
$email_forwarders = intval_ressource($_POST['email_forwarders']);
if (isset($_POST['email_forwarders_ul'])) {
$email_forwarders = -1;
}
if (Settings::Get('system.mail_quota_enabled') == '1') {
$email_quota = validate($_POST['email_quota'], 'email_quota', '/^\d+$/', 'vmailquotawrong', array('0', ''));
if (isset($_POST['email_quota_ul'])) {
$email_quota = -1;
}
} else {
$email_quota = -1;
}
$ftps = intval_ressource($_POST['ftps']);
if (isset($_POST['ftps_ul'])) {
$ftps = -1;
}
if (Settings::Get('ticket.enabled') == 1) {
$tickets = intval_ressource($_POST['tickets']);
if (isset($_POST['tickets_ul'])) {
$tickets = -1;
}
} else {
$tickets = 0;
}
$mysqls = intval_ressource($_POST['mysqls']);
if (isset($_POST['mysqls_ul'])) {
$mysqls = -1;
}
$customers_see_all = 0;
if (isset($_POST['customers_see_all'])) {
$customers_see_all = intval($_POST['customers_see_all']);
}
$domains_see_all = 0;
if (isset($_POST['domains_see_all'])) {
$domains_see_all = intval($_POST['domains_see_all']);
}
$caneditphpsettings = 0;
if (isset($_POST['caneditphpsettings'])) {
$caneditphpsettings = intval($_POST['caneditphpsettings']);
}
$change_serversettings = 0;
if (isset($_POST['change_serversettings'])) {
$change_serversettings = isset($_POST['change_serversettings']) ? 1 : 0;
}
$tickets_see_all = 0;
if (isset($_POST['tickets_see_all'])) {
$tickets_see_all = intval($_POST['tickets_see_all']);
}
$diskspace = intval($_POST['diskspace']);
if (isset($_POST['diskspace_ul'])) {
$diskspace = -1;
}
$traffic = doubleval_ressource($_POST['traffic']);
if (isset($_POST['traffic_ul'])) {
$traffic = -1;
}
$diskspace = $diskspace * 1024;
$traffic = $traffic * 1024 * 1024;
$ipaddress = intval_ressource($_POST['ipaddress']);
}
if ($name == '') {
standard_error(array('stringisempty', 'myname'));
} elseif($email == '') {
standard_error(array('stringisempty', 'emailadd'));
} elseif(!validateEmail($email)) {
standard_error('emailiswrong', $email);
} else {
if ($password != '') {
$password = validatePassword($password);
$password = md5($password);
} else {
$password = $result['password'];
}
if ($deactivated != '1') {
$deactivated = '0';
}
if ($customers_see_all != '1') {
$customers_see_all = '0';
}
if ($domains_see_all != '1') {
$domains_see_all = '0';
}
if ($caneditphpsettings != '1') {
$caneditphpsettings = '0';
}
if ($change_serversettings != '1') {
$change_serversettings = '0';
}
if ($tickets_see_all != '1') {
$tickets_see_all = '0';
}
// check if a resource was set to something lower
// than actually used by the admin/reseller
$res_warning = "";
if ($customers != $result['customers'] && $customers != -1 && $customers < $result['customers_used']) {
$res_warning .= sprintf($lng['error']['setlessthanalreadyused'], 'customers');
}
if ($domains != $result['domains'] && $domains != -1 && $domains < $result['domains_used']) {
$res_warning .= sprintf($lng['error']['setlessthanalreadyused'], 'domains');
}
if ($diskspace != $result['diskspace'] && ($diskspace / 1024) != -1 && $diskspace < $result['diskspace_used']) {
$res_warning .= sprintf($lng['error']['setlessthanalreadyused'], 'diskspace');
}
if ($traffic != $result['traffic'] && ($traffic / 1024 / 1024) != -1 && $traffic < $result['traffic_used']) {
$res_warning .= sprintf($lng['error']['setlessthanalreadyused'], 'traffic');
}
if ($emails != $result['emails'] && $emails != -1 && $emails < $result['emails_used']) {
$res_warning .= sprintf($lng['error']['setlessthanalreadyused'], 'emails');
}
if ($email_accounts != $result['email_accounts'] && $email_accounts != -1 && $email_accounts < $result['email_accounts_used']) {
$res_warning .= sprintf($lng['error']['setlessthanalreadyused'], 'email accounts');
}
if ($email_forwarders != $result['email_forwarders'] && $email_forwarders != -1 && $email_forwarders < $result['email_forwarders_used']) {
$res_warning .= sprintf($lng['error']['setlessthanalreadyused'], 'email forwarders');
}
if ($email_quota != $result['email_quota'] && $email_quota != -1 && $email_quota < $result['email_quota_used']) {
$res_warning .= sprintf($lng['error']['setlessthanalreadyused'], 'email quota');
}
if ($ftps != $result['ftps'] && $ftps != -1 && $ftps < $result['ftps_used']) {
$res_warning .= sprintf($lng['error']['setlessthanalreadyused'], 'ftps');
}
if ($tickets != $result['tickets'] && $tickets != -1 && $tickets < $result['tickets_used']) {
$res_warning .= sprintf($lng['error']['setlessthanalreadyused'], 'tickets');
}
if ($mysqls != $result['mysqls'] && $mysqls != -1 && $mysqls < $result['mysqls_used']) {
$res_warning .= sprintf($lng['error']['setlessthanalreadyused'], 'mysqls');
}
if ($res_warning != "") {
$link = '';
$error = $res_warning;
eval("echo \"" . getTemplate('misc/error', '1') . "\";");
exit;
}
$upd_data = array(
'password' => $password,
'name' => $name,
'email' => $email,
'lang' => $def_language,
'change_serversettings' => $change_serversettings,
'customers' => $customers,
'customers_see_all' => $customers_see_all,
'domains' => $domains,
'domains_see_all' => $domains_see_all,
'caneditphpsettings' => $caneditphpsettings,
'diskspace' => $diskspace,
'traffic' => $traffic,
'subdomains' => $subdomains,
'emails' => $emails,
'accounts' => $email_accounts,
'forwarders' => $email_forwarders,
'quota' => $email_quota,
'ftps' => $ftps,
'tickets' => $tickets,
'tickets_see_all' => $tickets_see_all,
'mysqls' => $mysqls,
'ip' => $ipaddress,
'deactivated' => $deactivated,
'adminid' => $id
);
$upd_stmt = Database::prepare("
UPDATE `" . TABLE_PANEL_ADMINS . "` SET
`password` = :password,
`name` = :name,
`email` = :email,
`def_language` = :lang,
`change_serversettings` = :change_serversettings,
`customers` = :customers,
`customers_see_all` = :customers_see_all,
`domains` = :domains,
`domains_see_all` = :domains_see_all,
`caneditphpsettings` = :caneditphpsettings,
`diskspace` = :diskspace,
`traffic` = :traffic,
`subdomains` = :subdomains,
`emails` = :emails,
`email_accounts` = :accounts,
`email_forwarders` = :forwarders,
`email_quota` = :quota,
`ftps` = :ftps,
`tickets` = :tickets,
`tickets_see_all` = :tickets_see_all,
`mysqls` = :mysqls,
`ip` = :ip,
`deactivated` = :deactivated
WHERE `adminid` = :adminid
");
Database::pexecute($upd_stmt, $upd_data);
$log->logAction(ADM_ACTION, LOG_INFO, "edited admin '#" . $id . "'");
redirectTo($filename, array('page' => $page, 's' => $s));
}
} else {
$dec_places = Settings::Get('panel.decimal_places');
$result['traffic'] = round($result['traffic'] / (1024 * 1024), $dec_places);
$result['diskspace'] = round($result['diskspace'] / 1024, $dec_places);
$result['email'] = $idna_convert->decode($result['email']);
$customers_ul = makecheckbox('customers_ul', $lng['customer']['unlimited'], '-1', false, $result['customers'], true, true);
if ($result['customers'] == '-1') {
$result['customers'] = '';
}
$diskspace_ul = makecheckbox('diskspace_ul', $lng['customer']['unlimited'], '-1', false, $result['diskspace'], true, true);
if ($result['diskspace'] == '-1') {
$result['diskspace'] = '';
}
$traffic_ul = makecheckbox('traffic_ul', $lng['customer']['unlimited'], '-1', false, $result['traffic'], true, true);
if ($result['traffic'] == '-1') {
$result['traffic'] = '';
}
$domains_ul = makecheckbox('domains_ul', $lng['customer']['unlimited'], '-1', false, $result['domains'], true, true);
if ($result['domains'] == '-1') {
$result['domains'] = '';
}
$subdomains_ul = makecheckbox('subdomains_ul', $lng['customer']['unlimited'], '-1', false, $result['subdomains'], true, true);
if ($result['subdomains'] == '-1') {
$result['subdomains'] = '';
}
$emails_ul = makecheckbox('emails_ul', $lng['customer']['unlimited'], '-1', false, $result['emails'], true, true);
if ($result['emails'] == '-1') {
$result['emails'] = '';
}
$email_accounts_ul = makecheckbox('email_accounts_ul', $lng['customer']['unlimited'], '-1', false, $result['email_accounts'], true, true);
if ($result['email_accounts'] == '-1') {
$result['email_accounts'] = '';
}
$email_forwarders_ul = makecheckbox('email_forwarders_ul', $lng['customer']['unlimited'], '-1', false, $result['email_forwarders'], true, true);
if ($result['email_forwarders'] == '-1') {
$result['email_forwarders'] = '';
}
$email_quota_ul = makecheckbox('email_quota_ul', $lng['customer']['unlimited'], '-1', false, $result['email_quota'], true, true);
if ($result['email_quota'] == '-1') {
$result['email_quota'] = '';
}
$ftps_ul = makecheckbox('ftps_ul', $lng['customer']['unlimited'], '-1', false, $result['ftps'], true, true);
if ($result['ftps'] == '-1') {
$result['ftps'] = '';
}
$tickets_ul = makecheckbox('tickets_ul', $lng['customer']['unlimited'], '-1', false, $result['tickets'], true, true);
if ($result['tickets'] == '-1') {
$result['tickets'] = '';
}
$mysqls_ul = makecheckbox('mysqls_ul', $lng['customer']['unlimited'], '-1', false, $result['mysqls'], true, true);
if ($result['mysqls'] == '-1') {
$result['mysqls'] = '';
}
$language_options = '';
while (list($language_file, $language_name) = each($languages)) {
$language_options.= makeoption($language_name, $language_file, $result['def_language'], true);
}
$ipaddress = makeoption($lng['admin']['allips'], "-1", $result['ip']);
$ips = array();
$ipaddress = [];
$ipaddress[-1] = lng('admin.allips');
$ipsandports_stmt = Database::query("
SELECT `id`, `ip` FROM `" . TABLE_PANEL_IPSANDPORTS . "` ORDER BY `ip`, `port` ASC
SELECT `id`, `ip` FROM `" . TABLE_PANEL_IPSANDPORTS . "` GROUP BY `ip` ORDER BY `ip` ASC
");
while ($row = $ipsandports_stmt->fetch(PDO::FETCH_ASSOC)) {
if (filter_var($row['ip'], FILTER_VALIDATE_IP, FILTER_FLAG_IPV6)) {
$row['ip'] = '[' . $row['ip'] . ']';
}
if (!in_array($row['ip'], $ips)) {
$ipaddress.= makeoption($row['ip'], $row['id'], $result['ip']);
$ips[] = $row['ip'];
}
$ipaddress[$row['id']] = $row['ip'];
}
$result = htmlentities_array($result);
$result = PhpHelper::htmlentitiesArray($result);
$admin_edit_data = include_once dirname(__FILE__) . '/lib/formfields/admin/admin/formfield.admin_edit.php';
$admin_edit_form = htmlform::genHTMLForm($admin_edit_data);
$title = $admin_edit_data['admin_edit']['title'];
$image = $admin_edit_data['admin_edit']['image'];
eval("echo \"" . getTemplate("admins/admins_edit") . "\";");
UI::view('user/form.html.twig', [
'formaction' => $linker->getLink(['section' => 'admins', 'id' => $id]),
'formdata' => $admin_edit_data['admin_edit'],
'editid' => $id
]);
}
}
}

234
admin_apcuinfo.php Normal file
View File

@@ -0,0 +1,234 @@
<?php
/**
* This file is part of the Froxlor project.
* Copyright (c) 2010 the Froxlor Team (see authors).
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, you can also view it online at
* https://files.froxlor.org/misc/COPYING.txt
*
* @copyright the authors
* @author Froxlor team <team@froxlor.org>
* @author Janos Muzsi <muzsij@hypernics.hu>
* @author Ralf Becker <beckerr@php.net>
* @author Rasmus Lerdorf <rasmus@php.net>
* @author Ilia Alshanetsky <ilia@prohost.org>
* @license https://files.froxlor.org/misc/COPYING.txt GPLv2
*
* Based on https://github.com/krakjoe/apcu/blob/master/apc.php, which is
* licensed under the PHP licence (version 3.01), which can be viewed
* online at https://www.php.net/license/3_01.txt
*/
use Froxlor\FroxlorLogger;
use Froxlor\UI\Panel\UI;
use Froxlor\UI\Response;
use Froxlor\UI\HTML;
const AREA = 'admin';
require __DIR__ . '/lib/init.php';
$horizontal_bar_size = 950; // 1280px window width
if ($action == 'delete' && function_exists('apcu_clear_cache') && $userinfo['change_serversettings'] == '1') {
if ($_POST['send'] == 'send') {
apcu_clear_cache();
$log->logAction(FroxlorLogger::ADM_ACTION, LOG_INFO, "cleared APCu cache");
header('Location: ' . $linker->getLink([
'section' => 'apcuinfo',
'page' => 'showinfo'
]));
exit();
} else {
HTML::askYesNo('cache_reallydelete', $filename, [
'page' => $page,
'action' => 'delete',
], '', [
'section' => 'apcuinfo',
'page' => 'showinfo'
]);
}
}
if (!function_exists('apcu_cache_info') || !function_exists('apcu_sma_info')) {
Response::standardError(lng('error.no_apcuinfo'));
}
if ($page == 'showinfo' && $userinfo['change_serversettings'] == '1') {
$cache = apcu_cache_info();
$mem = apcu_sma_info();
$time = time();
$log->logAction(FroxlorLogger::ADM_ACTION, LOG_NOTICE, "viewed admin_apcuinfo");
// check for possible empty values that are used in the templates
if (!isset($cache['file_upload_progress'])) {
$cache['file_upload_progress'] = lng('logger.unknown');
}
if (!isset($cache['num_expunges'])) {
$cache['num_expunges'] = lng('logger.unknown');
}
$overview = [
'mem_size' => $mem['num_seg'] * $mem['seg_size'],
'mem_avail' => $mem['avail_mem'],
'mem_used' => ($mem['num_seg'] * $mem['seg_size']) - $mem['avail_mem'],
'seg_size' => bsize($mem['seg_size']),
'num_hits' => $cache['num_hits'],
'num_misses' => $cache['num_misses'],
'num_inserts' => $cache['num_inserts'],
'req_rate_user' => sprintf("%.2f",
$cache['num_hits'] ? (($cache['num_hits'] + $cache['num_misses']) / ($time - $cache['start_time'])) : 0),
'hit_rate_user' => sprintf("%.2f",
$cache['num_hits'] ? (($cache['num_hits']) / ($time - $cache['start_time'])) : 0),
'miss_rate_user' => sprintf("%.2f",
$cache['num_misses'] ? (($cache['num_misses']) / ($time - $cache['start_time'])) : 0),
'insert_rate_user' => sprintf("%.2f",
$cache['num_inserts'] ? (($cache['num_inserts']) / ($time - $cache['start_time'])) : 0),
'apcversion' => phpversion('apcu'),
'phpversion' => phpversion(),
'number_vars' => $cache['num_entries'],
'size_vars' => bsize($cache['mem_size']),
'num_hits_and_misses' => 0 >= ($cache['num_hits'] + $cache['num_misses']) ? 1 : ($cache['num_hits'] + $cache['num_misses']),
'file_upload_progress' => $cache['file_upload_progress'],
'num_expunges' => $cache['num_expunges'],
'host' => (function_exists('gethostname')
? gethostname()
: (php_uname('n')
?: (empty($_SERVER['SERVER_NAME'])
? $_SERVER['HOST_NAME']
: $_SERVER['SERVER_NAME']
)
)
),
'server' => $_SERVER['SERVER_SOFTWARE'] ?: '',
'start_time' => $cache['start_time'],
'uptime' => duration($cache['start_time'])
];
$overview['mem_used_percentage'] = number_format(($overview['mem_used'] / $overview['mem_avail']) * 100, 1);
$overview['num_hits_percentage'] = number_format(($overview['num_hits'] / $overview['num_hits_and_misses']) * 100,
1);
$overview['num_misses_percentage'] = number_format(($overview['num_misses'] / $overview['num_hits_and_misses']) * 100,
1);
$overview['readable'] = [
'mem_size' => bsize($overview['mem_size']),
'mem_avail' => bsize($overview['mem_avail']),
'mem_used' => bsize($overview['mem_used']),
'num_hits' => number_format($overview['num_hits']),
'num_misses' => number_format($overview['num_misses']),
'number_vars' => number_format($overview['number_vars']),
];
$overview['runtimelines'] = [];
foreach (ini_get_all('apcu') as $name => $v) {
$value = $v['local_value'];
$overview['runtimelines'][$name] = $value;
}
// Fragementation: (freeseg - 1) / total_seg
$nseg = $freeseg = $fragsize = $freetotal = 0;
for ($i = 0; $i < $mem['num_seg']; $i++) {
$ptr = 0;
foreach ($mem['block_lists'][$i] as $block) {
if ($block['offset'] != $ptr) {
++$nseg;
}
$ptr = $block['offset'] + $block['size'];
/* Only consider blocks <5M for the fragmentation % */
if ($block['size'] < (5 * 1024 * 1024)) {
$fragsize += $block['size'];
}
$freetotal += $block['size'];
}
$freeseg += count($mem['block_lists'][$i]);
}
$overview['fragmentation'] = [];
if ($freeseg > 1) {
$overview['fragmentation']['used_percentage'] = number_format(($fragsize / $freetotal) * 100, 1);
$overview['fragmentation']['used_bytes'] = $fragsize;
$overview['fragmentation']['total_bytes'] = $freetotal;
$overview['fragmentation']['num_frags'] = $freeseg;
$overview['fragmentation']['readable'] = [
'used_bytes' => bsize($fragsize),
'total_bytes' => bsize($freetotal),
'num_frags' => number_format($freeseg)
];
} else {
$overview['fragmentation'] = 0;
}
UI::view('settings/apcuinfo.html.twig', [
'apcuinfo' => $overview
]);
}
// pretty printer for byte values
function bsize($size)
{
$i = 0;
$val = ['b', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'];
while (($size / 1024) > 1) {
$size /= 1024;
++$i;
}
return sprintf(
'%.2f%s%s',
$size,
'',
$val[$i]
);
}
function duration($ts)
{
global $time;
$years = (int)((($time - $ts) / (7 * 86400)) / 52.177457);
$rem = (int)(($time - $ts) - ($years * 52.177457 * 7 * 86400));
$weeks = (int)(($rem) / (7 * 86400));
$days = (int)(($rem) / 86400) - $weeks * 7;
$hours = (int)(($rem) / 3600) - $days * 24 - $weeks * 7 * 24;
$mins = (int)(($rem) / 60) - $hours * 60 - $days * 24 * 60 - $weeks * 7 * 24 * 60;
$str = '';
if ($years == 1) {
$str .= "$years year, ";
}
if ($years > 1) {
$str .= "$years years, ";
}
if ($weeks == 1) {
$str .= "$weeks week, ";
}
if ($weeks > 1) {
$str .= "$weeks weeks, ";
}
if ($days == 1) {
$str .= "$days day,";
}
if ($days > 1) {
$str .= "$days days,";
}
if ($hours == 1) {
$str .= " $hours hour and";
}
if ($hours > 1) {
$str .= " $hours hours and";
}
if ($mins == 1) {
$str .= " 1 minute";
} else {
$str .= " $mins minutes";
}
return $str;
}

212
admin_autoupdate.php Normal file
View File

@@ -0,0 +1,212 @@
<?php
/**
* This file is part of the Froxlor project.
* Copyright (c) 2010 the Froxlor Team (see authors).
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, you can also view it online at
* https://files.froxlor.org/misc/COPYING.txt
*
* @copyright the authors
* @author Froxlor team <team@froxlor.org>
* @license https://files.froxlor.org/misc/COPYING.txt GPLv2
*/
const AREA = 'admin';
require __DIR__ . '/lib/init.php';
use Froxlor\Froxlor;
use Froxlor\FroxlorLogger;
use Froxlor\FileDir;
use Froxlor\Install\AutoUpdate;
use Froxlor\Settings;
use Froxlor\UI\Panel\UI;
use Froxlor\UI\Response;
if ($page != 'error') {
// check for webupdate to be enabled
if (Settings::Config('enable_webupdate') != true) {
Response::redirectTo($filename, [
'page' => 'error',
'errno' => 11
]);
}
}
// display initial version check
if ($page == 'overview') {
// log our actions
$log->logAction(FroxlorLogger::ADM_ACTION, LOG_NOTICE, "checking auto-update");
// check for new version
try {
$result = AutoUpdate::checkVersion();
} catch (Exception $e) {
Response::dynamicError($e->getMessage());
}
if ($result == 1) {
// anzeige über version-status mit ggfls. formular
// zum update schritt #1 -> download
$text = lng('admin.newerversionavailable') . ' ' . lng('admin.newerversiondetails', [AutoUpdate::getFromResult('version'), Froxlor::VERSION]);
$upd_formfield = [
'updates' => [
'title' => lng('update.update'),
'image' => 'fa-solid fa-download',
'sections' => [
'section_autoupd' => [
'fields' => [
'newversion' => ['type' => 'hidden', 'value' => AutoUpdate::getFromResult('version')]
]
]
],
'buttons' => [
[
'class' => 'btn-outline-secondary',
'label' => lng('panel.cancel'),
'type' => 'reset'
],
[
'label' => lng('update.proceed')
]
]
]
];
UI::view('user/form-note.html.twig', [
'formaction' => $linker->getLink(['section' => 'autoupdate', 'page' => 'getdownload']),
'formdata' => $upd_formfield['updates'],
// alert
'type' => 'warning',
'alert_msg' => $text
]);
} else if ($result < 0 || $result > 1) {
// remote errors
if ($result < 0) {
Response::dynamicError(AutoUpdate::getLastError());
} else {
Response::redirectTo($filename, [
'page' => 'error',
'errno' => $result
]);
}
} else {
// no new version
Response::standardSuccess('update.noupdatesavail', (Settings::Get('system.update_channel') == 'testing' ? lng('serversettings.uc_testing') . ' ' : ''));
}
} // download the new archive
elseif ($page == 'getdownload') {
// retrieve the new version from the form
$newversion = isset($_POST['newversion']) ? $_POST['newversion'] : null;
$result = 6;
// valid?
if ($newversion !== null) {
$result = AutoUpdate::downloadZip($newversion);
if (!is_numeric($result)) {
// to the next step
Response::redirectTo($filename, [
'page' => 'extract',
'archive' => $result
]);
}
}
Response::redirectTo($filename, [
'page' => 'error',
'errno' => $result
]);
} // extract and install new version
elseif ($page == 'extract') {
if (isset($_POST['send']) && $_POST['send'] == 'send') {
$toExtract = isset($_POST['archive']) ? $_POST['archive'] : null;
$localArchive = FileDir::makeCorrectFile(Froxlor::getInstallDir() . '/updates/' . $toExtract);
$log->logAction(FroxlorLogger::ADM_ACTION, LOG_NOTICE, "Extracting " . $localArchive . " to " . Froxlor::getInstallDir());
$result = AutoUpdate::extractZip($localArchive);
if ($result > 0) {
// error
Response::redirectTo($filename, [
'page' => 'error',
'errno' => $result
]);
}
// redirect to update-page
Response::redirectTo('admin_updates.php');
} else {
$toExtract = isset($_GET['archive']) ? $_GET['archive'] : null;
$localArchive = FileDir::makeCorrectFile(Froxlor::getInstallDir() . '/updates/' . $toExtract);
}
if (!file_exists($localArchive)) {
Response::redirectTo($filename, [
'page' => 'error',
'errno' => 7
]);
}
$text = lng('admin.extractdownloadedzip', [$toExtract]);
$upd_formfield = [
'updates' => [
'title' => lng('update.update'),
'image' => 'fa-solid fa-download',
'sections' => [
'section_autoupd' => [
'fields' => [
'archive' => ['type' => 'hidden', 'value' => $toExtract]
]
]
],
'buttons' => [
[
'class' => 'btn-outline-secondary',
'label' => lng('panel.cancel'),
'type' => 'reset'
],
[
'label' => lng('update.proceed')
]
]
]
];
UI::view('user/form-note.html.twig', [
'formaction' => $linker->getLink(['section' => 'autoupdate', 'page' => 'extract']),
'formdata' => $upd_formfield['updates'],
// alert
'type' => 'warning',
'alert_msg' => $text
]);
} // display error
elseif ($page == 'error') {
// retrieve error-number via url-parameter
$errno = isset($_GET['errno']) ? (int)$_GET['errno'] : 0;
// 2 = no Zlib
// 3 = custom version detected
// 4 = could not store archive to local hdd
// 5 = some weird value came from version.froxlor.org
// 6 = download without valid version
// 7 = local archive does not exist
// 8 = could not extract archive
// 9 = checksum mismatch
// 10 = <php-7.4
// 11 = enable_webupdate = false
$errmsg = 'autoupdate_' . $errno;
if ($errno == 3) {
$errmsg = 'customized_version';
}
Response::standardError($errmsg);
}

View File

@@ -2,182 +2,195 @@
/**
* This file is part of the Froxlor project.
* Copyright (c) 2003-2009 the SysCP Team (see authors).
* Copyright (c) 2010 the Froxlor Team (see authors).
*
* For the full copyright and license information, please view the COPYING
* file that was distributed with this source code. You can also view the
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* @copyright (c) the authors
* @author Florian Lippert <flo@syscp.org> (2003-2009)
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Panel
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, you can also view it online at
* https://files.froxlor.org/misc/COPYING.txt
*
* @copyright the authors
* @author Froxlor team <team@froxlor.org>
* @license https://files.froxlor.org/misc/COPYING.txt GPLv2
*/
define('AREA', 'admin');
$need_db_sql_data = true;
require './lib/init.php';
require './lib/configfiles_index.inc.php';
const AREA = 'admin';
require __DIR__ . '/lib/init.php';
use Froxlor\Config\ConfigParser;
use Froxlor\FileDir;
use Froxlor\Froxlor;
use Froxlor\Settings;
use Froxlor\UI\Panel\UI;
use Froxlor\UI\Request;
use Froxlor\UI\Response;
use Froxlor\Validate\Validate;
if ($userinfo['change_serversettings'] == '1') {
if ($action == 'setconfigured') {
Settings::Set('panel.is_configured', '1', true);
Response::redirectTo('admin_configfiles.php');
}
// get distro from URL param
$distribution = Request::any('distribution');
$reselect = Request::any('reselect', 0);
// check for possible setting
if (empty($distribution)) {
$distribution = Settings::Get('system.distribution') ?? "";
}
if ($reselect == 1) {
$distribution = '';
$distributions_select = '';
$service = '';
$services_select = '';
$daemon = '';
$daemons_select = '';
}
if($userinfo['change_serversettings'] == '1')
{
if(isset($_GET['distribution'])
&& $_GET['distribution'] != ''
&& isset($configfiles[$_GET['distribution']])
&& is_array($configfiles[$_GET['distribution']]))
{
$distribution = $_GET['distribution'];
$distributions_select = [];
if(isset($_GET['service'])
&& $_GET['service'] != ''
&& isset($configfiles[$distribution]['services'][$_GET['service']])
&& is_array($configfiles[$distribution]['services'][$_GET['service']]))
{
$service = $_GET['service'];
$services = [];
$config_dir = FileDir::makeCorrectDir(Froxlor::getInstallDir() . '/lib/configfiles/');
if(isset($_GET['daemon'])
&& $_GET['daemon'] != ''
&& isset($configfiles[$distribution]['services'][$service]['daemons'][$_GET['daemon']])
&& is_array($configfiles[$distribution]['services'][$service]['daemons'][$_GET['daemon']]))
{
$daemon = $_GET['daemon'];
if (!empty($distribution)) {
if (!file_exists($config_dir . '/' . $distribution . ".xml")) {
Response::dynamicError("Unknown distribution");
}
else
{
foreach($configfiles[$distribution]['services'][$service]['daemons'] as $daemon_name => $daemon_details)
{
$daemons_select.= makeoption($daemon_details['label'], $daemon_name);
// update setting if different
if ($distribution != Settings::Get('system.distribution')) {
Settings::Set('system.distribution', $distribution);
}
// create configparser object
$configfiles = new ConfigParser($config_dir . '/' . $distribution . ".xml");
// get distro-info
$dist_display = $configfiles->getCompleteDistroName();
// get all the services from the distro
$services = $configfiles->getServices();
} else {
// show list of available distro's
$distros = glob($config_dir . '*.xml');
// read in all the distros
foreach ($distros as $_distribution) {
// get configparser object
$dist = new ConfigParser($_distribution);
// store in tmp array
$distributions_select[str_replace(".xml", "", strtolower(basename($_distribution)))] = $dist->getCompleteDistroName();
}
// sort by distribution name
asort($distributions_select);
}
if ($distribution != "" && isset($_POST['finish'])) {
$valid_keys = ['http', 'dns', 'smtp', 'mail', 'ftp', 'system', 'distro'];
unset($_POST['finish']);
unset($_POST['csrf_token']);
$params = $_POST;
$params['distro'] = $distribution;
$params['system'] = [];
foreach ($_POST['system'] as $sysdaemon) {
$params['system'][] = $sysdaemon;
}
// validate params
foreach ($params as $key => $value) {
if (!in_array($key, $valid_keys)) {
unset($params[$key]);
continue;
}
if (!is_array($value)) {
$params[$key] = Validate::validate($value, $key);
} else {
foreach ($value as $subkey => $subvalue) {
$params[$key][$subkey] = Validate::validate($subvalue, $key.'.'.$subkey);
}
}
}
else
{
foreach($configfiles[$distribution]['services'] as $service_name => $service_details)
{
$services_select.= makeoption($service_details['label'], $service_name);
}
}
}
else
{
foreach($configfiles as $distribution_name => $distribution_details)
{
$distributions_select.= makeoption($distribution_details['label'], $distribution_name);
$params_content = json_encode($params);
$params_filename = FileDir::makeCorrectFile(Froxlor::getInstallDir() . 'install/' . Froxlor::genSessionId() . '.json');
file_put_contents($params_filename, $params_content);
UI::twigBuffer('settings/configuration-final.html.twig', [
'distribution' => $distribution,
// alert
'type' => 'info',
'alert_msg' => lng('admin.configfiles.finishnote'),
'basedir' => Froxlor::getInstallDir(),
'params_filename' => $params_filename
]);
} else {
if (!empty($distribution)) {
// show available services to configure
$fields = $services;
$link_params = ['section' => 'configfiles', 'distribution' => $distribution];
UI::twigBuffer('settings/configuration.html.twig', [
'action' => $linker->getLink($link_params),
'fields' => $fields,
'distribution' => $distribution
]);
} else {
$cfg_formfield = [
'config' => [
'title' => lng('admin.configfiles.serverconfiguration'),
'image' => 'fa-solid fa-wrench',
'description' => lng('admin.configfiles.description'),
'sections' => [
'section_config' => [
'fields' => [
'distribution' => [
'type' => 'select',
'select_var' => $distributions_select,
'label' => lng('admin.configfiles.distribution'),
'selected' => Settings::Get('system.distribution') ?? ''
]
]
]
],
'buttons' => [
[
'class' => 'btn-outline-secondary',
'label' => lng('panel.cancel'),
'type' => 'reset'
],
[
'label' => lng('update.proceed')
]
]
]
];
UI::twigBuffer('user/form-note.html.twig', [
'formaction' => $linker->getLink(['section' => 'configfiles']),
'formdata' => $cfg_formfield['config'],
'actions_links' => (int)Settings::Get('panel.is_configured') == 0 ? [
[
'href' => $linker->getLink([
'section' => 'configfiles',
'page' => 'overview',
'action' => 'setconfigured'
]),
'label' => lng('panel.ihave_configured'),
'class' => 'btn-outline-warning',
'icon' => 'fa-solid fa-circle-check'
]
] : [],
// alert
'type' => 'warning',
'alert_msg' => lng('panel.settings_before_configuration') . ((int)Settings::Get('panel.is_configured') == 1 ? '<br><br>' . lng('panel.system_is_configured') : '')
]);
}
}
if($distribution != ''
&& $service != ''
&& $daemon != '')
{
$replace_arr = Array(
'<SQL_UNPRIVILEGED_USER>' => $sql['user'],
'<SQL_UNPRIVILEGED_PASSWORD>' => 'MYSQL_PASSWORD',
'<SQL_DB>' => $sql['db'],
'<SQL_HOST>' => $sql['host'],
'<SERVERNAME>' => Settings::Get('system.hostname'),
'<SERVERIP>' => Settings::Get('system.ipaddress'),
'<NAMESERVERS>' => Settings::Get('system.nameservers'),
'<VIRTUAL_MAILBOX_BASE>' => Settings::Get('system.vmail_homedir'),
'<VIRTUAL_UID_MAPS>' => Settings::Get('system.vmail_uid'),
'<VIRTUAL_GID_MAPS>' => Settings::Get('system.vmail_gid'),
'<SSLPROTOCOLS>' => (Settings::Get('system.use_ssl') == '1') ? 'imaps pop3s' : '',
'<CUSTOMER_TMP>' => (Settings::Get('system.mod_fcgid_tmpdir') != '') ? makeCorrectDir(Settings::Get('system.mod_fcgid_tmpdir')) : '/tmp/',
'<BASE_PATH>' => makeCorrectDir(FROXLOR_INSTALL_DIR),
'<BIND_CONFIG_PATH>' => makeCorrectDir(Settings::Get('system.bindconf_directory')),
'<WEBSERVER_RELOAD_CMD>' => Settings::Get('system.apachereload_command'),
'<CUSTOMER_LOGS>' => makeCorrectDir(Settings::Get('system.logfiles_directory')),
'<FPM_IPCDIR>' => makeCorrectDir(Settings::Get('phpfpm.fastcgi_ipcdir')),
'<WEBSERVER_GROUP>' => Settings::Get('system.httpgroup')
);
$files = '';
$configpage = '';
foreach($configfiles[$distribution]['services'][$service]['daemons'][$daemon] as $action => $value)
{
if(substr($action, 0, 8) == 'commands')
{
$commands = '';
if(is_array($value))
{
$commands = implode("\n", $value);
$commands = str_replace("\n\n", "\n", $commands);
if($commands != '')
{
eval("\$configpage.=\"" . getTemplate("configfiles/configfiles_commands") . "\";");
UI::twigOutputBuffer();
} else {
Response::redirectTo('admin_index.php');
}
}
}
elseif(substr($action, 0, 5) == 'files')
{
$files = '';
if(is_array($value))
{
while(list($filename, $realname) = each($value))
{
$file_content = file_get_contents('./templates/misc/configfiles/' . $distribution . '/' . $daemon . '/' . $filename);
$file_content = strtr($file_content, $replace_arr);
$file_content = htmlspecialchars($file_content);
$numbrows = count(explode("\n", $file_content));
eval("\$files.=\"" . getTemplate("configfiles/configfiles_file") . "\";");
}
eval("\$configpage.=\"" . getTemplate("configfiles/configfiles_files") . "\";");
}
}
}
if(isset($configfiles[$distribution]['services'][$service]['daemons'][$daemon]['restart'])
&& is_array($configfiles[$distribution]['services'][$service]['daemons'][$daemon]['restart']))
{
$restart = implode("\n", $configfiles[$distribution]['services'][$service]['daemons'][$daemon]['restart']);
}
else
{
$restart = '';
}
eval("echo \"" . getTemplate("configfiles/configfiles") . "\";");
}
elseif($page == 'overview')
{
$log->logAction(ADM_ACTION, LOG_NOTICE, "viewed admin_configfiles");
$distributions = '';
foreach($configfiles as $distribution_name => $distribution_details)
{
$services = '';
foreach($distribution_details['services'] as $service_name => $service_details)
{
$daemons = '';
foreach($service_details['daemons'] as $daemon_name => $daemon_details)
{
eval("\$daemons.=\"" . getTemplate("configfiles/choose_daemon") . "\";");
}
eval("\$services.=\"" . getTemplate("configfiles/choose_service") . "\";");
}
eval("\$distributions.=\"" . getTemplate("configfiles/choose_distribution") . "\";");
}
eval("echo \"" . getTemplate("configfiles/choose") . "\";");
}
else
{
eval("echo \"" . getTemplate("configfiles/wizard") . "\";");
}
}
?>

View File

@@ -4,135 +4,90 @@
* This file is part of the Froxlor project.
* Copyright (c) 2010 the Froxlor Team (see authors).
*
* For the full copyright and license information, please view the COPYING
* file that was distributed with this source code. You can also view the
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* @copyright (c) the authors
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Panel
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, you can also view it online at
* https://files.froxlor.org/misc/COPYING.txt
*
* @copyright the authors
* @author Froxlor team <team@froxlor.org>
* @license https://files.froxlor.org/misc/COPYING.txt GPLv2
*/
define('AREA', 'admin');
require './lib/init.php';
const AREA = 'admin';
require __DIR__ . '/lib/init.php';
if (isset($_POST['id'])) {
$id = intval($_POST['id']);
} elseif(isset($_GET['id'])) {
$id = intval($_GET['id']);
}
use Froxlor\Api\Commands\Cronjobs;
use Froxlor\FroxlorLogger;
use Froxlor\UI\Collection;
use Froxlor\UI\Listing;
use Froxlor\UI\Panel\UI;
use Froxlor\UI\Request;
use Froxlor\UI\Response;
if ($page == 'cronjobs' || $page == 'overview') {
$id = (int)Request::any('id');
if (($page == 'cronjobs' || $page == 'overview') && $userinfo['change_serversettings'] == '1') {
if ($action == '') {
$log->logAction(ADM_ACTION, LOG_NOTICE, 'viewed admin_cronjobs');
$log->logAction(FroxlorLogger::ADM_ACTION, LOG_NOTICE, 'viewed admin_cronjobs');
$fields = array(
'c.lastrun' => $lng['cron']['lastrun'],
'c.interval' => $lng['cron']['interval'],
'c.isactive' => $lng['cron']['isactive']
);
$paging = new paging($userinfo, TABLE_PANEL_CRONRUNS, $fields);
$crons = '';
$result_stmt = Database::prepare("SELECT `c`.* FROM `" . TABLE_PANEL_CRONRUNS . "` `c` ORDER BY `module` ASC, `cronfile` ASC");
Database::pexecute($result_stmt);
$paging->setEntries(Database::num_rows());
$sortcode = $paging->getHtmlSortCode($lng);
$arrowcode = $paging->getHtmlArrowCode($filename . '?page=' . $page . '&s=' . $s);
$searchcode = $paging->getHtmlSearchCode($lng);
$pagingcode = $paging->getHtmlPagingCode($filename . '?page=' . $page . '&s=' . $s);
$i = 0;
$count = 0;
$cmod = '';
while ($row = $result_stmt->fetch(PDO::FETCH_ASSOC)) {
if ($cmod != $row['module']) {
$_mod = explode("/", $row['module']);
$module = ucfirst($_mod[1]);
eval("\$crons.=\"" . getTemplate('cronjobs/cronjobs_cronjobmodule') . "\";");
$cmod = $row['module'];
}
if ($paging->checkDisplay($i)) {
$row = htmlentities_array($row);
$row['lastrun'] = date('d.m.Y H:i', $row['lastrun']);
$row['isactive'] = ((int)$row['isactive'] == 1) ? $lng['panel']['yes'] : $lng['panel']['no'];
$description = $lng['crondesc'][$row['desc_lng_key']];
eval("\$crons.=\"" . getTemplate('cronjobs/cronjobs_cronjob') . "\";");
$count++;
try {
$cron_list_data = include_once dirname(__FILE__) . '/lib/tablelisting/admin/tablelisting.cronjobs.php';
$collection = (new Collection(Cronjobs::class, $userinfo))
->withPagination($cron_list_data['cron_list']['columns'], $cron_list_data['cron_list']['default_sorting']);
} catch (Exception $e) {
Response::dynamicError($e->getMessage());
}
$i++;
}
eval("echo \"" . getTemplate('cronjobs/cronjobs') . "\";");
UI::view('user/table-note.html.twig', [
'listing' => Listing::format($collection, $cron_list_data, 'cron_list'),
// alert-box
'type' => 'warning',
'alert_msg' => lng('cron.changewarning')
]);
} elseif ($action == 'new') {
/*
* @TODO later
*/
} elseif ($action == 'edit' && $id != 0) {
$result_stmt = Database::prepare("SELECT * FROM `" . TABLE_PANEL_CRONRUNS . "` WHERE `id`= :id");
Database::pexecute($result_stmt, array('id' => $id));
$result = $result_stmt->fetch(PDO::FETCH_ASSOC);
try {
$json_result = Cronjobs::getLocal($userinfo, [
'id' => $id
])->get();
} catch (Exception $e) {
Response::dynamicError($e->getMessage());
}
$result = json_decode($json_result, true)['data'];
if ($result['cronfile'] != '') {
if (isset($_POST['send']) && $_POST['send'] == 'send') {
$isactive = isset($_POST['isactive']) ? 1 : 0;
$interval_value = validate($_POST['interval_value'], 'interval_value', '/^([0-9]+)$/Di', 'stringisempty');
$interval_interval = validate($_POST['interval_interval'], 'interval_interval');
if ($isactive != 1) {
$isactive = 0;
try {
Cronjobs::getLocal($userinfo, $_POST)->update();
} catch (Exception $e) {
Response::dynamicError($e->getMessage());
}
$interval = $interval_value . ' ' . strtoupper($interval_interval);
$upd = Database::prepare("
UPDATE `" . TABLE_PANEL_CRONRUNS . "`
SET `isactive` = :isactive, `interval` = :int
WHERE `id` = :id"
);
Database::pexecute($upd, array('isactive' => $isactive, 'int' => $interval, 'id' => $id));
// insert task to re-generate the cron.d-file
inserttask('99');
redirectTo($filename, array('page' => $page, 's' => $s));
Response::redirectTo($filename, [
'page' => $page
]);
} else {
// interval
$interval_nfo = explode(' ', $result['interval']);
$interval_value = $interval_nfo[0];
$interval_interval = '';
$interval_interval .= makeoption($lng['cronmgmt']['minutes'], 'MINUTE', $interval_nfo[1]);
$interval_interval .= makeoption($lng['cronmgmt']['hours'], 'HOUR', $interval_nfo[1]);
$interval_interval .= makeoption($lng['cronmgmt']['days'], 'DAY', $interval_nfo[1]);
$interval_interval .= makeoption($lng['cronmgmt']['weeks'], 'WEEK', $interval_nfo[1]);
$interval_interval .= makeoption($lng['cronmgmt']['months'], 'MONTH', $interval_nfo[1]);
// end of interval
$change_cronfile = false;
if (substr($result['module'], 0, strpos($result['module'], '/')) != 'froxlor') {
$change_cronfile = true;
}
$cronjobs_edit_data = include_once dirname(__FILE__) . '/lib/formfields/admin/cronjobs/formfield.cronjobs_edit.php';
$cronjobs_edit_form = htmlform::genHTMLForm($cronjobs_edit_data);
$title = $cronjobs_edit_data['cronjobs_edit']['title'];
$image = $cronjobs_edit_data['cronjobs_edit']['image'];
eval("echo \"" . getTemplate('cronjobs/cronjob_edit') . "\";");
UI::view('user/form.html.twig', [
'formaction' => $linker->getLink(['section' => 'cronjobs', 'id' => $id]),
'formdata' => $cronjobs_edit_data['cronjobs_edit'],
'editid' => $id
]);
}
}
}
elseif ($action == 'delete' && $id != 0) {
} elseif ($action == 'delete' && $id != 0) {
/*
* @TODO later
*/

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -2,175 +2,169 @@
/**
* This file is part of the Froxlor project.
* Copyright (c) 2003-2009 the SysCP Team (see authors).
* Copyright (c) 2010 the Froxlor Team (see authors).
*
* For the full copyright and license information, please view the COPYING
* file that was distributed with this source code. You can also view the
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* @copyright (c) the authors
* @author Florian Lippert <flo@syscp.org> (2003-2009)
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Panel
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, you can also view it online at
* https://files.froxlor.org/misc/COPYING.txt
*
* @copyright the authors
* @author Froxlor team <team@froxlor.org>
* @license https://files.froxlor.org/misc/COPYING.txt GPLv2
*/
define('AREA', 'admin');
require './lib/init.php';
const AREA = 'admin';
require __DIR__ . '/lib/init.php';
use Froxlor\Api\Commands\Admins as Admins;
use Froxlor\Api\Commands\Froxlor as Froxlor;
use Froxlor\CurrentUser;
use Froxlor\Database\Database;
use Froxlor\FroxlorLogger;
use Froxlor\Settings;
use Froxlor\System\Cronjob;
use Froxlor\System\Crypt;
use Froxlor\UI\Panel\UI;
use Froxlor\UI\Request;
use Froxlor\UI\Response;
use Froxlor\Validate\Validate;
use Froxlor\Language;
$id = (int)Request::any('id');
if ($action == 'logout') {
$log->logAction(FroxlorLogger::ADM_ACTION, LOG_NOTICE, "logged out");
unset($_SESSION['userinfo']);
CurrentUser::setData();
session_destroy();
$log->logAction(ADM_ACTION, LOG_NOTICE, "logged out");
$params = array('adminid' => (int)$userinfo['adminid']);
if (Settings::Get('session.allow_multiple_login') == '1') {
$stmt = Database::prepare("DELETE FROM `" . TABLE_PANEL_SESSIONS . "`
WHERE `userid` = :adminid
AND `adminsession` = '1'
AND `hash` = :hash"
);
$params['hash'] = $s;
Response::redirectTo('index.php');
} elseif ($action == 'suback') {
if (is_array(CurrentUser::getField('switched_user'))) {
$result = CurrentUser::getData();
$result = $result['switched_user'];
session_regenerate_id(true);
CurrentUser::setData($result);
$target = (isset($_GET['target']) ? $_GET['target'] : 'index');
$redirect = "admin_" . $target . ".php";
if (!file_exists(\Froxlor\Froxlor::getInstallDir() . "/" . $redirect)) {
$redirect = "admin_index.php";
}
Response::redirectTo($redirect, null, true);
} else {
$stmt = Database::prepare("DELETE FROM `" . TABLE_PANEL_SESSIONS . "`
WHERE `userid` = :adminid
AND `adminsession` = '1'"
);
Response::dynamicError("Cannot change back - You've never switched to another user :-)");
}
Database::pexecute($stmt, $params);
redirectTo('index.php');
exit;
}
if (isset($_POST['id'])) {
$id = intval($_POST['id']);
} elseif(isset($_GET['id'])) {
$id = intval($_GET['id']);
}
if ($page == 'overview') {
$log->logAction(ADM_ACTION, LOG_NOTICE, "viewed admin_index");
$log->logAction(FroxlorLogger::ADM_ACTION, LOG_NOTICE, "viewed admin_index");
$params = [];
if ($userinfo['customers_see_all'] == '0') {
$params = [
'adminid' => $userinfo['adminid']
];
}
$overview_stmt = Database::prepare("SELECT COUNT(*) AS `number_customers`,
SUM(case when `diskspace` > 0 then `diskspace` else 0 end) AS `diskspace_assigned`,
SUM(`diskspace_used`) AS `diskspace_used`,
SUM(case when `mysqls` > 0 then `mysqls` else 0 end) AS `mysqls_assigned`,
SUM(`mysqls_used`) AS `mysqls_used`,
SUM(case when `emails` > 0 then `emails` else 0 end) AS `emails_assigned`,
SUM(`emails_used`) AS `emails_used`,
SUM(case when `email_accounts` > 0 then `email_accounts` else 0 end) AS `email_accounts_assigned`,
SUM(`email_accounts_used`) AS `email_accounts_used`,
SUM(case when `email_forwarders` > 0 then `email_forwarders` else 0 end) AS `email_forwarders_assigned`,
SUM(`email_forwarders_used`) AS `email_forwarders_used`,
SUM(case when `email_quota` > 0 then `email_quota` else 0 end) AS `email_quota_assigned`,
SUM(`email_quota_used`) AS `email_quota_used`,
SUM(case when `ftps` > 0 then `ftps` else 0 end) AS `ftps_assigned`,
SUM(`ftps_used`) AS `ftps_used`,
SUM(`tickets_used`) AS `tickets_used`,
SUM(case when `subdomains` > 0 then `subdomains` else 0 end) AS `subdomains_assigned`,
SUM(`subdomains_used`) AS `subdomains_used`,
SUM(case when `traffic` > 0 then `traffic` else 0 end) AS `traffic_assigned`,
SUM(`traffic_used`) AS `traffic_used`
FROM `" . TABLE_PANEL_CUSTOMERS . "`" . ($userinfo['customers_see_all'] ? '' : " WHERE `adminid` = :adminid "));
$overview = Database::pexecute_first($overview_stmt, array('adminid' => $userinfo['adminid']));
$overview = Database::pexecute_first($overview_stmt, $params);
$dec_places = Settings::Get('panel.decimal_places');
$overview['traffic_used'] = round($overview['traffic_used'] / (1024 * 1024), $dec_places);
$overview['diskspace_used'] = round($overview['diskspace_used'] / 1024, $dec_places);
$userinfo['diskspace_bytes'] = ($userinfo['diskspace'] > -1) ? $userinfo['diskspace'] * 1024 : -1;
$overview['diskspace_bytes'] = $overview['diskspace_assigned'] * 1024;
$overview['diskspace_bytes_used'] = $overview['diskspace_used'] * 1024;
$userinfo['traffic_bytes'] = ($userinfo['traffic'] > -1) ? $userinfo['traffic'] * 1024 : -1;
$overview['traffic_bytes'] = $overview['traffic_assigned'] * 1024;
$overview['traffic_bytes_used'] = $overview['traffic_used'] * 1024;
$number_domains_stmt = Database::prepare("
SELECT COUNT(*) AS `number_domains` FROM `" . TABLE_PANEL_DOMAINS . "`
WHERE `parentdomainid`='0'" . ($userinfo['customers_see_all'] ? '' : " AND `adminid` = :adminid")
);
$number_domains = Database::pexecute_first($number_domains_stmt, array('adminid' => $userinfo['adminid']));
WHERE `parentdomainid`='0'" . ($userinfo['customers_see_all'] ? '' : " AND `adminid` = :adminid"));
$number_domains = Database::pexecute_first($number_domains_stmt, $params);
$overview['number_domains'] = $number_domains['number_domains'];
$phpversion = phpversion();
$mysqlserverversion = Database::getAttribute(PDO::ATTR_SERVER_VERSION);
$webserverinterface = strtoupper(@php_sapi_name());
if ((isset($_GET['lookfornewversion']) && $_GET['lookfornewversion'] == 'yes')
|| (isset($lookfornewversion) && $lookfornewversion == 'yes')
) {
$update_check_uri = 'http://version.froxlor.org/Froxlor/legacy/' . $version;
if (ini_get('allow_url_fopen')) {
$latestversion = @file($update_check_uri);
if (isset($latestversion[0])) {
$latestversion = explode('|', $latestversion[0]);
if (is_array($latestversion)
&& count($latestversion) >= 1
) {
$_version = $latestversion[0];
$_message = isset($latestversion[1]) ? $latestversion[1] : '';
$_link = isset($latestversion[2]) ? $latestversion[2] : htmlspecialchars($filename . '?s=' . urlencode($s) . '&page=' . urlencode($page) . '&lookfornewversion=yes');
// add the branding so debian guys are not gettings confused
// about their version-number
$lookfornewversion_lable = $_version.$branding;
$lookfornewversion_link = $_link;
$lookfornewversion_addinfo = $_message;
// not numeric -> error-message
if (!preg_match('/^((\d+\\.)(\d+\\.)(\d+\\.)?(\d+)?(\-(svn|dev|rc)(\d+))?)$/', $_version)) {
// check for customized version to not output
// "There is a newer version of froxlor" besides the error-message
$isnewerversion = 2;
} elseif (version_compare2($version, $_version) == -1) {
$isnewerversion = 1;
} else {
$isnewerversion = 0;
if ((isset($_GET['lookfornewversion']) && $_GET['lookfornewversion'] == 'yes') || (isset($lookfornewversion) && $lookfornewversion == 'yes')) {
try {
$json_result = Froxlor::getLocal($userinfo)->checkUpdate();
} catch (Exception $e) {
Response::dynamicError($e->getMessage());
}
$result = json_decode($json_result, true)['data'];
$lookfornewversion_lable = $result['version'];
$lookfornewversion_link = $result['link'];
$lookfornewversion_message = $result['message'];
$lookfornewversion_addinfo = $result['additional_info'];
$isnewerversion = $result['isnewerversion'];
} else {
redirectTo($update_check_uri.'/pretty', NULL);
}
} else {
redirectTo($update_check_uri.'/pretty', NULL);
}
} else {
redirectTo($update_check_uri.'/pretty', NULL);
}
} else {
$lookfornewversion_lable = $lng['admin']['lookfornewversion']['clickhere'];
$lookfornewversion_link = htmlspecialchars($filename . '?s=' . urlencode($s) . '&page=' . urlencode($page) . '&lookfornewversion=yes');
$lookfornewversion_lable = lng('admin.lookfornewversion.clickhere');
$lookfornewversion_link = htmlspecialchars($filename . '?page=' . urlencode($page) . '&lookfornewversion=yes');
$lookfornewversion_message = '';
$lookfornewversion_addinfo = '';
$isnewerversion = 0;
}
$dec_places = Settings::Get('panel.decimal_places');
$userinfo['diskspace'] = round($userinfo['diskspace'] / 1024, $dec_places);
$userinfo['diskspace_used'] = round($userinfo['diskspace_used'] / 1024, $dec_places);
$userinfo['traffic'] = round($userinfo['traffic'] / (1024 * 1024), $dec_places);
$userinfo['traffic_used'] = round($userinfo['traffic_used'] / (1024 * 1024), $dec_places);
$userinfo = str_replace_array('-1', $lng['customer']['unlimited'], $userinfo, 'customers domains diskspace traffic mysqls emails email_accounts email_forwarders email_quota ftps tickets subdomains');
$cron_last_runs = Cronjob::getCronjobsLastRun();
$outstanding_tasks = Cronjob::getOutstandingTasks();
$cron_last_runs = getCronjobsLastRun();
$outstanding_tasks = getOutstandingTasks();
// additional sys-infos
$meminfo = explode("\n", @file_get_contents("/proc/meminfo"));
$memory = "";
for ($i = 0; $i < count($meminfo); ++$i) {
if (substr($meminfo[$i], 0, 3) === "Mem") {
$memory .= $meminfo[$i] . PHP_EOL;
}
}
if (function_exists('sys_getloadavg')) {
$loadArray = sys_getloadavg();
$load = number_format($loadArray[0], 2, '.', '') . " / " . number_format($loadArray[1], 2, '.', '') . " / " . number_format($loadArray[2], 2, '.', '');
} else {
$load = @file_get_contents('/proc/loadavg');
if (!$load) {
$load = $lng['admin']['noloadavailable'];
$load = lng('admin.noloadavailable');
}
}
$kernel = '';
if (function_exists('posix_uname')) {
$showkernel = 1;
$kernel_nfo = posix_uname();
$kernel = $kernel_nfo['release'] . ' (' . $kernel_nfo['machine'] . ')';
} else {
$showkernel = 0;
$kernel = '';
}
// Try to get the uptime
// First: With exec (let's hope it's enabled for the Froxlor - vHost)
$uptime_array = explode(" ", @file_get_contents("/proc/uptime"));
if (is_array($uptime_array)
&& isset($uptime_array[0])
&& is_numeric($uptime_array[0])
) {
$uptime = '';
if (is_array($uptime_array) && isset($uptime_array[0]) && is_numeric($uptime_array[0])) {
// Some calculatioon to get a nicly formatted display
$seconds = round($uptime_array[0], 0);
$minutes = $seconds / 60;
@@ -180,229 +174,136 @@ if ($page == 'overview') {
$minutes = floor($minutes - ($days * 24 * 60) - ($hours * 60));
$seconds = floor($seconds - ($days * 24 * 60 * 60) - ($hours * 60 * 60) - ($minutes * 60));
$uptime = "{$days}d, {$hours}h, {$minutes}m, {$seconds}s";
// Just cleanup
unset($uptime_array, $seconds, $minutes, $hours, $days);
} else {
// Nothing of the above worked, show an error :/
$uptime = '';
}
eval("echo \"" . getTemplate("index/index") . "\";");
$sysinfo = [
'webserver' => $_SERVER['SERVER_SOFTWARE'] ?? 'unknown',
'phpversion' => phpversion(),
'mysqlserverversion' => Database::getAttribute(PDO::ATTR_SERVER_VERSION),
'phpsapi' => strtoupper(@php_sapi_name()),
'hostname' => gethostname(),
'memory' => $memory,
'load' => $load,
'kernel' => $kernel,
'uptime' => $uptime
];
UI::twig()->addGlobal('userinfo', $userinfo);
UI::view('user/index.html.twig', [
'sysinfo' => $sysinfo,
'overview' => $overview,
'outstanding_tasks' => $outstanding_tasks,
'cron_last_runs' => $cron_last_runs
]);
} elseif ($page == 'change_password') {
if (isset($_POST['send']) && $_POST['send'] == 'send') {
$old_password = Validate::validate($_POST['old_password'], 'old password');
if (isset($_POST['send'])
&& $_POST['send'] == 'send'
) {
$old_password = validate($_POST['old_password'], 'old password');
if (md5($old_password) != $userinfo['password']) {
standard_error('oldpasswordnotcorrect');
exit;
if (!Crypt::validatePasswordLogin($userinfo, $old_password, TABLE_PANEL_ADMINS, 'adminid')) {
Response::standardError('oldpasswordnotcorrect');
}
$new_password = validate($_POST['new_password'], 'new password');
$new_password_confirm = validate($_POST['new_password_confirm'], 'new password confirm');
try {
$new_password = Crypt::validatePassword($_POST['new_password'], 'new password');
$new_password_confirm = Crypt::validatePassword($_POST['new_password_confirm'], 'new password confirm');
} catch (Exception $e) {
Response::dynamicError($e->getMessage());
}
if ($old_password == '') {
standard_error(array('stringisempty', 'oldpassword'));
Response::standardError([
'stringisempty',
'changepassword.old_password'
]);
} elseif ($new_password == '') {
standard_error(array('stringisempty', 'newpassword'));
Response::standardError([
'stringisempty',
'changepassword.new_password'
]);
} elseif ($new_password_confirm == '') {
standard_error(array('stringisempty', 'newpasswordconfirm'));
Response::standardError([
'stringisempty',
'changepassword.new_password_confirm'
]);
} elseif ($new_password != $new_password_confirm) {
standard_error('newpasswordconfirmerror');
Response::standardError('newpasswordconfirmerror');
} else {
$chgpwd_stmt = Database::prepare("
UPDATE `" . TABLE_PANEL_ADMINS . "`
SET `password`= :newpasswd
WHERE `adminid`= :adminid
AND `password`= :oldpasswd"
);
Database::pexecute($chgpwd_stmt, array(
'newpasswd' => md5($new_password),
'adminid' => (int)$userinfo['adminid'],
'oldpasswd' => md5($old_password)
));
$log->logAction(ADM_ACTION, LOG_NOTICE, 'changed password');
redirectTo($filename, Array('s' => $s));
try {
Admins::getLocal($userinfo, [
'id' => $userinfo['adminid'],
'admin_password' => $new_password
])->update();
} catch (Exception $e) {
Response::dynamicError($e->getMessage());
}
$log->logAction(FroxlorLogger::ADM_ACTION, LOG_NOTICE, 'changed password');
Response::redirectTo($filename);
}
} else {
eval("echo \"" . getTemplate("index/change_password") . "\";");
UI::view('user/change_password.html.twig');
}
} elseif ($page == 'change_language') {
if (isset($_POST['send'])
&& $_POST['send'] == 'send'
) {
$def_language = validate($_POST['def_language'], 'default language');
$languages = Language::getLanguages();
if (isset($_POST['send']) && $_POST['send'] == 'send') {
$def_language = Validate::validate($_POST['def_language'], 'default language');
if (isset($languages[$def_language])) {
$lng_stmt = Database::prepare("
UPDATE `" . TABLE_PANEL_ADMINS . "`
SET `def_language`= :deflng
WHERE `adminid`= :adminid"
);
Database::pexecute($lng_stmt, array(
'deflng' => $def_language,
'adminid' => (int)$userinfo['adminid']
));
$lng_stmt = Database::prepare("
UPDATE `" . TABLE_PANEL_SESSIONS . "`
SET `language`= :lng
WHERE `hash`= :hash"
);
Database::pexecute($lng_stmt, array(
'lng' => $def_language,
'hash' => $s
));
try {
Admins::getLocal($userinfo, [
'id' => $userinfo['adminid'],
'def_language' => $def_language
])->update();
CurrentUser::setField('language', $def_language);
} catch (Exception $e) {
Response::dynamicError($e->getMessage());
}
$log->logAction(ADM_ACTION, LOG_NOTICE, "changed his/her default language to '" . $def_language . "'");
redirectTo($filename, array('s' => $s));
}
$log->logAction(FroxlorLogger::ADM_ACTION, LOG_NOTICE, "changed his/her default language to '" . $def_language . "'");
Response::redirectTo($filename);
} else {
$language_options = '';
$default_lang = Settings::Get('panel.standardlanguage');
if ($userinfo['def_language'] != '') {
$default_lang = $userinfo['def_language'];
}
while (list($language_file, $language_name) = each($languages)) {
$language_options.= makeoption($language_name, $language_file, $default_lang, true);
UI::view('user/change_language.html.twig', [
'languages' => $languages,
'default_lang' => $default_lang
]);
}
eval("echo \"" . getTemplate("index/change_language") . "\";");
}
} elseif ($page == 'change_theme') {
if (isset($_POST['send']) && $_POST['send'] == 'send') {
$theme = Validate::validate($_POST['theme'], 'theme');
try {
Admins::getLocal($userinfo, [
'id' => $userinfo['adminid'],
'theme' => $theme
])->update();
} catch (Exception $e) {
Response::dynamicError($e->getMessage());
}
if (isset($_POST['send'])
&& $_POST['send'] == 'send'
) {
$theme = validate($_POST['theme'], 'theme');
$theme_stmt = Database::prepare("
UPDATE `" . TABLE_PANEL_ADMINS . "`
SET `theme`= :theme
WHERE `adminid`= :adminid"
);
Database::pexecute($theme_stmt, array(
'theme' => $theme,
'adminid' => (int)$userinfo['adminid']
));
$theme_stmt = Database::prepare("
UPDATE `" . TABLE_PANEL_SESSIONS . "`
SET `theme`= :theme
WHERE `hash`= :hash"
);
Database::pexecute($theme_stmt, array(
'theme' => $theme,
'hash' => $s
));
$log->logAction(ADM_ACTION, LOG_NOTICE, "changed his/her theme to '" . $theme . "'");
redirectTo($filename, array('s' => $s));
$log->logAction(FroxlorLogger::ADM_ACTION, LOG_NOTICE, "changed his/her theme to '" . $theme . "'");
Response::redirectTo($filename);
} else {
$theme_options = '';
$default_theme = Settings::Get('panel.default_theme');
if ($userinfo['theme'] != '') {
$default_theme = $userinfo['theme'];
}
$themes_avail = getThemes();
foreach ($themes_avail as $t => $d) {
$theme_options.= makeoption($d, $t, $default_theme, true);
}
eval("echo \"" . getTemplate("index/change_theme") . "\";");
}
} elseif ($page == 'send_error_report'
&& Settings::Get('system.allow_error_report_admin') == '1'
) {
// only show this if we really have an exception to report
if (isset($_GET['errorid'])
&& $_GET['errorid'] != ''
) {
$errid = $_GET['errorid'];
// read error file
$err_dir = makeCorrectDir(FROXLOR_INSTALL_DIR."/logs/");
$err_file = makeCorrectFile($err_dir."/".$errid."_sql-error.log");
if (file_exists($err_file)) {
$error_content = file_get_contents($err_file);
$error = explode("|", $error_content);
$_error = array(
'code' => str_replace("\n", "", substr($error[1], 5)),
'message' => str_replace("\n", "", substr($error[2], 4)),
'file' => str_replace("\n", "", substr($error[3], 5 + strlen(FROXLOR_INSTALL_DIR))),
'line' => str_replace("\n", "", substr($error[4], 5)),
'trace' => str_replace(FROXLOR_INSTALL_DIR, "", substr($error[5], 6))
);
// build mail-content
$mail_body = "Dear froxlor-team,\n\n";
$mail_body .= "the following error has been reported by a user:\n\n";
$mail_body .= "-------------------------------------------------------------\n";
$mail_body .= $_error['code'].' '.$_error['message']."\n\n";
$mail_body .= "File: ".$_error['file'].':'.$_error['line']."\n\n";
$mail_body .= "Trace:\n".trim($_error['trace'])."\n\n";
$mail_body .= "-------------------------------------------------------------\n\n";
$mail_body .= "Froxlor-version: ".$version."\n\n";
$mail_body .= "End of report";
$mail_html = nl2br($mail_body);
// send actual report to dev-team
if (isset($_POST['send'])
&& $_POST['send'] == 'send'
) {
// send mail and say thanks
$_mailerror = false;
try {
$mail->Subject = '[Froxlor] Error report by user';
$mail->AltBody = $mail_body;
$mail->MsgHTML($mail_html);
$mail->AddAddress('error-reports@froxlor.org', 'Froxlor Developer Team');
$mail->Send();
} catch(phpmailerException $e) {
$mailerr_msg = $e->errorMessage();
$_mailerror = true;
} catch (Exception $e) {
$mailerr_msg = $e->getMessage();
$_mailerror = true;
}
if ($_mailerror) {
// error when reporting an error...LOLFUQ
standard_error('send_report_error', $mailerr_msg);
}
// finally remove error from fs
@unlink($err_file);
redirectTo($filename, array('s' => $s));
}
// show a nice summary of the error-report
// before actually sending anything
eval("echo \"" . getTemplate("index/send_error_report") . "\";");
} else {
redirectTo($filename, array('s' => $s));
}
} else {
redirectTo($filename, array('s' => $s));
$themes_avail = UI::getThemes();
UI::view('user/change_theme.html.twig', [
'themes' => $themes_avail,
'default_theme' => $default_theme
]);
}
} elseif ($page == 'send_error_report' && Settings::Get('system.allow_error_report_admin') == '1') {
require_once __DIR__ . '/error_report.php';
} elseif ($page == 'apikeys' && Settings::Get('api.enabled') == 1) {
require_once __DIR__ . '/api_keys.php';
} elseif ($page == '2fa' && Settings::Get('2fa.enabled') == 1) {
require_once __DIR__ . '/2fa.php';
}

View File

@@ -2,432 +2,152 @@
/**
* This file is part of the Froxlor project.
* Copyright (c) 2003-2009 the SysCP Team (see authors).
* Copyright (c) 2010 the Froxlor Team (see authors).
*
* For the full copyright and license information, please view the COPYING
* file that was distributed with this source code. You can also view the
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* @copyright (c) the authors
* @author Florian Lippert <flo@syscp.org> (2003-2009)
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Panel
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, you can also view it online at
* https://files.froxlor.org/misc/COPYING.txt
*
* @copyright the authors
* @author Froxlor team <team@froxlor.org>
* @license https://files.froxlor.org/misc/COPYING.txt GPLv2
*/
define('AREA', 'admin');
require './lib/init.php';
const AREA = 'admin';
require __DIR__ . '/lib/init.php';
if (isset($_POST['id'])) {
$id = intval($_POST['id']);
} elseif(isset($_GET['id'])) {
$id = intval($_GET['id']);
}
use Froxlor\Api\Commands\IpsAndPorts;
use Froxlor\FroxlorLogger;
use Froxlor\PhpHelper;
use Froxlor\UI\Collection;
use Froxlor\UI\HTML;
use Froxlor\UI\Listing;
use Froxlor\UI\Panel\UI;
use Froxlor\UI\Request;
use Froxlor\UI\Response;
if ($page == 'ipsandports'
|| $page == 'overview'
) {
$id = (int)Request::any('id');
if (($page == 'ipsandports' || $page == 'overview') && $userinfo['change_serversettings'] == '1') {
if ($action == '') {
$log->logAction(FroxlorLogger::ADM_ACTION, LOG_NOTICE, "viewed admin_ipsandports");
$log->logAction(ADM_ACTION, LOG_NOTICE, "viewed admin_ipsandports");
$fields = array(
'ip' => $lng['admin']['ipsandports']['ip'],
'port' => $lng['admin']['ipsandports']['port']
);
$paging = new paging($userinfo, TABLE_PANEL_IPSANDPORTS, $fields);
$ipsandports = '';
$result_stmt = Database::prepare("SELECT * FROM `" . TABLE_PANEL_IPSANDPORTS . "` " . $paging->getSqlWhere(false) . " " . $paging->getSqlOrderBy() . " " . $paging->getSqlLimit());
Database::pexecute($result_stmt);
$paging->setEntries(Database::num_rows());
$sortcode = $paging->getHtmlSortCode($lng);
$arrowcode = $paging->getHtmlArrowCode($filename . '?page=' . $page . '&s=' . $s);
$searchcode = $paging->getHtmlSearchCode($lng);
$pagingcode = $paging->getHtmlPagingCode($filename . '?page=' . $page . '&s=' . $s);
$i = 0;
$count = 0;
while ($row = $result_stmt->fetch(PDO::FETCH_ASSOC)) {
if ($paging->checkDisplay($i)) {
$row = htmlentities_array($row);
if (filter_var($row['ip'], FILTER_VALIDATE_IP, FILTER_FLAG_IPV6)) {
$row['ip'] = '[' . $row['ip'] . ']';
}
eval("\$ipsandports.=\"" . getTemplate("ipsandports/ipsandports_ipandport") . "\";");
$count++;
}
$i++;
try {
$ipsandports_list_data = include_once dirname(__FILE__) . '/lib/tablelisting/admin/tablelisting.ipsandports.php';
$collection = (new Collection(IpsAndPorts::class, $userinfo))
->withPagination($ipsandports_list_data['ipsandports_list']['columns'], $ipsandports_list_data['ipsandports_list']['default_sorting']);
} catch (Exception $e) {
Response::dynamicError($e->getMessage());
}
eval("echo \"" . getTemplate("ipsandports/ipsandports") . "\";");
} elseif($action == 'delete'
&& $id != 0
) {
$result_stmt = Database::prepare("SELECT `id`, `ip`, `port` FROM `" . TABLE_PANEL_IPSANDPORTS . "` WHERE `id` = :id");
$result = Database::pexecute_first($result_stmt, array('id' => $id));
if (isset($result['id'])
&& $result['id'] == $id
) {
$result_checkdomain_stmt = Database::prepare("
SELECT `id_domain` as `id` FROM `" . TABLE_DOMAINTOIP . "` WHERE `id_ipandports` = :id"
);
$result_checkdomain = Database::pexecute_first($result_checkdomain_stmt, array('id' => $id));
if ($result_checkdomain['id'] == '') {
if ($result['id'] != Settings::Get('system.defaultip')) {
$result_sameipotherport_stmt = Database::prepare("
SELECT `id` FROM `" . TABLE_PANEL_IPSANDPORTS . "`
WHERE `ip` = :ip AND `id` <> :id"
);
$result_sameipotherport = Database::pexecute_first($result_sameipotherport_stmt, array('id' => $id, 'ip' => $result['ip']));
if (($result['ip'] != Settings::Get('system.ipaddress'))
|| ($result['ip'] == Settings::Get('system.ipaddress')
&& $result_sameipotherport['id'] != '')
) {
$result_stmt = Database::prepare("
SELECT `ip`, `port` FROM `" . TABLE_PANEL_IPSANDPORTS . "`
WHERE `id` = :id"
);
$result = Database::pexecute_first($result_stmt, array('id' => $id));
if ($result['ip'] != '') {
if (isset($_POST['send'])
&& $_POST['send'] == 'send'
) {
$del_stmt = Database::prepare("
DELETE FROM `" . TABLE_PANEL_IPSANDPORTS . "`
WHERE `id` = :id"
);
Database::pexecute($del_stmt, array('id' => $id));
// also, remove connections to domains (multi-stack)
$del_stmt = Database::prepare("
DELETE FROM `".TABLE_DOMAINTOIP."` WHERE `id_ipandports` = :id"
);
Database::pexecute($del_stmt, array('id' => $id));
$log->logAction(ADM_ACTION, LOG_WARNING, "deleted IP/port '" . $result['ip'] . ":" . $result['port'] . "'");
inserttask('1');
// Using nameserver, insert a task which rebuilds the server config
inserttask('4');
redirectTo($filename, array('page' => $page, 's' => $s));
} else {
ask_yesno('admin_ip_reallydelete', $filename, array('id' => $id, 'page' => $page, 'action' => $action), $result['ip'] . ':' . $result['port']);
}
}
} else {
standard_error('cantdeletesystemip');
}
} else {
standard_error('cantdeletedefaultip');
}
} else {
standard_error('ipstillhasdomains');
}
}
} elseif($action == 'add') {
if (isset($_POST['send'])
&& $_POST['send'] == 'send'
) {
$ip = validate_ip($_POST['ip']);
$port = validate($_POST['port'], 'port', '/^(([1-9])|([1-9][0-9])|([1-9][0-9][0-9])|([1-9][0-9][0-9][0-9])|([1-5][0-9][0-9][0-9][0-9])|(6[0-4][0-9][0-9][0-9])|(65[0-4][0-9][0-9])|(655[0-2][0-9])|(6553[0-5]))$/Di', array('stringisempty', 'myport'));
$listen_statement = isset($_POST['listen_statement']) ? 1 : 0;
$namevirtualhost_statement = isset($_POST['namevirtualhost_statement']) ? 1 : 0;
$vhostcontainer = isset($_POST['vhostcontainer']) ? 1 : 0;
$specialsettings = validate(str_replace("\r\n", "\n", $_POST['specialsettings']), 'specialsettings', '/^[^\0]*$/');
$vhostcontainer_servername_statement = isset($_POST['vhostcontainer_servername_statement']) ? 1 : 0;
$default_vhostconf_domain = validate(str_replace("\r\n", "\n", $_POST['default_vhostconf_domain']), 'default_vhostconf_domain', '/^[^\0]*$/');
$docroot = validate($_POST['docroot'], 'docroot');
if ((int)Settings::Get('system.use_ssl') == 1) {
$ssl = isset($_POST['ssl']) ? intval($_POST['ssl']) : 0;
$ssl_cert_file = validate($_POST['ssl_cert_file'], 'ssl_cert_file');
$ssl_key_file = validate($_POST['ssl_key_file'], 'ssl_key_file');
$ssl_ca_file = validate($_POST['ssl_ca_file'], 'ssl_ca_file');
$ssl_cert_chainfile = validate($_POST['ssl_cert_chainfile'], 'ssl_cert_chainfile');
} else {
$ssl = 0;
$ssl_cert_file = '';
$ssl_key_file = '';
$ssl_ca_file = '';
$ssl_cert_chainfile = '';
}
if ($listen_statement != '1') {
$listen_statement = '0';
}
if ($namevirtualhost_statement != '1') {
$namevirtualhost_statement = '0';
}
if ($vhostcontainer != '1') {
$vhostcontainer = '0';
}
if ($vhostcontainer_servername_statement != '1') {
$vhostcontainer_servername_statement = '0';
}
if ($ssl != '1') {
$ssl = '0';
}
if ($ssl_cert_file != '') {
$ssl_cert_file = makeCorrectFile($ssl_cert_file);
}
if ($ssl_key_file != '') {
$ssl_key_file = makeCorrectFile($ssl_key_file);
}
if ($ssl_ca_file != '') {
$ssl_ca_file = makeCorrectFile($ssl_ca_file);
}
if ($ssl_cert_chainfile != '') {
$ssl_cert_chainfile = makeCorrectFile($ssl_cert_chainfile);
}
if (strlen(trim($docroot)) > 0) {
$docroot = makeCorrectDir($docroot);
} else {
$docroot = '';
}
$result_checkfordouble_stmt = Database::prepare("
SELECT `id` FROM `" . TABLE_PANEL_IPSANDPORTS . "`
WHERE `ip` = :ip AND `port` = :port"
);
$result_checkfordouble = Database::pexecute_first($result_checkfordouble_stmt, array('ip' => $ip, 'port' => $port));
if ($result_checkfordouble['id'] != '') {
standard_error('myipnotdouble');
} else {
$ins_stmt = Database::prepare("
INSERT INTO `" . TABLE_PANEL_IPSANDPORTS . "`
SET
`ip` = :ip, `port` = :port, `listen_statement` = :ls,
`namevirtualhost_statement` = :nvhs, `vhostcontainer` = :vhc,
`vhostcontainer_servername_statement` = :vhcss,
`specialsettings` = :ss, `ssl` = :ssl,
`ssl_cert_file` = :ssl_cert, `ssl_key_file` = :ssl_key,
`ssl_ca_file` = :ssl_ca, `ssl_cert_chainfile` = :ssl_chain,
`default_vhostconf_domain` = :dvhd, `docroot` = :docroot;
");
$ins_data = array(
'ip' => $ip,
'port' => $port,
'ls' => $listen_statement,
'nvhs' => $namevirtualhost_statement,
'vhc' => $vhostcontainer,
'vhcss' => $vhostcontainer_servername_statement,
'ss' => $specialsettings,
'ssl' => $ssl,
'ssl_cert' => $ssl_cert_file,
'ssl_key' => $ssl_key_file,
'ssl_ca' => $ssl_ca_file,
'ssl_chain' => $ssl_cert_chainfile,
'dvhd' => $default_vhostconf_domain,
'docroot' => $docroot
);
Database::pexecute($ins_stmt, $ins_data);
if (filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_IPV6)) {
$ip = '[' . $ip . ']';
}
$log->logAction(ADM_ACTION, LOG_WARNING, "added IP/port '" . $ip . ":" . $port . "'");
inserttask('1');
// Using nameserver, insert a task which rebuilds the server config
inserttask('4');
redirectTo($filename, Array('page' => $page, 's' => $s));
}
} else {
$ipsandports_add_data = include_once dirname(__FILE__).'/lib/formfields/admin/ipsandports/formfield.ipsandports_add.php';
$ipsandports_add_form = htmlform::genHTMLForm($ipsandports_add_data);
$title = $ipsandports_add_data['ipsandports_add']['title'];
$image = $ipsandports_add_data['ipsandports_add']['image'];
eval("echo \"" . getTemplate("ipsandports/ipsandports_add") . "\";");
}
} elseif($action == 'edit'
&& $id != 0
) {
$result_stmt = Database::prepare("
SELECT * FROM `" . TABLE_PANEL_IPSANDPORTS . "` WHERE `id` = :id"
);
$result = Database::pexecute_first($result_stmt, array('id' => $id));
if ($result['ip'] != '') {
if (isset($_POST['send'])
&& $_POST['send'] == 'send'
) {
$ip = validate_ip($_POST['ip']);
$port = validate($_POST['port'], 'port', '/^(([1-9])|([1-9][0-9])|([1-9][0-9][0-9])|([1-9][0-9][0-9][0-9])|([1-5][0-9][0-9][0-9][0-9])|(6[0-4][0-9][0-9][0-9])|(65[0-4][0-9][0-9])|(655[0-2][0-9])|(6553[0-5]))$/Di', array('stringisempty', 'myport'));
$listen_statement = isset($_POST['listen_statement']) ? 1 : 0;
$namevirtualhost_statement = isset($_POST['namevirtualhost_statement']) ? 1 : 0;
$vhostcontainer = isset($_POST['vhostcontainer']) ? 1 : 0;
$specialsettings = validate(str_replace("\r\n", "\n", $_POST['specialsettings']), 'specialsettings', '/^[^\0]*$/');
$vhostcontainer_servername_statement = isset($_POST['vhostcontainer_servername_statement']) ? 1 : 0;
$default_vhostconf_domain = validate(str_replace("\r\n", "\n", $_POST['default_vhostconf_domain']), 'default_vhostconf_domain', '/^[^\0]*$/');
$docroot = validate($_POST['docroot'], 'docroot');
$result_checkfordouble_stmt = Database::prepare("
SELECT `id` FROM `" . TABLE_PANEL_IPSANDPORTS . "`
WHERE `ip` = :ip AND `port` = :port"
);
$result_checkfordouble = Database::pexecute_first($result_checkfordouble_stmt, array('ip' => $ip, 'port' => $port));
$result_sameipotherport_stmt = Database::prepare("
SELECT `id` FROM `" . TABLE_PANEL_IPSANDPORTS . "`
WHERE `ip` = :ip AND `id` <> :id"
);
$result_sameipotherport = Database::pexecute_first($result_sameipotherport_stmt, array('ip' => $ip, 'id' => $id));
if ((int)Settings::Get('system.use_ssl') == 1
&& isset($_POST['ssl'])
&& $_POST['ssl'] != 0
) {
$ssl = 1;
$ssl_cert_file = validate($_POST['ssl_cert_file'], 'ssl_cert_file');
$ssl_key_file = validate($_POST['ssl_key_file'], 'ssl_key_file');
$ssl_ca_file = validate($_POST['ssl_ca_file'], 'ssl_ca_file');
$ssl_cert_chainfile = validate($_POST['ssl_cert_chainfile'], 'ssl_cert_chainfile');
} else {
$ssl = 0;
$ssl_cert_file = '';
$ssl_key_file = '';
$ssl_ca_file = '';
$ssl_cert_chainfile = '';
}
if ($listen_statement != '1') {
$listen_statement = '0';
}
if ($namevirtualhost_statement != '1') {
$namevirtualhost_statement = '0';
}
if ($vhostcontainer != '1') {
$vhostcontainer = '0';
}
if ($vhostcontainer_servername_statement != '1') {
$vhostcontainer_servername_statement = '0';
}
if ($ssl != '1') {
$ssl = '0';
}
if ($ssl_cert_file != '') {
$ssl_cert_file = makeCorrectFile($ssl_cert_file);
}
if ($ssl_key_file != '') {
$ssl_key_file = makeCorrectFile($ssl_key_file);
}
if ($ssl_ca_file != '') {
$ssl_ca_file = makeCorrectFile($ssl_ca_file);
}
if ($ssl_cert_chainfile != '') {
$ssl_cert_chainfile = makeCorrectFile($ssl_cert_chainfile);
}
if (strlen(trim($docroot)) > 0) {
$docroot = makeCorrectDir($docroot);
} else {
$docroot = '';
}
if ($result['ip'] != $ip
&& $result['ip'] == Settings::Get('system.ipaddress')
&& $result_sameipotherport['id'] == ''
) {
standard_error('cantchangesystemip');
} elseif($result_checkfordouble['id'] != ''
&& $result_checkfordouble['id'] != $id
) {
standard_error('myipnotdouble');
} else {
$upd_stmt = Database::prepare("
UPDATE `" . TABLE_PANEL_IPSANDPORTS . "`
SET
`ip` = :ip, `port` = :port, `listen_statement` = :ls,
`namevirtualhost_statement` = :nvhs, `vhostcontainer` = :vhc,
`vhostcontainer_servername_statement` = :vhcss,
`specialsettings` = :ss, `ssl` = :ssl,
`ssl_cert_file` = :ssl_cert, `ssl_key_file` = :ssl_key,
`ssl_ca_file` = :ssl_ca, `ssl_cert_chainfile` = :ssl_chain,
`default_vhostconf_domain` = :dvhd, `docroot` = :docroot
WHERE `id` = :id;
");
$upd_data = array(
'ip' => $ip,
'port' => $port,
'ls' => $listen_statement,
'nvhs' => $namevirtualhost_statement,
'vhc' => $vhostcontainer,
'vhcss' => $vhostcontainer_servername_statement,
'ss' => $specialsettings,
'ssl' => $ssl,
'ssl_cert' => $ssl_cert_file,
'ssl_key' => $ssl_key_file,
'ssl_ca' => $ssl_ca_file,
'ssl_chain' => $ssl_cert_chainfile,
'dvhd' => $default_vhostconf_domain,
'docroot' => $docroot,
UI::view('user/table.html.twig', [
'listing' => Listing::format($collection, $ipsandports_list_data, 'ipsandports_list'),
'actions_links' => [
[
'href' => $linker->getLink(['section' => 'ipsandports', 'page' => $page, 'action' => 'add']),
'label' => lng('admin.ipsandports.add')
]
]
]);
} elseif ($action == 'delete' && $id != 0) {
try {
$json_result = IpsAndPorts::getLocal($userinfo, [
'id' => $id
);
Database::pexecute($upd_stmt, $upd_data);
])->get();
} catch (Exception $e) {
Response::dynamicError($e->getMessage());
}
$result = json_decode($json_result, true)['data'];
$log->logAction(ADM_ACTION, LOG_WARNING, "changed IP/port from '" . $result['ip'] . ":" . $result['port'] . "' to '" . $ip . ":" . $port . "'");
inserttask('1');
// Using nameserver, insert a task which rebuilds the server config
inserttask('4');
redirectTo($filename, Array('page' => $page, 's' => $s));
if (isset($result['id']) && $result['id'] == $id) {
if (isset($_POST['send']) && $_POST['send'] == 'send') {
try {
IpsAndPorts::getLocal($userinfo, [
'id' => $id
])->delete();
} catch (Exception $e) {
Response::dynamicError($e->getMessage());
}
Response::redirectTo($filename, [
'page' => $page
]);
} else {
HTML::askYesNo('admin_ip_reallydelete', $filename, [
'id' => $id,
'page' => $page,
'action' => $action
], $result['ip'] . ':' . $result['port']);
}
}
} elseif ($action == 'add') {
if (isset($_POST['send']) && $_POST['send'] == 'send') {
try {
IpsAndPorts::getLocal($userinfo, $_POST)->add();
} catch (Exception $e) {
Response::dynamicError($e->getMessage());
}
Response::redirectTo($filename, [
'page' => $page
]);
} else {
$ipsandports_add_data = include_once dirname(__FILE__) . '/lib/formfields/admin/ipsandports/formfield.ipsandports_add.php';
$result = htmlentities_array($result);
UI::view('user/form.html.twig', [
'formaction' => $linker->getLink(['section' => 'ipsandports']),
'formdata' => $ipsandports_add_data['ipsandports_add']
]);
}
} elseif ($action == 'edit' && $id != 0) {
try {
$json_result = IpsAndPorts::getLocal($userinfo, [
'id' => $id
])->get();
} catch (Exception $e) {
Response::dynamicError($e->getMessage());
}
$result = json_decode($json_result, true)['data'];
if ($result['ip'] != '') {
if (isset($_POST['send']) && $_POST['send'] == 'send') {
try {
IpsAndPorts::getLocal($userinfo, $_POST)->update();
} catch (Exception $e) {
Response::dynamicError($e->getMessage());
}
Response::redirectTo($filename, [
'page' => $page
]);
} else {
$result = PhpHelper::htmlentitiesArray($result);
$ipsandports_edit_data = include_once dirname(__FILE__) . '/lib/formfields/admin/ipsandports/formfield.ipsandports_edit.php';
$ipsandports_edit_form = htmlform::genHTMLForm($ipsandports_edit_data);
$title = $ipsandports_edit_data['ipsandports_edit']['title'];
$image = $ipsandports_edit_data['ipsandports_edit']['image'];
eval("echo \"" . getTemplate("ipsandports/ipsandports_edit") . "\";");
UI::view('user/form.html.twig', [
'formaction' => $linker->getLink(['section' => 'ipsandports', 'id' => $id]),
'formdata' => $ipsandports_edit_data['ipsandports_edit'],
'editid' => $id
]);
}
}
} elseif ($action == 'jqCheckIP') {
$ip = $_POST['ip'] ?? "";
if ((filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_IPV6) || filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4)) && filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_NO_RES_RANGE | FILTER_FLAG_NO_PRIV_RANGE) == false) {
// returns notice if private network detected so we can display it
echo json_encode(lng('admin.ipsandports.ipnote'));
} else {
echo 0;
}
exit();
}
}

View File

@@ -2,153 +2,75 @@
/**
* This file is part of the Froxlor project.
* Copyright (c) 2003-2009 the SysCP Team (see authors).
* Copyright (c) 2010 the Froxlor Team (see authors).
*
* For the full copyright and license information, please view the COPYING
* file that was distributed with this source code. You can also view the
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* @copyright (c) the authors
* @author Florian Lippert <flo@syscp.org> (2003-2009)
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Panel
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, you can also view it online at
* https://files.froxlor.org/misc/COPYING.txt
*
* @copyright the authors
* @author Froxlor team <team@froxlor.org>
* @license https://files.froxlor.org/misc/COPYING.txt GPLv2
*/
define('AREA', 'admin');
require './lib/init.php';
const AREA = 'admin';
require __DIR__ . '/lib/init.php';
if ($page == 'log'
&& $userinfo['change_serversettings'] == '1'
) {
use Froxlor\Api\Commands\SysLog;
use Froxlor\UI\Collection;
use Froxlor\UI\HTML;
use Froxlor\UI\Listing;
use Froxlor\UI\Panel\UI;
use Froxlor\UI\Response;
if ($page == 'log' && $userinfo['change_serversettings'] == '1') {
if ($action == '') {
$fields = array(
'date' => $lng['logger']['date'],
'type' => $lng['logger']['type'],
'user' => $lng['logger']['user'],
'text' => $lng['logger']['action']
);
$paging = new paging($userinfo, TABLE_PANEL_LOG, $fields, null, null, 0, 'desc');
$result_stmt = Database::query('
SELECT * FROM `' . TABLE_PANEL_LOG . '` ' . $paging->getSqlWhere(false) . ' ' . $paging->getSqlOrderBy() . ' ' . $paging->getSqlLimit()
);
$paging->setEntries(Database::num_rows());
$sortcode = $paging->getHtmlSortCode($lng);
$arrowcode = $paging->getHtmlArrowCode($filename . '?page=' . $page . '&s=' . $s);
$searchcode = $paging->getHtmlSearchCode($lng);
$pagingcode = $paging->getHtmlPagingCode($filename . '?page=' . $page . '&s=' . $s);
$clog = array();
while ($row = $result_stmt->fetch(PDO::FETCH_ASSOC)) {
if (!isset($clog[$row['action']])
|| !is_array($clog[$row['action']])
) {
$clog[$row['action']] = array();
}
$clog[$row['action']][$row['logid']] = $row;
try {
$syslog_list_data = include_once dirname(__FILE__) . '/lib/tablelisting/tablelisting.syslog.php';
$collection = (new Collection(SysLog::class, $userinfo))
->withPagination($syslog_list_data['syslog_list']['columns'], $syslog_list_data['syslog_list']['default_sorting']);
} catch (Exception $e) {
Response::dynamicError($e->getMessage());
}
if ($paging->sortfield == 'date'
&& $paging->sortorder == 'desc'
) {
krsort($clog);
} else {
ksort($clog);
}
$i = 0;
$count = 0;
$log_count = 0;
$log = '';
foreach ($clog as $action => $logrows) {
$_action = 0;
foreach ($logrows as $row) {
if ($paging->checkDisplay($i)) {
$row = htmlentities_array($row);
$row['date'] = date("d.m.y H:i:s", $row['date']);
if ($_action != $action) {
switch ($action) {
case USR_ACTION:
$_action = $lng['admin']['customer'];
break;
case RES_ACTION:
$_action = $lng['logger']['reseller'];
break;
case ADM_ACTION:
$_action = $lng['logger']['admin'];
break;
case CRON_ACTION:
$_action = $lng['logger']['cron'];
break;
case LOGIN_ACTION:
$_action = $lng['logger']['login'];
break;
case LOG_ERROR:
$_action = $lng['logger']['intern'];
break;
default:
$_action = $lng['logger']['unknown'];
break;
}
$row['action'] = $_action;
eval("\$log.=\"" . getTemplate('logger/logger_action') . "\";");
}
$log_count++;
$type = $row['type'];
$_type = 'unknown';
switch ($type) {
case LOG_INFO:
$_type = 'Information';
break;
case LOG_NOTICE:
$_type = 'Notice';
break;
case LOG_WARNING:
$_type = 'Warning';
break;
case LOG_ERR:
$_type = 'Error';
break;
case LOG_CRIT:
$_type = 'Critical';
break;
default:
$_type = 'Unknown';
break;
}
$row['type'] = $_type;
eval("\$log.=\"" . getTemplate('logger/logger_log') . "\";");
$count++;
$_action = $action;
}
}
$i++;
}
eval("echo \"" . getTemplate('logger/logger') . "\";");
UI::view('user/table.html.twig', [
'listing' => Listing::format($collection, $syslog_list_data, 'syslog_list'),
'actions_links' => [
[
'href' => $linker->getLink(['section' => 'logger', 'page' => 'log', 'action' => 'truncate']),
'label' => lng('logger.truncate'),
'icon' => 'fa-solid fa-recycle',
'class' => 'btn-warning'
]
]
]);
} elseif ($action == 'truncate') {
if (isset($_POST['send'])
&& $_POST['send'] == 'send'
) {
$truncatedate = time() - (60 * 10);
$trunc_stmt = Database::prepare("
DELETE FROM `" . TABLE_PANEL_LOG . "` WHERE `date` < :trunc"
);
Database::pexecute($trunc_stmt, array('trunc' => $truncatedate));
$log->logAction(ADM_ACTION, LOG_WARNING, 'truncated the system-log (mysql)');
redirectTo($filename, array('page' => $page, 's' => $s));
if (isset($_POST['send']) && $_POST['send'] == 'send') {
try {
SysLog::getLocal($userinfo, [
'min_to_keep' => 10
])->delete();
} catch (Exception $e) {
Response::dynamicError($e->getMessage());
}
Response::redirectTo($filename, [
'page' => $page
]);
} else {
ask_yesno('logger_reallytruncate', $filename, array('page' => $page, 'action' => $action), TABLE_PANEL_LOG);
HTML::askYesNo('logger_reallytruncate', $filename, [
'page' => $page,
'action' => $action
], TABLE_PANEL_LOG);
}
}
}

View File

@@ -2,56 +2,65 @@
/**
* This file is part of the Froxlor project.
* Copyright (c) 2003-2009 the SysCP Team (see authors).
* Copyright (c) 2010 the Froxlor Team (see authors).
*
* For the full copyright and license information, please view the COPYING
* file that was distributed with this source code. You can also view the
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* @copyright (c) the authors
* @author Florian Lippert <flo@syscp.org> (2003-2009)
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Panel
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, you can also view it online at
* https://files.froxlor.org/misc/COPYING.txt
*
* @copyright the authors
* @author Froxlor team <team@froxlor.org>
* @license https://files.froxlor.org/misc/COPYING.txt GPLv2
*/
define('AREA', 'admin');
require './lib/init.php';
const AREA = 'admin';
require __DIR__ . '/lib/init.php';
if (isset($_POST['id'])) {
$id = intval($_POST['id']);
} elseif (isset($_GET['id'])) {
$id = intval($_GET['id']);
}
use Froxlor\Database\Database;
use Froxlor\FroxlorLogger;
use Froxlor\UI\Panel\UI;
use Froxlor\UI\Request;
use Froxlor\UI\Response;
use Froxlor\User;
$id = (int)Request::any('id');
$note_type = null;
$note_msg = null;
if ($page == 'message') {
if ($action == '') {
$log->logAction(ADM_ACTION, LOG_NOTICE, 'viewed panel_message');
$log->logAction(FroxlorLogger::ADM_ACTION, LOG_NOTICE, 'viewed panel_message');
if (isset($_POST['send'])
&& $_POST['send'] == 'send'
) {
if ($_POST['receipient'] == 0
&& $userinfo['customers_see_all'] == '1'
) {
$log->logAction(ADM_ACTION, LOG_NOTICE, 'sending messages to admins');
if (isset($_POST['send']) && $_POST['send'] == 'send') {
if ($_POST['recipient'] == 0 && $userinfo['customers_see_all'] == '1') {
$log->logAction(FroxlorLogger::ADM_ACTION, LOG_NOTICE, 'sending messages to admins');
$result = Database::query('SELECT `name`, `email` FROM `' . TABLE_PANEL_ADMINS . "`");
} elseif ($_POST['receipient'] == 1) {
} elseif ($_POST['recipient'] == 1) {
if ($userinfo['customers_see_all'] == '1') {
$log->logAction(ADM_ACTION, LOG_NOTICE, 'sending messages to ALL customers');
$log->logAction(FroxlorLogger::ADM_ACTION, LOG_NOTICE, 'sending messages to ALL customers');
$result = Database::query('SELECT `firstname`, `name`, `company`, `email` FROM `' . TABLE_PANEL_CUSTOMERS . "`");
} else {
$log->logAction(ADM_ACTION, LOG_NOTICE, 'sending messages to customers');
$log->logAction(FroxlorLogger::ADM_ACTION, LOG_NOTICE, 'sending messages to customers');
$result = Database::prepare('
SELECT `firstname`, `name`, `company`, `email` FROM `' . TABLE_PANEL_CUSTOMERS . "`
WHERE `adminid` = :adminid"
);
Database::pexecute($result, array('adminid' => $userinfo['adminid']));
WHERE `adminid` = :adminid");
Database::pexecute($result, [
'adminid' => $userinfo['adminid']
]);
}
} else {
standard_error('noreceipientsgiven');
Response::standardError('norecipientsgiven');
}
$subject = $_POST['subject'];
@@ -63,10 +72,13 @@ if ($page == 'message') {
$mail->Subject = $subject;
while ($row = $result->fetch(PDO::FETCH_ASSOC)) {
$row['firstname'] = isset($row['firstname']) ? $row['firstname'] : '';
$row['company'] = isset($row['company']) ? $row['company'] : '';
$mail->AddAddress($row['email'], getCorrectUserSalutation(array('firstname' => $row['firstname'], 'name' => $row['name'], 'company' => $row['company'])));
$mail->AddAddress($row['email'], User::getCorrectUserSalutation([
'firstname' => $row['firstname'],
'name' => $row['name'],
'company' => $row['company']
]));
$mail->From = $userinfo['email'];
$mail->FromName = (isset($userinfo['firstname']) ? $userinfo['firstname'] . ' ' : '') . $userinfo['name'];
@@ -77,45 +89,62 @@ if ($page == 'message') {
$mailerr_msg = $row['email'];
}
$log->logAction(ADM_ACTION, LOG_ERR, 'Error sending mail: ' . $mailerr_msg);
standard_error('errorsendingmail', $row['email']);
$log->logAction(FroxlorLogger::ADM_ACTION, LOG_ERR, 'Error sending mail: ' . $mailerr_msg);
Response::standardError('errorsendingmail', $row['email']);
}
$mailcounter++;
$mail->ClearAddresses();
}
redirectTo($filename, array('page' => $page, 's' => $s, 'action' => 'showsuccess', 'sentitems' => $mailcounter));
Response::redirectTo($filename, [
'page' => $page,
'action' => 'showsuccess',
'sentitems' => $mailcounter
]);
} else {
standard_error('nomessagetosend');
Response::standardError('nomessagetosend');
}
}
}
if ($action == 'showsuccess') {
$success = 1;
} elseif ($action == 'showsuccess') {
$sentitems = isset($_GET['sentitems']) ? (int)$_GET['sentitems'] : 0;
if ($sentitems == 0) {
$successmessage = $lng['message']['noreceipients'];
$note_type = 'info';
$note_msg = lng('message.norecipients');
} else {
$successmessage = str_replace('%s', $sentitems, $lng['message']['success']);
$note_type = 'success';
$note_msg = str_replace('%s', $sentitems, lng('message.success'));
}
}
} else {
$success = 0;
$sentitems = 0;
$successmessage = '';
}
$action = '';
$receipients = '';
$recipients = [];
if ($userinfo['customers_see_all'] == '1') {
$receipients.= makeoption($lng['panel']['reseller'], 0);
$recipients[0] = lng('panel.reseller');
}
$recipients[1] = lng('panel.customer');
$receipients .= makeoption($lng['panel']['customer'], 1);
eval("echo \"" . getTemplate('message/message') . "\";");
$messages_add_data = include_once dirname(__FILE__) . '/lib/formfields/admin/messages/formfield.messages_add.php';
UI::view('user/form-note.html.twig', [
'formaction' => $linker->getLink(['section' => 'message']),
'formdata' => $messages_add_data['messages_add'],
'actions_links' => [
[
'href' => $linker->getLink([
'section' => 'settings',
'page' => 'overview',
'part' => 'system',
'em' => 'system_mail_use_smtp'
]),
'label' => lng('admin.smtpsettings'),
'icon' => 'fa-solid fa-gears',
'class' => 'btn-outline-secondary'
]
],
// alert-box
'type' => $note_type,
'alert_msg' => $note_msg
]);
}

144
admin_mysqlserver.php Normal file
View File

@@ -0,0 +1,144 @@
<?php
/**
* This file is part of the Froxlor project.
* Copyright (c) 2010 the Froxlor Team (see authors).
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, you can also view it online at
* https://files.froxlor.org/misc/COPYING.txt
*
* @copyright the authors
* @author Froxlor team <team@froxlor.org>
* @license https://files.froxlor.org/misc/COPYING.txt GPLv2
*/
const AREA = 'admin';
require __DIR__ . '/lib/init.php';
use Froxlor\Api\Commands\MysqlServer;
use Froxlor\FroxlorLogger;
use Froxlor\PhpHelper;
use Froxlor\UI\Collection;
use Froxlor\UI\HTML;
use Froxlor\UI\Listing;
use Froxlor\UI\Panel\UI;
use Froxlor\UI\Request;
use Froxlor\UI\Response;
$id = (int)Request::any('id');
if (($page == 'mysqlserver' || $page == 'overview') && $userinfo['change_serversettings'] == '1') {
if ($action == '') {
$log->logAction(FroxlorLogger::ADM_ACTION, LOG_NOTICE, "viewed admin_mysqlserver");
try {
$mysqlserver_list_data = include_once dirname(__FILE__) . '/lib/tablelisting/admin/tablelisting.mysqlserver.php';
$collection = (new Collection(MysqlServer::class, $userinfo))
->withPagination($mysqlserver_list_data['mysqlserver_list']['columns'], $mysqlserver_list_data['mysqlserver_list']['default_sorting']);
} catch (Exception $e) {
Response::dynamicError($e->getMessage());
}
UI::view('user/table.html.twig', [
'listing' => Listing::format($collection, $mysqlserver_list_data, 'mysqlserver_list'),
'actions_links' => [
[
'href' => $linker->getLink(['section' => 'mysqlserver', 'page' => $page, 'action' => 'add']),
'label' => lng('admin.mysqlserver.add')
]
]
]);
} elseif ($action == 'delete' && $id != 0) {
try {
$json_result = MysqlServer::getLocal($userinfo, [
'id' => $id
])->get();
} catch (Exception $e) {
Response::dynamicError($e->getMessage());
}
$result = json_decode($json_result, true)['data'];
if (isset($result['id']) && $result['id'] == $id) {
if (isset($_POST['send']) && $_POST['send'] == 'send') {
try {
MysqlServer::getLocal($userinfo, [
'id' => $id
])->delete();
} catch (Exception $e) {
Response::dynamicError($e->getMessage());
}
Response::redirectTo($filename, [
'page' => $page
]);
} else {
HTML::askYesNo('admin_mysqlserver_reallydelete', $filename, [
'id' => $id,
'page' => $page,
'action' => $action
], $result['caption'] . ' (' . $result['host'] . ')');
}
}
} elseif ($action == 'add') {
if (isset($_POST['send']) && $_POST['send'] == 'send') {
try {
MysqlServer::getLocal($userinfo, $_POST)->add();
} catch (Exception $e) {
Response::dynamicError($e->getMessage());
}
Response::redirectTo($filename, [
'page' => $page
]);
} else {
$mysqlserver_add_data = include_once dirname(__FILE__) . '/lib/formfields/admin/mysqlserver/formfield.mysqlserver_add.php';
UI::view('user/form.html.twig', [
'formaction' => $linker->getLink(['section' => 'mysqlserver']),
'formdata' => $mysqlserver_add_data['mysqlserver_add']
]);
}
} elseif ($action == 'edit' && $id >= 0) {
try {
$json_result = MysqlServer::getLocal($userinfo, [
'id' => $id
])->get();
} catch (Exception $e) {
Response::dynamicError($e->getMessage());
}
$result = json_decode($json_result, true)['data'];
if (isset($result['id']) && $result['id'] == $id) {
if (isset($_POST['send']) && $_POST['send'] == 'send') {
try {
MysqlServer::getLocal($userinfo, $_POST)->update();
} catch (Exception $e) {
Response::dynamicError($e->getMessage());
}
Response::redirectTo($filename, [
'page' => $page
]);
} else {
$result = PhpHelper::htmlentitiesArray($result);
$mysqlserver_edit_data = include_once dirname(__FILE__) . '/lib/formfields/admin/mysqlserver/formfield.mysqlserver_edit.php';
UI::view('user/form.html.twig', [
'formaction' => $linker->getLink(['section' => 'mysqlserver', 'id' => $id]),
'formdata' => $mysqlserver_edit_data['mysqlserver_edit'],
'editid' => $id
]);
}
}
}
}

308
admin_opcacheinfo.php Normal file
View File

@@ -0,0 +1,308 @@
<?php
/**
* This file is part of the Froxlor project.
* Copyright (c) 2010 the Froxlor Team (see authors).
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, you can also view it online at
* https://files.froxlor.org/misc/COPYING.txt
*
* @copyright the authors
* @author Froxlor team <team@froxlor.org>
* @author Janos Muzsi <muzsij@hypernics.hu>
* @author Andrew Collington <andy@amnuts.com>
* @license https://files.froxlor.org/misc/COPYING.txt GPLv2
*
* Based on https://github.com/amnuts/opcache-gui, which is
* licensed under the MIT licence, which can be viewed
* online at https://acollington.mit-license.org/
*/
const AREA = 'admin';
require __DIR__ . '/lib/init.php';
use Froxlor\FroxlorLogger;
use Froxlor\UI\Panel\UI;
use Froxlor\UI\Response;
use Froxlor\UI\HTML;
if ($action == 'reset' && function_exists('opcache_reset') && $userinfo['change_serversettings'] == '1') {
if ($_POST['send'] == 'send') {
opcache_reset();
$log->logAction(FroxlorLogger::ADM_ACTION, LOG_INFO, "reset OPcache");
header('Location: ' . $linker->getLink([
'section' => 'opcacheinfo',
'page' => 'showinfo'
]));
exit();
} else {
HTML::askYesNo('cache_reallydelete', $filename, [
'page' => $page,
'action' => 'reset',
], '', [
'section' => 'opcacheinfo',
'page' => 'showinfo'
]);
}
}
if (!function_exists('opcache_get_configuration')) {
Response::standardError(lng('error.no_opcacheinfo'));
}
if ($page == 'showinfo' && $userinfo['change_serversettings'] == '1') {
$time = time();
$log->logAction(FroxlorLogger::ADM_ACTION, LOG_NOTICE, "viewed OPcache info");
$optimizationLevels = [
1 << 0 => 'CSE, STRING construction',
1 << 1 => 'Constant conversion and jumps',
1 << 2 => '++, +=, series of jumps',
1 << 3 => 'INIT_FCALL_BY_NAME -> DO_FCALL',
1 << 4 => 'CFG based optimization',
1 << 5 => 'DFA based optimization',
1 << 6 => 'CALL GRAPH optimization',
1 << 7 => 'SCCP (constant propagation)',
1 << 8 => 'TMP VAR usage',
1 << 9 => 'NOP removal',
1 << 10 => 'Merge equal constants',
1 << 11 => 'Adjust used stack',
1 << 12 => 'Remove unused variables',
1 << 13 => 'DCE (dead code elimination)',
1 << 14 => '(unsafe) Collect constants',
1 << 15 => 'Inline functions'
];
$jitModes = [
[
'flag' => 'CPU-specific optimization',
'value' => [
'Disable CPU-specific optimization',
'Enable use of AVX, if the CPU supports it'
]
],
[
'flag' => 'Register allocation',
'value' => [
'Do not perform register allocation',
'Perform block-local register allocation',
'Perform global register allocation'
]
],
[
'flag' => 'Trigger',
'value' => [
'Compile all functions on script load',
'Compile functions on first execution',
'Profile functions on first request and compile the hottest functions afterwards',
'Profile on the fly and compile hot functions',
'Currently unused',
'Use tracing JIT. Profile on the fly and compile traces for hot code segments'
]
],
[
'flag' => 'Optimization level',
'value' => [
'No JIT',
'Minimal JIT (call standard VM handlers)',
'Inline VM handlers',
'Use type inference',
'Use call graph',
'Optimize whole script'
]
]
];
$jitModeMapping = [
'tracing' => 1254,
'on' => 1254,
'function' => 1205
];
$status = opcache_get_status(false);
$config = opcache_get_configuration();
$missingConfig = array_diff_key(ini_get_all('zend opcache', false), $config['directives']);
if (!empty($missingConfig)) {
$config['directives'] = array_merge($config['directives'], $missingConfig);
}
$files = [];
if (!empty($status['scripts'])) {
uasort($status['scripts'], static function ($a, $b) {
return $a['hits'] <=> $b['hits'];
});
foreach ($status['scripts'] as &$file) {
$file['full_path'] = str_replace('\\', '/', $file['full_path']);
$file['readable'] = [
'hits' => number_format($file['hits']),
'memory_consumption' => bsize($file['memory_consumption'])
];
}
$files = array_values($status['scripts']);
}
if ($config['directives']['opcache.file_cache_only'] || !empty($status['file_cache_only'])) {
$overview = false;
} else {
$status['opcache_statistics']['start_time'] = $status['opcache_statistics']['start_time'] ?? time();
$status['opcache_statistics']['last_restart_time'] = $status['opcache_statistics']['last_restart_time'] ?? time();
$overview = array_merge(
$status['memory_usage'],
$status['opcache_statistics'],
[
'total_memory' => $config['directives']['opcache.memory_consumption'],
'used_memory_percentage' => round(100 * (
($status['memory_usage']['used_memory'] + $status['memory_usage']['wasted_memory'])
/ $config['directives']['opcache.memory_consumption']
)),
'hit_rate_percentage' => round($status['opcache_statistics']['opcache_hit_rate']),
'used_key_percentage' => round(100 * ($status['opcache_statistics']['num_cached_keys']
/ $status['opcache_statistics']['max_cached_keys']
)),
'wasted_percentage' => round($status['memory_usage']['current_wasted_percentage'], 2),
'readable' => [
'total_memory' => bsize($config['directives']['opcache.memory_consumption']),
'used_memory' => bsize($status['memory_usage']['used_memory']),
'free_memory' => bsize($status['memory_usage']['free_memory']),
'wasted_memory' => bsize($status['memory_usage']['wasted_memory']),
'num_cached_scripts' => number_format($status['opcache_statistics']['num_cached_scripts']),
'hits' => number_format($status['opcache_statistics']['hits']),
'misses' => number_format($status['opcache_statistics']['misses']),
'blacklist_miss' => number_format($status['opcache_statistics']['blacklist_misses']),
'num_cached_keys' => number_format($status['opcache_statistics']['num_cached_keys']),
'max_cached_keys' => number_format($status['opcache_statistics']['max_cached_keys']),
'interned' => null,
'start_time' => (new DateTimeImmutable("@{$status['opcache_statistics']['start_time']}"))
->setTimezone(new DateTimeZone(date_default_timezone_get()))
->format('Y-m-d H:i:s'),
'last_restart_time' => ($status['opcache_statistics']['last_restart_time'] == 0
? 'never'
: (new DateTimeImmutable("@{$status['opcache_statistics']['last_restart_time']}"))
->setTimezone(new DateTimeZone(date_default_timezone_get()))
->format('Y-m-d H:i:s')
)
]
]
);
}
$preload = [];
if (!empty($status['preload_statistics']['scripts'])) {
$preload = $status['preload_statistics']['scripts'];
sort($preload, SORT_STRING);
if ($overview) {
$overview['preload_memory'] = $status['preload_statistics']['memory_consumption'];
$overview['readable']['preload_memory'] = bsize($status['preload_statistics']['memory_consumption']);
}
}
if (!empty($status['interned_strings_usage'])) {
$overview['readable']['interned'] = [
'buffer_size' => bsize($status['interned_strings_usage']['buffer_size']),
'strings_used_memory' => bsize($status['interned_strings_usage']['used_memory']),
'strings_free_memory' => bsize($status['interned_strings_usage']['free_memory']),
'number_of_strings' => number_format($status['interned_strings_usage']['number_of_strings'])
];
}
if ($overview && !empty($status['jit'])) {
$overview['jit_buffer_used_percentage'] = ($status['jit']['buffer_size']
? round(100 * (($status['jit']['buffer_size'] - $status['jit']['buffer_free']) / $status['jit']['buffer_size']))
: 0
);
$overview['readable'] = array_merge($overview['readable'], [
'jit_buffer_size' => bsize($status['jit']['buffer_size']),
'jit_buffer_free' => bsize($status['jit']['buffer_free'])
]);
}
$directives = [];
ksort($config['directives']);
foreach ($config['directives'] as $k => $v) {
if (in_array($k, ['opcache.max_file_size', 'opcache.memory_consumption', 'opcache.jit_buffer_size']) && $v) {
$v = bsize($v) . " ({$v})";
} elseif ($k === 'opcache.optimization_level') {
$levels = [];
foreach ($optimizationLevels as $level => $info) {
if ($level & $v) {
$levels[] = "{$info} [{$level}]";
}
}
$v = $levels ?: 'none';
} elseif ($k === 'opcache.jit') {
if ($v === '1') {
$v = 'on';
}
if (isset($jitModeMapping[$v]) || is_numeric($v)) {
$levels = [];
foreach (str_split((string)($jitModeMapping[$v] ?? $v)) as $type => $level) {
$levels[] = "{$level}: {$jitModes[$type]['value'][$level]} ({$jitModes[$type]['flag']})";
}
$v = [$v, $levels];
} elseif (empty($v) || strtolower($v) === 'off') {
$v = 'Off';
}
}
$directives[] = [
'k' => $k,
'v' => $v
];
}
$version = array_merge(
$config['version'],
[
'php' => phpversion(),
'server' => $_SERVER['SERVER_SOFTWARE'] ?: '',
'host' => (function_exists('gethostname')
? gethostname()
: (php_uname('n')
?: (empty($_SERVER['SERVER_NAME'])
? $_SERVER['HOST_NAME']
: $_SERVER['SERVER_NAME']
)
)
)
]
);
UI::view('settings/opcacheinfo.html.twig', [
'opcacheinfo' => [
'version' => $version,
'overview' => $overview,
'files' => $files,
'preload' => $preload,
'directives' => $directives,
'blacklist' => $config['blacklist'],
'functions' => get_extension_funcs('Zend OPcache')
]
]);
}
function bsize($size)
{
$i = 0;
$val = ['b', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'];
while (($size / 1024) > 1) {
$size /= 1024;
++$i;
}
return sprintf(
'%.2f%s%s',
$size,
'',
$val[$i]
);
}

View File

@@ -2,300 +2,296 @@
/**
* This file is part of the Froxlor project.
* Copyright (c) 2003-2009 the SysCP Team (see authors).
* Copyright (c) 2010 the Froxlor Team (see authors).
*
* For the full copyright and license information, please view the COPYING
* file that was distributed with this source code. You can also view the
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* @copyright (c) the authors
* @author Florian Lippert <flo@syscp.org> (2003-2009)
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Panel
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, you can also view it online at
* https://files.froxlor.org/misc/COPYING.txt
*
* @copyright the authors
* @author Froxlor team <team@froxlor.org>
* @license https://files.froxlor.org/misc/COPYING.txt GPLv2
*/
define('AREA', 'admin');
require './lib/init.php';
const AREA = 'admin';
require __DIR__ . '/lib/init.php';
if (isset($_POST['id'])) {
$id = intval($_POST['id']);
} elseif (isset($_GET['id'])) {
$id = intval($_GET['id']);
}
use Froxlor\Api\Commands\FpmDaemons;
use Froxlor\Api\Commands\PhpSettings;
use Froxlor\Database\Database;
use Froxlor\Froxlor;
use Froxlor\UI\Collection;
use Froxlor\UI\HTML;
use Froxlor\UI\Listing;
use Froxlor\UI\Panel\UI;
use Froxlor\UI\Request;
use Froxlor\UI\Response;
$id = (int)Request::any('id');
if ($page == 'overview') {
if ($action == '') {
$tablecontent = '';
$count = 0;
$result = Database::query("SELECT * FROM `" . TABLE_PANEL_PHPCONFIGS . "`");
while ($row = $result->fetch(PDO::FETCH_ASSOC)) {
$domainresult = false;
$query_params = array('id' => $row['id']);
$query = "SELECT * FROM `".TABLE_PANEL_DOMAINS."`
WHERE `phpsettingid` = :id
AND `parentdomainid` = '0'";
if ((int)$userinfo['domains_see_all'] == 0) {
$query .= " AND `adminid` = :adminid";
$query_params['adminid'] = $userinfo['adminid'];
try {
$phpconf_list_data = include_once dirname(__FILE__) . '/lib/tablelisting/admin/tablelisting.phpconfigs.php';
$collection = (new Collection(PhpSettings::class, $userinfo, ['with_subdomains' => true]))
->withPagination($phpconf_list_data['phpconf_list']['columns'], $phpconf_list_data['phpconf_list']['default_sorting']);
} catch (Exception $e) {
Response::dynamicError($e->getMessage());
}
if ((int)Settings::Get('panel.phpconfigs_hidestdsubdomain') == 1) {
$ssdids_res = Database::query("
SELECT DISTINCT `standardsubdomain` FROM `".TABLE_PANEL_CUSTOMERS."`
WHERE `standardsubdomain` > 0 ORDER BY `standardsubdomain` ASC;"
);
$ssdids = array();
while ($ssd = $ssdids_res->fetch(PDO::FETCH_ASSOC)) {
$ssdids[] = $ssd['standardsubdomain'];
}
if (count($ssdids) > 0) {
$query .= " AND `id` NOT IN (".implode(', ', $ssdids).")";
}
}
$domainresult_stmt = Database::prepare($query);
Database::pexecute($domainresult_stmt, $query_params);
$domains = '';
if (Database::num_rows() > 0) {
while ($row2 = $domainresult_stmt->fetch(PDO::FETCH_ASSOC)) {
$domains.= $row2['domain'] . '<br/>';
}
} else {
$domains = $lng['admin']['phpsettings']['notused'];
}
$count ++;
eval("\$tablecontent.=\"" . getTemplate("phpconfig/overview_overview") . "\";");
}
$log->logAction(ADM_ACTION, LOG_INFO, "php.ini setting overview has been viewed by '" . $userinfo['loginname'] . "'");
eval("echo \"" . getTemplate("phpconfig/overview") . "\";");
UI::view('user/table.html.twig', [
'listing' => Listing::format($collection, $phpconf_list_data, 'phpconf_list'),
'actions_links' => (bool)$userinfo['change_serversettings'] ? [
[
'href' => $linker->getLink(['section' => 'phpsettings', 'page' => $page, 'action' => 'add']),
'label' => lng('admin.phpsettings.addnew')
]
] : []
]);
}
if ($action == 'add') {
if ((int)$userinfo['change_serversettings'] == 1) {
if (isset($_POST['send'])
&& $_POST['send'] == 'send'
) {
$description = validate($_POST['description'], 'description');
$phpsettings = validate(str_replace("\r\n", "\n", $_POST['phpsettings']), 'phpsettings', '/^[^\0]*$/');
if (Settings::Get('system.mod_fcgid') == 1) {
$binary = makeCorrectFile(validate($_POST['binary'], 'binary'));
$file_extensions = validate($_POST['file_extensions'], 'file_extensions', '/^[a-zA-Z0-9\s]*$/');
$mod_fcgid_starter = validate($_POST['mod_fcgid_starter'], 'mod_fcgid_starter', '/^[0-9]*$/', '', array('-1', ''));
$mod_fcgid_maxrequests = validate($_POST['mod_fcgid_maxrequests'], 'mod_fcgid_maxrequests', '/^[0-9]*$/', '', array('-1', ''));
// disable fpm stuff
$fpm_enableslowlog = 0;
$fpm_reqtermtimeout = 0;
$fpm_reqslowtimeout = 0;
if (isset($_POST['send']) && $_POST['send'] == 'send') {
try {
PhpSettings::getLocal($userinfo, $_POST)->add();
} catch (Exception $e) {
Response::dynamicError($e->getMessage());
}
elseif (Settings::Get('phpfpm.enabled') == 1) {
$fpm_enableslowlog = isset($_POST['phpfpm_enable_slowlog']) ? (int)$_POST['phpfpm_enable_slowlog'] : 0;
$fpm_reqtermtimeout = validate($_POST['phpfpm_reqtermtimeout'], 'phpfpm_reqtermtimeout', '/^([0-9]+)(|s|m|h|d)$/');
$fpm_reqslowtimeout = validate($_POST['phpfpm_reqslowtimeout'], 'phpfpm_reqslowtimeout', '/^([0-9]+)(|s|m|h|d)$/');
// disable fcgid stuff
$binary = '/usr/bin/php-cgi';
$file_extensions = 'php';
$mod_fcgid_starter = 0;
$mod_fcgid_maxrequests = 0;
}
if (strlen($description) == 0
|| strlen($description) > 50
) {
standard_error('descriptioninvalid');
}
$ins_stmt = Database::prepare("
INSERT INTO `" . TABLE_PANEL_PHPCONFIGS . "` SET
`description` = :desc,
`binary` = :binary,
`file_extensions` = :fext,
`mod_fcgid_starter` = :starter,
`mod_fcgid_maxrequests` = :mreq,
`fpm_slowlog` = :fpmslow,
`fpm_reqterm` = :fpmreqterm,
`fpm_reqslow` = :fpmreqslow,
`phpsettings` = :phpsettings"
);
$ins_data = array(
'desc' => $description,
'binary' => $binary,
'fext' => $file_extensions,
'starter' => $mod_fcgid_starter,
'mreq' => $mod_fcgid_maxrequests,
'fpmslow' => $fpm_enableslowlog,
'fpmreqterm' => $fpm_reqtermtimeout,
'fpmreqslow' => $fpm_reqslowtimeout,
'phpsettings' => $phpsettings
);
Database::pexecute($ins_stmt, $ins_data);
inserttask('1');
$log->logAction(ADM_ACTION, LOG_INFO, "php.ini setting with description '" . $description . "' has been created by '" . $userinfo['loginname'] . "'");
redirectTo($filename, array('page' => $page, 's' => $s));
Response::redirectTo($filename, [
'page' => $page
]);
} else {
if (file_exists(Froxlor::getInstallDir() . '/templates/misc/php/default.ini.php')) {
include Froxlor::getInstallDir() . '/templates/misc/php/default.ini.php';
$result = [
'phpsettings' => $phpini
];
} else {
// use first php-config as fallback
$result_stmt = Database::query("SELECT * FROM `" . TABLE_PANEL_PHPCONFIGS . "` WHERE `id` = 1");
$result = $result_stmt->fetch(PDO::FETCH_ASSOC);
$phpconfig_add_data = include_once dirname(__FILE__).'/lib/formfields/admin/phpconfig/formfield.phpconfig_add.php';
$phpconfig_add_form = htmlform::genHTMLForm($phpconfig_add_data);
$title = $phpconfig_add_data['phpconfig_add']['title'];
$image = $phpconfig_add_data['phpconfig_add']['image'];
eval("echo \"" . getTemplate("phpconfig/overview_add") . "\";");
}
$fpmconfigs = [];
$configs = Database::query("SELECT * FROM `" . TABLE_PANEL_FPMDAEMONS . "` ORDER BY `description` ASC");
while ($row = $configs->fetch(PDO::FETCH_ASSOC)) {
$fpmconfigs[$row['id']] = $row['description'];
}
$phpconfig_add_data = include_once dirname(__FILE__) . '/lib/formfields/admin/phpconfig/formfield.phpconfig_add.php';
UI::view('user/form-replacers.html.twig', [
'formaction' => $linker->getLink(['section' => 'phpsettings']),
'formdata' => $phpconfig_add_data['phpconfig_add'],
'replacers' => $phpconfig_add_data['phpconfig_replacers']
]);
}
} else {
standard_error('nopermissionsorinvalidid');
Response::standardError('nopermissionsorinvalidid');
}
}
if ($action == 'delete') {
try {
$json_result = PhpSettings::getLocal($userinfo, [
'id' => $id
])->get();
} catch (Exception $e) {
Response::dynamicError($e->getMessage());
}
$result = json_decode($json_result, true)['data'];
$result_stmt = Database::prepare("
SELECT * FROM `" . TABLE_PANEL_PHPCONFIGS . "` WHERE `id` = :id"
);
$result = Database::pexecute_first($result_stmt, array('id' => $id));
if ($result['id'] != 0
&& $result['id'] == $id
&& (int)$userinfo['change_serversettings'] == 1
&& $id != 1 // cannot delete the default php.config
) {
if (isset($_POST['send'])
&& $_POST['send'] == 'send'
) {
// set php-config to default for all domains using the
// config that is to be deleted
$upd_stmt = Database::prepare("
UPDATE `" . TABLE_PANEL_DOMAINS . "` SET
`phpsettingid` = 1 WHERE `phpsettingid` = :id"
);
Database::pexecute($upd_stmt, array('id' => $id));
$del_stmt = Database::prepare("
DELETE FROM `" . TABLE_PANEL_PHPCONFIGS . "` WHERE `id` = :id"
);
Database::pexecute($del_stmt, array('id' => $id));
inserttask('1');
$log->logAction(ADM_ACTION, LOG_INFO, "php.ini setting with id #" . (int)$id . " has been deleted by '" . $userinfo['loginname'] . "'");
redirectTo($filename, array('page' => $page, 's' => $s));
if ($result['id'] != 0 && $result['id'] == $id && (int)$userinfo['change_serversettings'] == 1 && $id != 1) // cannot delete the default php.config
{
if (isset($_POST['send']) && $_POST['send'] == 'send') {
try {
PhpSettings::getLocal($userinfo, [
'id' => $id
])->delete();
} catch (Exception $e) {
Response::dynamicError($e->getMessage());
}
Response::redirectTo($filename, [
'page' => $page
]);
} else {
ask_yesno('phpsetting_reallydelete', $filename, array('id' => $id, 'page' => $page, 'action' => $action), $result['description']);
HTML::askYesNo('phpsetting_reallydelete', $filename, [
'id' => $id,
'page' => $page,
'action' => $action
], $result['description']);
}
} else {
standard_error('nopermissionsorinvalidid');
Response::standardError('nopermissionsorinvalidid');
}
}
if ($action == 'edit') {
$result_stmt = Database::prepare("
SELECT * FROM `" . TABLE_PANEL_PHPCONFIGS . "` WHERE `id` = :id"
);
$result = Database::pexecute_first($result_stmt, array('id' => $id));
if ($result['id'] != 0
&& $result['id'] == $id
&& (int)$userinfo['change_serversettings'] == 1
) {
if (isset($_POST['send'])
&& $_POST['send'] == 'send'
) {
$description = validate($_POST['description'], 'description');
$phpsettings = validate(str_replace("\r\n", "\n", $_POST['phpsettings']), 'phpsettings', '/^[^\0]*$/');
if (Settings::Get('system.mod_fcgid') == 1) {
$binary = makeCorrectFile(validate($_POST['binary'], 'binary'));
$file_extensions = validate($_POST['file_extensions'], 'file_extensions', '/^[a-zA-Z0-9\s]*$/');
$mod_fcgid_starter = validate($_POST['mod_fcgid_starter'], 'mod_fcgid_starter', '/^[0-9]*$/', '', array('-1', ''));
$mod_fcgid_maxrequests = validate($_POST['mod_fcgid_maxrequests'], 'mod_fcgid_maxrequests', '/^[0-9]*$/', '', array('-1', ''));
// disable fpm stuff
$fpm_enableslowlog = 0;
$fpm_reqtermtimeout = 0;
$fpm_reqslowtimeout = 0;
}
elseif (Settings::Get('phpfpm.enabled') == 1) {
$fpm_enableslowlog = isset($_POST['phpfpm_enable_slowlog']) ? (int)$_POST['phpfpm_enable_slowlog'] : 0;
$fpm_reqtermtimeout = validate($_POST['phpfpm_reqtermtimeout'], 'phpfpm_reqtermtimeout', '/^([0-9]+)(|s|m|h|d)$/');
$fpm_reqslowtimeout = validate($_POST['phpfpm_reqslowtimeout'], 'phpfpm_reqslowtimeout', '/^([0-9]+)(|s|m|h|d)$/');
// disable fcgid stuff
$binary = '/usr/bin/php-cgi';
$file_extensions = 'php';
$mod_fcgid_starter = 0;
$mod_fcgid_maxrequests = 0;
}
if (strlen($description) == 0
|| strlen($description) > 50
) {
standard_error('descriptioninvalid');
}
$upd_stmt = Database::prepare("
UPDATE `" . TABLE_PANEL_PHPCONFIGS . "` SET
`description` = :desc,
`binary` = :binary,
`file_extensions` = :fext,
`mod_fcgid_starter` = :starter,
`mod_fcgid_maxrequests` = :mreq,
`fpm_slowlog` = :fpmslow,
`fpm_reqterm` = :fpmreqterm,
`fpm_reqslow` = :fpmreqslow,
`phpsettings` = :phpsettings
WHERE `id` = :id"
);
$upd_data = array(
'desc' => $description,
'binary' => $binary,
'fext' => $file_extensions,
'starter' => $mod_fcgid_starter,
'mreq' => $mod_fcgid_maxrequests,
'fpmslow' => $fpm_enableslowlog,
'fpmreqterm' => $fpm_reqtermtimeout,
'fpmreqslow' => $fpm_reqslowtimeout,
'phpsettings' => $phpsettings,
try {
$json_result = PhpSettings::getLocal($userinfo, [
'id' => $id
);
Database::pexecute($upd_stmt, $upd_data);
inserttask('1');
$log->logAction(ADM_ACTION, LOG_INFO, "php.ini setting with description '" . $description . "' has been changed by '" . $userinfo['loginname'] . "'");
redirectTo($filename, array('page' => $page, 's' => $s));
])->get();
} catch (Exception $e) {
Response::dynamicError($e->getMessage());
}
$result = json_decode($json_result, true)['data'];
if ($result['id'] != 0 && $result['id'] == $id && (int)$userinfo['change_serversettings'] == 1) {
if (isset($_POST['send']) && $_POST['send'] == 'send') {
try {
PhpSettings::getLocal($userinfo, $_POST)->update();
} catch (Exception $e) {
Response::dynamicError($e->getMessage());
}
Response::redirectTo($filename, [
'page' => $page
]);
} else {
$fpmconfigs = [];
$configs = Database::query("SELECT * FROM `" . TABLE_PANEL_FPMDAEMONS . "` ORDER BY `description` ASC");
while ($row = $configs->fetch(PDO::FETCH_ASSOC)) {
$fpmconfigs[$row['id']] = $row['description'];
}
$phpconfig_edit_data = include_once dirname(__FILE__) . '/lib/formfields/admin/phpconfig/formfield.phpconfig_edit.php';
$phpconfig_edit_form = htmlform::genHTMLForm($phpconfig_edit_data);
$title = $phpconfig_edit_data['phpconfig_edit']['title'];
$image = $phpconfig_edit_data['phpconfig_edit']['image'];
eval("echo \"" . getTemplate("phpconfig/overview_edit") . "\";");
UI::view('user/form-replacers.html.twig', [
'formaction' => $linker->getLink(['section' => 'phpsettings', 'id' => $id]),
'formdata' => $phpconfig_edit_data['phpconfig_edit'],
'replacers' => $phpconfig_edit_data['phpconfig_replacers'],
'editid' => $id
]);
}
} else {
standard_error('nopermissionsorinvalidid');
Response::standardError('nopermissionsorinvalidid');
}
}
} elseif ($page == 'fpmdaemons') {
if ($action == '') {
try {
$fpmconf_list_data = include_once dirname(__FILE__) . '/lib/tablelisting/admin/tablelisting.fpmconfigs.php';
$collection = (new Collection(FpmDaemons::class, $userinfo))
->withPagination($fpmconf_list_data['fpmconf_list']['columns'], $fpmconf_list_data['fpmconf_list']['default_sorting']);
} catch (Exception $e) {
Response::dynamicError($e->getMessage());
}
UI::view('user/table.html.twig', [
'listing' => Listing::format($collection, $fpmconf_list_data, 'fpmconf_list'),
'actions_links' => (bool)$userinfo['change_serversettings'] ? [
[
'href' => $linker->getLink(['section' => 'phpsettings', 'page' => $page, 'action' => 'add']),
'label' => lng('admin.fpmsettings.addnew')
]
] : []
]);
}
if ($action == 'add') {
if ((int)$userinfo['change_serversettings'] == 1) {
if (isset($_POST['send']) && $_POST['send'] == 'send') {
try {
FpmDaemons::getLocal($userinfo, $_POST)->add();
} catch (Exception $e) {
Response::dynamicError($e->getMessage());
}
Response::redirectTo($filename, [
'page' => $page
]);
} else {
$fpmconfig_add_data = include_once dirname(__FILE__) . '/lib/formfields/admin/phpconfig/formfield.fpmconfig_add.php';
UI::view('user/form-replacers.html.twig', [
'formaction' => $linker->getLink(['section' => 'phpsettings', 'page' => 'fpmdaemons']),
'formdata' => $fpmconfig_add_data['fpmconfig_add'],
'replacers' => $fpmconfig_add_data['fpmconfig_replacers']
]);
}
} else {
Response::standardError('nopermissionsorinvalidid');
}
}
if ($action == 'delete') {
try {
$json_result = FpmDaemons::getLocal($userinfo, [
'id' => $id
])->get();
} catch (Exception $e) {
Response::dynamicError($e->getMessage());
}
$result = json_decode($json_result, true)['data'];
if ($id == 1) {
Response::standardError('cannotdeletedefaultphpconfig');
}
if ($result['id'] != 0 && $result['id'] == $id && (int)$userinfo['change_serversettings'] == 1 && $id != 1) // cannot delete the default php.config
{
if (isset($_POST['send']) && $_POST['send'] == 'send') {
try {
FpmDaemons::getLocal($userinfo, $_POST)->delete();
} catch (Exception $e) {
Response::dynamicError($e->getMessage());
}
Response::redirectTo($filename, [
'page' => $page
]);
} else {
HTML::askYesNo('fpmsetting_reallydelete', $filename, [
'id' => $id,
'page' => $page,
'action' => $action
], $result['description']);
}
} else {
Response::standardError('nopermissionsorinvalidid');
}
}
if ($action == 'edit') {
try {
$json_result = FpmDaemons::getLocal($userinfo, [
'id' => $id
])->get();
} catch (Exception $e) {
Response::dynamicError($e->getMessage());
}
$result = json_decode($json_result, true)['data'];
if ($result['id'] != 0 && $result['id'] == $id && (int)$userinfo['change_serversettings'] == 1) {
if (isset($_POST['send']) && $_POST['send'] == 'send') {
try {
FpmDaemons::getLocal($userinfo, $_POST)->update();
} catch (Exception $e) {
Response::dynamicError($e->getMessage());
}
Response::redirectTo($filename, [
'page' => $page
]);
} else {
$fpmconfig_edit_data = include_once dirname(__FILE__) . '/lib/formfields/admin/phpconfig/formfield.fpmconfig_edit.php';
UI::view('user/form-replacers.html.twig', [
'formaction' => $linker->getLink(['section' => 'phpsettings', 'page' => 'fpmdaemons', 'id' => $id]),
'formdata' => $fpmconfig_edit_data['fpmconfig_edit'],
'replacers' => $fpmconfig_edit_data['fpmconfig_replacers'],
'editid' => $id
]);
}
} else {
Response::standardError('nopermissionsorinvalidid');
}
}
}

278
admin_plans.php Normal file
View File

@@ -0,0 +1,278 @@
<?php
/**
* This file is part of the Froxlor project.
* Copyright (c) 2010 the Froxlor Team (see authors).
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, you can also view it online at
* https://files.froxlor.org/misc/COPYING.txt
*
* @copyright the authors
* @author Froxlor team <team@froxlor.org>
* @license https://files.froxlor.org/misc/COPYING.txt GPLv2
*/
const AREA = 'admin';
require __DIR__ . '/lib/init.php';
use Froxlor\Api\Commands\HostingPlans;
use Froxlor\Api\Commands\MysqlServer;
use Froxlor\Database\Database;
use Froxlor\FroxlorLogger;
use Froxlor\PhpHelper;
use Froxlor\Settings;
use Froxlor\UI\Collection;
use Froxlor\UI\HTML;
use Froxlor\UI\Listing;
use Froxlor\UI\Panel\UI;
use Froxlor\UI\Request;
use Froxlor\UI\Response;
$id = (int)Request::any('id');
if ($page == '' || $page == 'overview') {
if ($action == '') {
$log->logAction(FroxlorLogger::ADM_ACTION, LOG_NOTICE, "viewed admin_plans");
try {
$plan_list_data = include_once dirname(__FILE__) . '/lib/tablelisting/admin/tablelisting.plans.php';
$collection = (new Collection(HostingPlans::class, $userinfo))
->withPagination($plan_list_data['plan_list']['columns'], $plan_list_data['plan_list']['default_sorting']);
} catch (Exception $e) {
Response::dynamicError($e->getMessage());
}
UI::view('user/table.html.twig', [
'listing' => Listing::format($collection, $plan_list_data, 'plan_list'),
'actions_links' => [
[
'href' => $linker->getLink(['section' => 'plans', 'page' => $page, 'action' => 'add']),
'label' => lng('admin.plans.add')
]
]
]);
} elseif ($action == 'delete' && $id != 0) {
try {
$json_result = HostingPlans::getLocal($userinfo, [
'id' => $id
])->get();
} catch (Exception $e) {
Response::dynamicError($e->getMessage());
}
$result = json_decode($json_result, true)['data'];
if ($result['id'] != 0 && $result['id'] == $id && (int)$userinfo['adminid'] == $result['adminid']) {
if (isset($_POST['send']) && $_POST['send'] == 'send') {
try {
HostingPlans::getLocal($userinfo, [
'id' => $id
])->delete();
} catch (Exception $e) {
Response::dynamicError($e->getMessage());
}
Response::redirectTo($filename, [
'page' => $page
]);
} else {
HTML::askYesNo('plan_reallydelete', $filename, [
'id' => $id,
'page' => $page,
'action' => $action
], $result['name']);
}
} else {
Response::standardError('nopermissionsorinvalidid');
}
} elseif ($action == 'add') {
if (isset($_POST['send']) && $_POST['send'] == 'send') {
try {
HostingPlans::getLocal($userinfo, $_POST)->add();
} catch (Exception $e) {
Response::dynamicError($e->getMessage());
}
Response::redirectTo($filename, [
'page' => $page
]);
} else {
$mysql_servers = [];
try {
$result_json = MysqlServer::getLocal($userinfo)->listing();
$result_decoded = json_decode($result_json, true)['data']['list'];
foreach ($result_decoded as $dbserver => $dbdata) {
$mysql_servers[] = [
'label' => $dbdata['caption'],
'value' => $dbserver
];
}
} catch (Exception $e) {
/* just none */
}
$phpconfigs = [];
$configs = Database::query("
SELECT c.*, fc.description as interpreter
FROM `" . TABLE_PANEL_PHPCONFIGS . "` c
LEFT JOIN `" . TABLE_PANEL_FPMDAEMONS . "` fc ON fc.id = c.fpmsettingid
");
while ($row = $configs->fetch(PDO::FETCH_ASSOC)) {
if ((int)Settings::Get('phpfpm.enabled') == 1) {
$phpconfigs[] = [
'label' => $row['description'] . " [" . $row['interpreter'] . "]",
'value' => $row['id']
];
} else {
$phpconfigs[] = [
'label' => $row['description'],
'value' => $row['id']
];
}
}
// dummy to avoid unknown variables
$hosting_plans = null;
$plans_add_data = include_once __DIR__ . '/lib/formfields/admin/plans/formfield.plans_add.php';
$cust_add_data = include_once __DIR__ . '/lib/formfields/admin/customer/formfield.customer_add.php';
// unset unneeded stuff
unset($cust_add_data['customer_add']['sections']['section_a']);
unset($cust_add_data['customer_add']['sections']['section_b']);
unset($cust_add_data['customer_add']['sections']['section_cpre']);
// merge
$plans_add_data['plans_add']['sections'] = array_merge($plans_add_data['plans_add']['sections'], $cust_add_data['customer_add']['sections']);
UI::view('user/form.html.twig', [
'formaction' => $linker->getLink(['section' => 'plans']),
'formdata' => $plans_add_data['plans_add']
]);
}
} elseif ($action == 'edit' && $id != 0) {
try {
$json_result = HostingPlans::getLocal($userinfo, [
'id' => $id
])->get();
} catch (Exception $e) {
Response::dynamicError($e->getMessage());
}
$result = json_decode($json_result, true)['data'];
if ($result['name'] != '') {
$result['value'] = json_decode($result['value'], true);
$result = PhpHelper::htmlentitiesArray($result);
foreach ($result['value'] as $index => $value) {
$result[$index] = $value;
}
$result['allowed_phpconfigs'] = json_encode($result['allowed_phpconfigs']);
if (isset($_POST['send']) && $_POST['send'] == 'send') {
try {
HostingPlans::getLocal($userinfo, $_POST)->update();
} catch (Exception $e) {
Response::dynamicError($e->getMessage());
}
Response::redirectTo($filename, [
'page' => $page
]);
} else {
$mysql_servers = [];
try {
$result_json = MysqlServer::getLocal($userinfo)->listing();
$result_decoded = json_decode($result_json, true)['data']['list'];
foreach ($result_decoded as $dbserver => $dbdata) {
$mysql_servers[] = [
'label' => $dbdata['caption'],
'value' => $dbserver
];
}
} catch (Exception $e) {
/* just none */
}
$phpconfigs = [];
$configs = Database::query("
SELECT c.*, fc.description as interpreter
FROM `" . TABLE_PANEL_PHPCONFIGS . "` c
LEFT JOIN `" . TABLE_PANEL_FPMDAEMONS . "` fc ON fc.id = c.fpmsettingid
");
while ($row = $configs->fetch(PDO::FETCH_ASSOC)) {
if ((int)Settings::Get('phpfpm.enabled') == 1) {
$phpconfigs[] = [
'label' => $row['description'] . " [" . $row['interpreter'] . "]",
'value' => $row['id']
];
} else {
$phpconfigs[] = [
'label' => $row['description'],
'value' => $row['id']
];
}
}
$result['imap'] = $result['email_imap'];
$result['pop3'] = $result['email_pop3'];
// dummy to avoid unknown variables
$result['loginname'] = null;
$result['documentroot'] = null;
$result['standardsubdomain'] = null;
$result['deactivated'] = null;
$result['def_language'] = null;
$result['firstname'] = null;
$result['gender'] = null;
$result['company'] = null;
$result['street'] = null;
$result['zipcode'] = null;
$result['city'] = null;
$result['phone'] = null;
$result['fax'] = null;
$result['email'] = null;
$result['customernumber'] = null;
$result['custom_notes'] = null;
$result['custom_notes_show'] = null;
$result['api_allowed'] = null;
$hosting_plans = null;
$admin_select = [];
$plans_edit_data = include_once __DIR__ . '/lib/formfields/admin/plans/formfield.plans_edit.php';
$cust_edit_data = include_once __DIR__ . '/lib/formfields/admin/customer/formfield.customer_edit.php';
// unset unneeded stuff
unset($cust_edit_data['customer_edit']['sections']['section_a']);
unset($cust_edit_data['customer_edit']['sections']['section_b']);
unset($cust_edit_data['customer_edit']['sections']['section_cpre']);
unset($cust_edit_data['customer_edit']['sections']['section_d']);
// merge
$plans_edit_data['plans_edit']['sections'] = array_merge($plans_edit_data['plans_edit']['sections'], $cust_edit_data['customer_edit']['sections']);
UI::view('user/form.html.twig', [
'formaction' => $linker->getLink(['section' => 'plans', 'id' => $id]),
'formdata' => $plans_edit_data['plans_edit'],
'editid' => $id
]);
}
}
} elseif ($action == 'jqGetPlanValues') {
$planid = (int)Request::any('planid', 0);
try {
$json_result = HostingPlans::getLocal($userinfo, [
'id' => $planid
])->get();
} catch (Exception $e) {
Response::dynamicError($e->getMessage());
}
$result = json_decode($json_result, true)['data'];
echo $result['value'];
exit();
}
}

View File

@@ -2,38 +2,52 @@
/**
* This file is part of the Froxlor project.
* Copyright (c) 2003-2009 the SysCP Team (see authors).
* Copyright (c) 2010 the Froxlor Team (see authors).
*
* For the full copyright and license information, please view the COPYING
* file that was distributed with this source code. You can also view the
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* @copyright (c) the authors
* @author Florian Lippert <flo@syscp.org> (2003-2009)
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Panel
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, you can also view it online at
* https://files.froxlor.org/misc/COPYING.txt
*
* @copyright the authors
* @author Froxlor team <team@froxlor.org>
* @license https://files.froxlor.org/misc/COPYING.txt GPLv2
*/
define('AREA', 'admin');
require './lib/init.php';
use Froxlor\Api\Commands\Froxlor;
use Froxlor\Cron\TaskId;
use Froxlor\Database\Database;
use Froxlor\Database\IntegrityCheck;
use Froxlor\FroxlorLogger;
use Froxlor\PhpHelper;
use Froxlor\Settings;
use Froxlor\System\Cronjob;
use Froxlor\UI\Form;
use Froxlor\UI\HTML;
use Froxlor\UI\Listing;
use Froxlor\UI\Panel\UI;
use Froxlor\UI\Request;
use Froxlor\UI\Response;
use Froxlor\User;
use PHPMailer\PHPMailer\PHPMailer;
// get sql-root access data
Database::needRoot(true);
Database::needSqlData();
$sql_root = Database::getSqlData();
Database::needRoot(false);
const AREA = 'admin';
require __DIR__ . '/lib/init.php';
if ($page == 'overview' && $userinfo['change_serversettings'] == '1') {
$settings_data = loadConfigArrayDir('./actions/admin/settings/');
$settings = loadSettings($settings_data);
if (isset($_POST['send'])
&& $_POST['send'] == 'send'
) {
$settings_data = PhpHelper::loadConfigArrayDir('./actions/admin/settings/');
Settings::loadSettingsInto($settings_data);
if (isset($_POST['send']) && $_POST['send'] == 'send') {
$_part = isset($_GET['part']) ? $_GET['part'] : '';
if ($_part == '') {
$_part = isset($_POST['part']) ? $_POST['part'] : '';
@@ -48,7 +62,6 @@ if ($page == 'overview' && $userinfo['change_serversettings'] == '1') {
$settings_part = true;
}
$only_enabledisable = false;
} else {
$settings_all = false;
$settings_part = false;
@@ -56,188 +69,135 @@ if ($page == 'overview' && $userinfo['change_serversettings'] == '1') {
}
// check if the session timeout is too low #815
if (isset($_POST['session_sessiontimeout'])
&& $_POST['session_sessiontimeout'] < 60
) {
standard_error($lng['error']['session_timeout'], $lng['error']['session_timeout_desc']);
if (isset($_POST['session_sessiontimeout']) && $_POST['session_sessiontimeout'] < 60) {
Response::standardError(lng('error.session_timeout'), lng('error.session_timeout_desc'));
}
if (processFormEx(
$settings_data,
$_POST,
array('filename' => $filename, 'action' => $action, 'page' => $page),
$_part,
$settings_all,
$settings_part,
$only_enabledisable
)
) {
$log->logAction(ADM_ACTION, LOG_INFO, "rebuild configfiles due to changed setting");
inserttask('1');
try {
if (Form::processForm($settings_data, $_POST, [
'filename' => $filename,
'action' => $action,
'page' => $page
], $_part, $settings_all, $settings_part, $only_enabledisable)) {
$log->logAction(FroxlorLogger::ADM_ACTION, LOG_INFO, "rebuild configfiles due to changed setting");
Cronjob::inserttask(TaskId::REBUILD_VHOST);
// Using nameserver, insert a task which rebuilds the server config
inserttask('4');
Cronjob::inserttask(TaskId::REBUILD_DNS);
// cron.d file
Cronjob::inserttask(TaskId::REBUILD_CRON);
standard_success('settingssaved', '', array('filename' => $filename, 'action' => $action, 'page' => $page));
Response::standardSuccess('settingssaved', '', [
'filename' => $filename,
'action' => $action,
'page' => $page
]);
}
} catch (Exception $e) {
Response::dynamicError($e->getMessage(), $e->getCode());
}
} else {
$_part = isset($_GET['part']) ? $_GET['part'] : '';
if ($_part == '') {
$_part = isset($_POST['part']) ? $_POST['part'] : '';
}
$fields = buildFormEx($settings_data, $_part);
$fields = Form::buildForm($settings_data, $_part);
$settings_page = '';
if ($_part == '') {
eval("\$settings_page .= \"" . getTemplate("settings/settings_overview") . "\";");
if ($_part == '' || $_part == 'all') {
UI::view('settings/index.html.twig', ['fields' => $fields]);
} else {
eval("\$settings_page .= \"" . getTemplate("settings/settings") . "\";");
$em = Request::any('em', '');
UI::view('settings/detailpart.html.twig', ['fields' => $fields, 'em' => $em]);
}
eval("echo \"" . getTemplate("settings/settings_form_begin") . "\";");
eval("echo \$settings_page;");
eval("echo \"" . getTemplate("settings/settings_form_end") . "\";");
}
} elseif($page == 'phpinfo'
&& $userinfo['change_serversettings'] == '1'
) {
} elseif ($page == 'phpinfo' && $userinfo['change_serversettings'] == '1') {
ob_start();
phpinfo();
$phpinfo = array('phpinfo' => array());
if (preg_match_all(
'#(?:<h2>(?:<a name=".*?">)?(.*?)(?:</a>)?</h2>)|(?:<tr(?: class=".*?")?><t[hd](?: class=".*?")?>(.*?)\s*</t[hd]>(?:<t[hd](?: class=".*?")?>(.*?)\s*</t[hd]>(?:<t[hd](?: class=".*?")?>(.*?)\s*</t[hd]>)?)?</tr>)#s',
ob_get_clean(), $matches, PREG_SET_ORDER
)
) {
$phpinfo = [
'phpinfo' => []
];
if (preg_match_all('#(?:<h2>(?:<a name=".*?">)?(.*?)(?:</a>)?</h2>)|(?:<tr(?: class=".*?")?><t[hd](?: class=".*?")?>(.*?)\s*</t[hd]>(?:<t[hd](?: class=".*?")?>(.*?)\s*</t[hd]>(?:<t[hd](?: class=".*?")?>(.*?)\s*</t[hd]>)?)?</tr>)#s', ob_get_clean(), $matches, PREG_SET_ORDER)) {
foreach ($matches as $match) {
$end = array_keys($phpinfo);
$end = end($end);
if (strlen($match[1])) {
$phpinfo[$match[1]] = array();
$phpinfo[$match[1]] = [];
} elseif (isset($match[3])) {
$phpinfo[$end][$match[2]] = isset($match[4]) ? array($match[3], $match[4]) : $match[3];
$phpinfo[$end][$match[2]] = isset($match[4]) ? [
$match[3],
$match[4]
] : $match[3];
} else {
$phpinfo[$end][] = $match[2];
}
}
$phpinfohtml = '';
foreach ($phpinfo as $name => $section) {
$phpinfoentries = "";
foreach ($section as $key => $val) {
if (is_array($val)) {
eval("\$phpinfoentries .= \"" . getTemplate("settings/phpinfo/phpinfo_3") . "\";");
} elseif (is_string($key)) {
eval("\$phpinfoentries .= \"" . getTemplate("settings/phpinfo/phpinfo_2") . "\";");
} else {
eval("\$phpinfoentries .= \"" . getTemplate("settings/phpinfo/phpinfo_1") . "\";");
Response::standardError(lng('error.no_phpinfo'));
}
}
// first header -> show actual php version
if (strtolower($name) == "phpinfo") {
$name = "PHP ".PHP_VERSION;
}
eval("\$phpinfohtml .= \"" . getTemplate("settings/phpinfo/phpinfo_table") . "\";");
}
$phpinfo = $phpinfohtml;
}
eval("echo \"" . getTemplate("settings/phpinfo") . "\";");
} elseif($page == 'rebuildconfigs'
&& $userinfo['change_serversettings'] == '1'
) {
if (isset($_POST['send'])
&& $_POST['send'] == 'send'
) {
$log->logAction(ADM_ACTION, LOG_INFO, "rebuild configfiles");
inserttask('1');
inserttask('10');
UI::view('settings/phpinfo.html.twig', [
'phpversion' => PHP_VERSION,
'phpinfo' => $phpinfo
]);
} elseif ($page == 'rebuildconfigs' && $userinfo['change_serversettings'] == '1') {
if (isset($_POST['send']) && $_POST['send'] == 'send') {
$log->logAction(FroxlorLogger::ADM_ACTION, LOG_INFO, "rebuild configfiles");
Cronjob::inserttask(TaskId::REBUILD_VHOST);
Cronjob::inserttask(TaskId::CREATE_QUOTA);
// Using nameserver, insert a task which rebuilds the server config
inserttask('4');
standard_success('rebuildingconfigs', '', array('filename' => 'admin_index.php'));
Cronjob::inserttask(TaskId::REBUILD_DNS);
// cron.d file
Cronjob::inserttask(TaskId::REBUILD_CRON);
Response::standardSuccess('rebuildingconfigs', '', [
'filename' => 'admin_index.php'
]);
} else {
ask_yesno('admin_configs_reallyrebuild', $filename, array('page' => $page));
HTML::askYesNo('admin_configs_reallyrebuild', $filename, [
'page' => $page
]);
}
} elseif($page == 'updatecounters'
&& $userinfo['change_serversettings'] == '1'
) {
if (isset($_POST['send'])
&& $_POST['send'] == 'send'
) {
$log->logAction(ADM_ACTION, LOG_INFO, "updated resource-counters");
$updatecounters = updateCounters(true);
$customers = '';
foreach ($updatecounters['customers'] as $customerid => $customer) {
eval("\$customers.=\"" . getTemplate("settings/updatecounters_row_customer") . "\";");
}
$admins = '';
foreach ($updatecounters['admins'] as $adminid => $admin) {
eval("\$admins.=\"" . getTemplate("settings/updatecounters_row_admin") . "\";");
}
eval("echo \"" . getTemplate("settings/updatecounters") . "\";");
} elseif ($page == 'updatecounters' && $userinfo['change_serversettings'] == '1') {
if (isset($_POST['send']) && $_POST['send'] == 'send') {
$log->logAction(FroxlorLogger::ADM_ACTION, LOG_INFO, "updated resource-counters");
$updatecounters = User::updateCounters(true);
UI::view('user/resource-counter.html.twig', [
'counters' => $updatecounters
]);
} else {
ask_yesno('admin_counters_reallyupdate', $filename, array('page' => $page));
HTML::askYesNo('admin_counters_reallyupdate', $filename, [
'page' => $page
]);
}
} elseif ($page == 'wipecleartextmailpws'
&& $userinfo['change_serversettings'] == '1'
) {
if (isset($_POST['send'])
&& $_POST['send'] == 'send'
) {
$log->logAction(ADM_ACTION, LOG_WARNING, "wiped all cleartext mail passwords");
} elseif ($page == 'wipecleartextmailpws' && $userinfo['change_serversettings'] == '1') {
if (isset($_POST['send']) && $_POST['send'] == 'send') {
$log->logAction(FroxlorLogger::ADM_ACTION, LOG_WARNING, "wiped all cleartext mail passwords");
Database::query("UPDATE `" . TABLE_MAIL_USERS . "` SET `password` = '';");
Database::query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value` = '0' WHERE `settinggroup` = 'system' AND `varname` = 'mailpwcleartext'");
redirectTo('admin_settings.php', array('s' => $s));
Response::redirectTo($filename);
} else {
ask_yesno('admin_cleartextmailpws_reallywipe', $filename, array('page' => $page));
HTML::askYesNo('admin_cleartextmailpws_reallywipe', $filename, [
'page' => $page
]);
}
} elseif($page == 'wipequotas'
&& $userinfo['change_serversettings'] == '1'
) {
if (isset($_POST['send'])
&& $_POST['send'] == 'send'
) {
$log->logAction(ADM_ACTION, LOG_WARNING, "wiped all mailquotas");
} elseif ($page == 'wipequotas' && $userinfo['change_serversettings'] == '1') {
if (isset($_POST['send']) && $_POST['send'] == 'send') {
$log->logAction(FroxlorLogger::ADM_ACTION, LOG_WARNING, "wiped all mailquotas");
// Set the quota to 0 which means unlimited
Database::query("UPDATE `" . TABLE_MAIL_USERS . "` SET `quota` = '0';");
Database::query("UPDATE `" . TABLE_PANEL_CUSTOMERS . "` SET `email_quota_used` = '0'");
redirectTo('admin_settings.php', array('s' => $s));
Response::redirectTo($filename);
} else {
ask_yesno('admin_quotas_reallywipe', $filename, array('page' => $page));
HTML::askYesNo('admin_quotas_reallywipe', $filename, [
'page' => $page
]);
}
} elseif ($page == 'enforcequotas'
&& $userinfo['change_serversettings'] == '1'
) {
if (isset($_POST['send'])
&& $_POST['send'] == 'send'
) {
} elseif ($page == 'enforcequotas' && $userinfo['change_serversettings'] == '1') {
if (isset($_POST['send']) && $_POST['send'] == 'send') {
// Fetch all accounts
$result_stmt = Database::query("SELECT `quota`, `customerid` FROM `" . TABLE_MAIL_USERS . "`");
if (Database::num_rows() > 0) {
$upd_stmt = Database::prepare("
UPDATE `" . TABLE_PANEL_CUSTOMERS . "` SET
`email_quota_used` = `email_quota_used` + :diff
@@ -246,7 +206,10 @@ if ($page == 'overview' && $userinfo['change_serversettings'] == '1') {
while ($array = $result_stmt->fetch(PDO::FETCH_ASSOC)) {
$difference = Settings::Get('system.mail_quota') - $array['quota'];
Database::pexecute($upd_stmt, array('diff' => $difference, 'customerid' => $customerid));
Database::pexecute($upd_stmt, [
'diff' => $difference,
'customerid' => $customerid
]);
}
}
@@ -254,34 +217,205 @@ if ($page == 'overview' && $userinfo['change_serversettings'] == '1') {
$upd_stmt = Database::prepare("
UPDATE `" . TABLE_MAIL_USERS . "` SET `quota` = :quota
");
Database::pexecute($upd_stmt, array('quota' => Settings::Get('system.mail_quota')));
Database::pexecute($upd_stmt, [
'quota' => Settings::Get('system.mail_quota')
]);
// Update the Customer, if the used quota is bigger than the allowed quota
Database::query("UPDATE `" . TABLE_PANEL_CUSTOMERS . "` SET `email_quota` = `email_quota_used` WHERE `email_quota` < `email_quota_used`");
$log->logAction(ADM_ACTION, LOG_WARNING, 'enforcing mailquota to all customers: ' . Settings::Get('system.mail_quota') . ' MB');
redirectTo('admin_settings.php', array('s' => $s));
$log->logAction(FroxlorLogger::ADM_ACTION, LOG_WARNING, 'enforcing mailquota to all customers: ' . Settings::Get('system.mail_quota') . ' MB');
Response::redirectTo($filename);
} else {
ask_yesno('admin_quotas_reallyenforce', $filename, array('page' => $page));
HTML::askYesNo('admin_quotas_reallyenforce', $filename, [
'page' => $page
]);
}
} elseif ($page == 'integritycheck'
&& $userinfo['change_serversettings'] == '1'
) {
} elseif ($page == 'integritycheck' && $userinfo['change_serversettings'] == '1') {
$integrity = new IntegrityCheck();
if (isset($_POST['send'])
&& $_POST['send'] == 'send'
) {
if (isset($_POST['send']) && $_POST['send'] == 'send') {
$integrity->fixAll();
} elseif(isset($_GET['action'])
&& $_GET['action'] == "fix") {
ask_yesno('admin_integritycheck_reallyfix', $filename, array('page' => $page));
} elseif (isset($_GET['action']) && $_GET['action'] == "fix") {
HTML::askYesNo('admin_integritycheck_reallyfix', $filename, [
'page' => $page
]);
}
$integritycheck = '';
$integritycheck = [];
foreach ($integrity->available as $id => $check) {
$displayid = $id + 1;
$result = $integrity->$check();
eval("\$integritycheck.=\"" . getTemplate("settings/integritycheck_row") . "\";");
$integritycheck[] = [
'displayid' => $id + 1,
'result' => $integrity->$check(),
'checkdesc' => lng('integrity_check.' . $check)
];
}
eval("echo \"" . getTemplate("settings/integritycheck") . "\";");
$integrity_list_data = include_once dirname(__FILE__) . '/lib/tablelisting/admin/tablelisting.integrity.php';
$collection = [
'data' => $integritycheck,
'pagination' => []
];
UI::view('user/table.html.twig', [
'listing' => Listing::formatFromArray($collection, $integrity_list_data['integrity_list'], 'integrity_list'),
'actions_links' => [
[
'href' => $linker->getLink(['section' => 'settings', 'page' => $page, 'action' => 'fix']),
'label' => lng('admin.integrityfix'),
'icon' => 'fa-solid fa-screwdriver-wrench',
'class' => 'btn-warning'
]
]
]);
} elseif ($page == 'importexport' && $userinfo['change_serversettings'] == '1') {
// check for json-stuff
if (!extension_loaded('json')) {
Response::standardError('jsonextensionnotfound');
}
if (isset($_GET['action']) && $_GET['action'] == "export") {
// export
try {
$json_result = Froxlor::getLocal($userinfo)->exportSettings();
$json_export = json_decode($json_result, true)['data'];
} catch (Exception $e) {
Response::dynamicError($e->getMessage());
}
header('Content-disposition: attachment; filename=Froxlor_settings-' . \Froxlor\Froxlor::VERSION . '-' . \Froxlor\Froxlor::DBVERSION . '_' . date('d.m.Y') . '.json');
header('Content-type: application/json');
echo $json_export;
exit();
} elseif (isset($_GET['action']) && $_GET['action'] == "import") {
// import
if (isset($_POST['send']) && $_POST['send'] == 'send') {
// get uploaded file
if (isset($_FILES["import_file"]["tmp_name"])) {
$imp_content = file_get_contents($_FILES["import_file"]["tmp_name"]);
try {
Froxlor::getLocal($userinfo, [
'json_str' => $imp_content
])->importSettings();
} catch (Exception $e) {
Response::dynamicError($e->getMessage());
}
Response::standardSuccess('settingsimported', '', [
'filename' => 'admin_settings.php'
]);
}
Response::dynamicError("Upload failed");
}
} else {
$settings_data = include_once dirname(__FILE__) . '/lib/formfields/admin/settings/formfield.settings_import.php';
UI::view('user/form.html.twig', [
'formaction' => $linker->getLink(['section' => 'settings', 'page' => $page, 'action' => 'import']),
'formdata' => $settings_data['settings_import'],
'actions_links' => [
[
'class' => 'btn-outline-primary',
'href' => $linker->getLink(['section' => 'settings', 'page' => 'overview']),
'label' => lng('admin.configfiles.overview'),
'icon' => 'fa-solid fa-grip'
],
[
'class' => 'btn-outline-secondary',
'href' => $linker->getLink(['section' => 'settings', 'page' => $page, 'action' => 'export']),
'label' => 'Download/export ' . lng('admin.serversettings'),
'icon' => 'fa-solid fa-file-import'
]
]
]);
}
} elseif ($page == 'testmail') {
$note_type = 'info';
$note_msg = lng('admin.smtptestnote');
if (isset($_POST['send']) && $_POST['send'] == 'send') {
$test_addr = isset($_POST['test_addr']) ? $_POST['test_addr'] : null;
// Initialize the mailingsystem
$testmail = new PHPMailer(true);
$testmail->CharSet = "UTF-8";
if (Settings::Get('system.mail_use_smtp')) {
$testmail->isSMTP();
$testmail->Host = Settings::Get('system.mail_smtp_host');
$testmail->SMTPAuth = Settings::Get('system.mail_smtp_auth') == '1';
$testmail->Username = Settings::Get('system.mail_smtp_user');
$testmail->Password = Settings::Get('system.mail_smtp_passwd');
if (Settings::Get('system.mail_smtp_usetls')) {
$testmail->SMTPSecure = 'tls';
} else {
$testmail->SMTPAutoTLS = false;
}
$testmail->Port = Settings::Get('system.mail_smtp_port');
}
$_mailerror = false;
if (PHPMailer::ValidateAddress(Settings::Get('panel.adminmail')) !== false) {
// set return-to address and custom sender-name, see #76
$testmail->SetFrom(Settings::Get('panel.adminmail'), Settings::Get('panel.adminmail_defname'));
if (Settings::Get('panel.adminmail_return') != '') {
$testmail->AddReplyTo(Settings::Get('panel.adminmail_return'), Settings::Get('panel.adminmail_defname'));
}
try {
$testmail->Subject = "Froxlor Test-Mail";
$mail_body = "Yay, this worked :)";
$testmail->AltBody = $mail_body;
$testmail->MsgHTML(str_replace("\n", "<br />", $mail_body));
$testmail->AddAddress($test_addr);
$testmail->Send();
} catch (\PHPMailer\PHPMailer\Exception $e) {
$note_type = 'danger';
$note_msg = $e->getMessage();
$_mailerror = true;
} catch (Exception $e) {
$note_type = 'danger';
$note_msg = $e->getMessage();
$_mailerror = true;
}
if (!$_mailerror) {
// success
$mail->ClearAddresses();
Response::standardSuccess('testmailsent', '', [
'filename' => 'admin_settings.php',
'page' => 'testmail'
]);
}
} else {
// invalid sender e-mail
$note_type = 'warning';
$note_msg = "Invalid sender e-mail address: " . Settings::Get('panel.adminmail');
}
}
$mailtest_add_data = include_once dirname(__FILE__) . '/lib/formfields/admin/settings/formfield.settings_mailtest.php';
UI::view('user/form-note.html.twig', [
'formaction' => $linker->getLink(['section' => 'settings']),
'formdata' => $mailtest_add_data['mailtest'],
'actions_links' => [
[
'href' => $linker->getLink([
'section' => 'settings',
'page' => 'overview',
'part' => 'system',
'em' => 'system_mail_use_smtp'
]),
'label' => lng('admin.smtpsettings'),
'icon' => 'fa-solid fa-gears',
'class' => 'btn-outline-secondary'
]
],
// alert-box
'type' => $note_type,
'alert_msg' => $note_msg
]);
} elseif ($page == 'toggleSettingsMode') {
if ($userinfo['change_serversettings'] == '1') {
$cmode = Settings::Get('panel.settings_mode');
Settings::Set('panel.settings_mode', (int)(!(bool)$cmode));
}
Response::redirectTo($filename);
}

View File

@@ -2,269 +2,318 @@
/**
* This file is part of the Froxlor project.
* Copyright (c) 2003-2009 the SysCP Team (see authors).
* Copyright (c) 2010 the Froxlor Team (see authors).
*
* For the full copyright and license information, please view the COPYING
* file that was distributed with this source code. You can also view the
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* @copyright (c) the authors
* @author Florian Lippert <flo@syscp.org> (2003-2009)
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Panel
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, you can also view it online at
* https://files.froxlor.org/misc/COPYING.txt
*
* @copyright the authors
* @author Froxlor team <team@froxlor.org>
* @license https://files.froxlor.org/misc/COPYING.txt GPLv2
*/
define('AREA', 'admin');
require './lib/init.php';
const AREA = 'admin';
require __DIR__ . '/lib/init.php';
if (isset($_POST['subjectid'])) {
$subjectid = intval($_POST['subjectid']);
$mailbodyid = intval($_POST['mailbodyid']);
use Froxlor\Database\Database;
use Froxlor\FroxlorLogger;
use Froxlor\Language;
use Froxlor\PhpHelper;
use Froxlor\Settings;
use Froxlor\UI\HTML;
use Froxlor\UI\Listing;
use Froxlor\UI\Panel\UI;
use Froxlor\UI\Request;
use Froxlor\UI\Response;
use Froxlor\Validate\Validate;
use Froxlor\CurrentUser;
} elseif(isset($_GET['subjectid'])) {
$subjectid = intval($_GET['subjectid']);
$mailbodyid = intval($_GET['mailbodyid']);
}
$id = (int)Request::any('id');
$subjectid = intval(Request::any('subjectid'));
$mailbodyid = intval(Request::any('mailbodyid'));
if (isset($_POST['id'])) {
$id = intval($_POST['id']);
} elseif(isset($_GET['id'])) {
$id = intval($_GET['id']);
}
$available_templates = array(
$available_templates = [
'createcustomer',
'pop_success',
'new_database_by_customer',
'new_ftpaccount_by_customer',
'password_reset'
);
];
// only show templates of features that are enabled #1191
if ((int)Settings::Get('system.report_enable') == 1) {
array_push($available_templates,
'trafficmaxpercent',
'diskmaxpercent'
);
array_push($available_templates, 'trafficmaxpercent', 'diskmaxpercent');
}
if (Settings::Get('panel.sendalternativemail') == 1) {
array_push($available_templates, 'pop_success_alternative');
}
if ((int)Settings::Get('ticket.enabled') == 1) {
array_push($available_templates,
'new_ticket_by_customer',
'new_ticket_for_customer',
'new_ticket_by_staff',
'new_reply_ticket_by_customer',
'new_reply_ticket_by_staff'
);
}
$file_templates = array(
$file_templates = [
'index_html'
);
];
$languages = Language::getLanguages();
if ($action == '') {
// email templates
$log->logAction(ADM_ACTION, LOG_NOTICE, "viewed admin_templates");
$log->logAction(FroxlorLogger::ADM_ACTION, LOG_NOTICE, "viewed admin_templates");
if (Settings::Get('panel.sendalternativemail') == 1) {
$available_templates[] = 'pop_success_alternative';
}
$templates_array = array();
$templates_array = [];
$result_stmt = Database::prepare("
SELECT `id`, `language`, `varname` FROM `" . TABLE_PANEL_TEMPLATES . "`
WHERE `adminid` = :adminid AND `templategroup`='mails'
ORDER BY `language`, `varname`"
);
Database::pexecute($result_stmt, array('adminid' => $userinfo['adminid']));
ORDER BY `language`, `varname`
");
Database::pexecute($result_stmt, [
'adminid' => $userinfo['adminid']
]);
while ($row = $result_stmt->fetch(PDO::FETCH_ASSOC)) {
$parts = array();
$parts = [];
preg_match('/^([a-z]([a-z_]+[a-z])*)_(mailbody|subject)$/', $row['varname'], $parts);
$templates_array[$row['language']][$parts[1]][$parts[3]] = $row['id'];
}
$templates = '';
$templates = [];
foreach ($templates_array as $language => $template_defs) {
foreach ($template_defs as $action => $email) {
$subjectid = $email['subject'];
$mailbodyid = $email['mailbody'];
$template = $lng['admin']['templates'][$action];
eval("\$templates.=\"" . getTemplate("templates/templates_template") . "\";");
$templates[] = [
'subjectid' => $email['subject'],
'mailbodyid' => $email['mailbody'],
'template' => lng('admin.templates.' . $action),
'language' => $language
];
}
}
$add = false;
while (list($language_file, $language_name) = each($languages)) {
$templates_done = array();
$mail_actions_links = false;
foreach ($languages as $language_file => $language_name) {
$templates_done = [];
$result_stmt = Database::prepare("
SELECT `varname` FROM `" . TABLE_PANEL_TEMPLATES . "`
WHERE `adminid` = :adminid AND `language`= :lang
AND `templategroup` = 'mails' AND `varname` LIKE '%_subject'"
);
Database::pexecute($result_stmt, array('adminid' => $userinfo['adminid'], 'lang' => $language_name));
AND `templategroup` = 'mails' AND `varname` LIKE '%_subject'
");
Database::pexecute($result_stmt, [
'adminid' => $userinfo['adminid'],
'lang' => $language_name
]);
while ($row = $result_stmt->fetch(PDO::FETCH_ASSOC)) {
$templates_done[] = str_replace('_subject', '', $row['varname']);
}
if (count(array_diff($available_templates, $templates_done)) > 0) {
$add = true;
$mail_actions_links = [
[
'href' => $linker->getLink(['section' => 'templates', 'page' => $page, 'action' => 'add']),
'label' => lng('admin.templates.template_add')
]
];
}
}
$mailtpl_list_data = include_once dirname(__FILE__) . '/lib/tablelisting/admin/tablelisting.mailtemplates.php';
$collection_mail = [
'data' => $templates,
'pagination' => []
];
// filetemplates
$filetemplates = '';
$filetemplateadd = false;
$result_stmt = Database::prepare("
SELECT `id`, `varname` FROM `" . TABLE_PANEL_TEMPLATES . "`
WHERE `adminid` = :adminid AND `templategroup`='files'"
);
Database::pexecute($result_stmt, array('adminid' => $userinfo['adminid']));
if (Database::num_rows() != count($file_templates)) {
$filetemplateadd = true;
}
WHERE `adminid` = :adminid AND `templategroup`='files'");
Database::pexecute($result_stmt, [
'adminid' => $userinfo['adminid']
]);
$filetemplates = [];
while ($row = $result_stmt->fetch(PDO::FETCH_ASSOC)) {
eval("\$filetemplates.=\"" . getTemplate("templates/templates_filetemplate") . "\";");
$filetemplates[] = [
'id' => $row['id'],
'template' => lng('admin.templates.' . $row['varname'])
];
}
eval("echo \"" . getTemplate("templates/templates") . "\";");
} elseif($action == 'delete'
&& $subjectid != 0
&& $mailbodyid != 0
) {
$file_actions_links = false;
if (Database::num_rows() != count($file_templates)) {
$file_actions_links = [
[
'href' => $linker->getLink([
'section' => 'templates',
'page' => $page,
'action' => 'add',
'files' => 'files'
]),
'label' => lng('admin.templates.template_fileadd')
]
];
}
$filetpl_list_data = include_once dirname(__FILE__) . '/lib/tablelisting/admin/tablelisting.filetemplates.php';
$collection_file = [
'data' => $filetemplates,
'pagination' => []
];
if ($mail_actions_links === false) {
$mail_actions_links = [];
}
if ($file_actions_links === false) {
$file_actions_links = [];
}
UI::view('user/table-tpl.html.twig', [
'maillisting' => Listing::formatFromArray($collection_mail, $mailtpl_list_data['mailtpl_list'], 'mailtpl_list'),
'filelisting' => Listing::formatFromArray($collection_file, $filetpl_list_data['filetpl_list'], 'filetpl_list'),
'actions_links' => array_merge($mail_actions_links, $file_actions_links)
]);
} elseif ($action == 'delete' && $subjectid != 0 && $mailbodyid != 0) {
// email templates
$result_stmt = Database::prepare("
SELECT `language`, `varname` FROM `" . TABLE_PANEL_TEMPLATES . "`
WHERE `adminid` = :adminid AND `id` = :id"
);
Database::pexecute($result_stmt, array('adminid' => $userinfo['adminid'], 'id' => $subjectid));
WHERE `adminid` = :adminid AND `id` = :id");
Database::pexecute($result_stmt, [
'adminid' => $userinfo['adminid'],
'id' => $subjectid
]);
$result = $result_stmt->fetch(PDO::FETCH_ASSOC);
if ($result['varname'] != '') {
if (isset($_POST['send'])
&& $_POST['send'] == 'send'
) {
if (isset($_POST['send']) && $_POST['send'] == 'send') {
$del_stmt = Database::prepare("
DELETE FROM `" . TABLE_PANEL_TEMPLATES . "`
WHERE `adminid` = :adminid
AND (`id` = :ida OR `id` = :idb)"
);
Database::pexecute($del_stmt, array(
AND (`id` = :ida OR `id` = :idb)");
Database::pexecute($del_stmt, [
'adminid' => $userinfo['adminid'],
'ida' => $subjectid,
'idb' => $mailbodyid
));
$log->logAction(ADM_ACTION, LOG_INFO, "deleted template '" . $result['language'] . ' - ' . $lng['admin']['templates'][str_replace('_subject', '', $result['varname'])] . "'");
redirectTo($filename, array('page' => $page, 's' => $s));
]);
$log->logAction(FroxlorLogger::ADM_ACTION, LOG_INFO, "deleted template '" . $result['language'] . ' - ' . lng('admin.templates.' . str_replace('_subject', '', $result['varname'])) . "'");
Response::redirectTo($filename, [
'page' => $page
]);
} else {
ask_yesno('admin_template_reallydelete', $filename, array('subjectid' => $subjectid, 'mailbodyid' => $mailbodyid, 'page' => $page, 'action' => $action), $result['language'] . ' - ' . $lng['admin']['templates'][str_replace('_subject', '', $result['varname'])]);
HTML::askYesNo('admin_template_reallydelete', $filename, [
'subjectid' => $subjectid,
'mailbodyid' => $mailbodyid,
'page' => $page,
'action' => $action
], $result['language'] . ' - ' . lng('admin.templates.' . str_replace('_subject', '', $result['varname'])));
}
}
} elseif($action == 'deletef'
&& $id != 0
) {
} elseif ($action == 'deletef' && $id != 0) {
// file templates
$result_stmt = Database::prepare("
SELECT * FROM `" . TABLE_PANEL_TEMPLATES . "`
WHERE `adminid` = :adminid AND `id` = :id"
);
Database::pexecute($result_stmt, array('adminid' => $userinfo['adminid'], 'id' => $id));
WHERE `adminid` = :adminid AND `id` = :id");
Database::pexecute($result_stmt, [
'adminid' => $userinfo['adminid'],
'id' => $id
]);
if (Database::num_rows() > 0) {
$row = $result_stmt->fetch(PDO::FETCH_ASSOC);
if (isset($_POST['send'])
&& $_POST['send'] == 'send'
) {
if (isset($_POST['send']) && $_POST['send'] == 'send') {
$del_stmt = Database::prepare("
DELETE FROM `" . TABLE_PANEL_TEMPLATES . "`
WHERE `adminid` = :adminid AND `id` = :id"
);
Database::pexecute($del_stmt, array('adminid' => $userinfo['adminid'], 'id' => $id));
$log->logAction(ADM_ACTION, LOG_INFO, "deleted template '" . $lng['admin']['templates'][$row['varname']] . "'");
redirectTo($filename, array('page' => $page, 's' => $s));
WHERE `adminid` = :adminid AND `id` = :id");
Database::pexecute($del_stmt, [
'adminid' => $userinfo['adminid'],
'id' => $id
]);
$log->logAction(FroxlorLogger::ADM_ACTION, LOG_INFO, "deleted template '" . lng('admin.templates.' . $row['varname']) . "'");
Response::redirectTo($filename, [
'page' => $page
]);
} else {
ask_yesno('admin_template_reallydelete', $filename, array('id' => $id, 'page' => $page, 'action' => $action), $lng['admin']['templates'][$row['varname']]);
HTML::askYesNo('admin_template_reallydelete', $filename, [
'id' => $id,
'page' => $page,
'action' => $action
], lng('admin.templates.' . $row['varname']));
}
} else {
standard_error('templatenotfound');
exit;
Response::standardError('templatenotfound');
}
} elseif ($action == 'add') {
if (Settings::Get('panel.sendalternativemail') == 1) {
$available_templates[] = 'pop_success_alternative';
}
if (isset($_POST['prepare'])
&& $_POST['prepare'] == 'prepare'
) {
if (isset($_POST['prepare']) && $_POST['prepare'] == 'prepare') {
// email templates
$language = validate($_POST['language'], 'language');
$templates = array();
$language = htmlentities(Validate::validate($_POST['language'], 'language', '/^[^\r\n\0"\']+$/', 'nolanguageselect'));
if (!array_key_exists($language, $languages)) {
Response::standardError('templatelanguageinvalid');
}
$template = Validate::validate($_POST['template'], 'template');
$result_stmt = Database::prepare("
SELECT `varname` FROM `" . TABLE_PANEL_TEMPLATES . "`
SELECT COUNT(*) as def FROM `" . TABLE_PANEL_TEMPLATES . "`
WHERE `adminid` = :adminid AND `language` = :lang
AND `templategroup` = 'mails' AND `varname` LIKE '%_subject'"
);
Database::pexecute($result_stmt, array('adminid' => $userinfo['adminid'], 'lang' => $language));
while ($row = $result_stmt->fetch(PDO::FETCH_ASSOC)) {
$templates[] = str_replace('_subject', '', $row['varname']);
AND `templategroup` = 'mails' AND `varname` LIKE :template
");
$result = Database::pexecute_first($result_stmt, [
'adminid' => $userinfo['adminid'],
'lang' => $language,
'template' => $template . '%'
]);
if ($result && $result['def'] > 0) {
Response::standardError('templatelanguagecombodefined');
}
$templates = array_diff($available_templates, $templates);
$template_options = '';
foreach ($templates as $template) {
$template_options.= makeoption($lng['admin']['templates'][$template], $template, NULL, true);
}
// set target language
Language::setLanguage($language);
$subject = lng('mails.' . $template . '.subject');
$body = str_replace('\n', "\n", lng('mails.' . $template . '.mailbody'));
// re set language to user
Language::setLanguage(CurrentUser::getField('def_language'));
$template_add_data = include_once dirname(__FILE__) . '/lib/formfields/admin/templates/formfield.template_add.php';
$template_add_form = htmlform::genHTMLForm($template_add_data);
$title = $template_add_data['template_add']['title'];
$image = $template_add_data['template_add']['image'];
eval("echo \"" . getTemplate("templates/templates_add_2") . "\";");
} elseif(isset($_POST['send'])
&& $_POST['send'] == 'send'
) {
UI::view('user/form-replacers.html.twig', [
'formaction' => $linker->getLink(['section' => 'templates']),
'formdata' => $template_add_data['template_add'],
'replacers' => $template_add_data['template_replacers']
]);
} elseif (isset($_POST['send']) && $_POST['send'] == 'send' && !isset($_POST['filesend'])) {
// email templates
$language = validate($_POST['language'], 'language', '/^[^\r\n\0"\']+$/', 'nolanguageselect');
$template = validate($_POST['template'], 'template');
$subject = validate($_POST['subject'], 'subject', '/^[^\r\n\0]+$/', 'nosubjectcreate');
$mailbody = validate($_POST['mailbody'], 'mailbody', '/^[^\0]+$/', 'nomailbodycreate');
$templates = array();
$language = htmlentities(Validate::validate($_POST['language'], 'language', '/^[^\r\n\0"\']+$/', 'nolanguageselect'));
if (!array_key_exists($language, $languages)) {
Response::standardError('templatelanguageinvalid');
}
$template = Validate::validate($_POST['template'], 'template');
$subject = Validate::validate($_POST['subject'], 'subject', '/^[^\r\n\0]+$/', 'nosubjectcreate');
$mailbody = Validate::validate($_POST['mailbody'], 'mailbody', '/^[^\0]+$/', 'nomailbodycreate');
$templates = [];
$result_stmt = Database::prepare("
SELECT `varname` FROM `" . TABLE_PANEL_TEMPLATES . "`
WHERE `adminid` = :adminid AND `language` = :lang
AND `templategroup` = 'mails' AND `varname` LIKE '%_subject'"
);
Database::pexecute($result_stmt, array('adminid' => $userinfo['adminid'], 'lang' => $language));
AND `templategroup` = 'mails' AND `varname` LIKE '%_subject'");
Database::pexecute($result_stmt, [
'adminid' => $userinfo['adminid'],
'lang' => $language
]);
while ($row = $result_stmt->fetch(PDO::FETCH_ASSOC)) {
$templates[] = str_replace('_subject', '', $row['varname']);
}
$templates = array_diff($available_templates, $templates);
if (array_search($template, $templates) === false) {
standard_error('templatenotfound');
if (!in_array($template, $templates)) {
Response::standardError('templatenotfound');
} else {
$ins_stmt = Database::prepare("
INSERT INTO `" . TABLE_PANEL_TEMPLATES . "` SET
@@ -272,37 +321,35 @@ if ($action == '') {
`language` = :lang,
`templategroup` = 'mails',
`varname` = :var,
`value` = :value"
);
`value` = :value");
// mail-subject
$ins_data = array(
$ins_data = [
'adminid' => $userinfo['adminid'],
'lang' => $language,
'var' => $template . '_subject',
'value' => $subject
);
];
Database::pexecute($ins_stmt, $ins_data);
// mail-body
$ins_data = array(
$ins_data = [
'adminid' => $userinfo['adminid'],
'lang' => $language,
'var' => $template . '_mailbody',
'value' => $mailbody
);
];
Database::pexecute($ins_stmt, $ins_data);
$log->logAction(ADM_ACTION, LOG_INFO, "added template '" . $language . ' - ' . $template . "'");
redirectTo($filename, array('page' => $page, 's' => $s));
$log->logAction(FroxlorLogger::ADM_ACTION, LOG_INFO, "added template '" . $language . ' - ' . $template . "'");
Response::redirectTo($filename, [
'page' => $page
]);
}
} elseif(isset($_POST['filesend'])
&& $_POST['filesend'] == 'filesend'
) {
} elseif (isset($_POST['filesend']) && $_POST['filesend'] == 'filesend') {
// file templates
$template = validate($_POST['template'], 'template');
$filecontent = validate($_POST['filecontent'], 'filecontent', '/^[^\0]+$/', 'filecontentnotset');
$template = Validate::validate($_POST['template'], 'template');
$filecontent = Validate::validate($_POST['filecontent'], 'filecontent', '/^[^\0]+$/', 'filecontentnotset');
$ins_stmt = Database::prepare("
INSERT INTO `" . TABLE_PANEL_TEMPLATES . "` SET
@@ -310,33 +357,35 @@ if ($action == '') {
`language` = '',
`templategroup` = 'files',
`varname` = :var,
`value` = :value"
);
`value` = :value");
$ins_data = array(
$ins_data = [
'adminid' => $userinfo['adminid'],
'var' => $template,
'value' => $filecontent
);
];
Database::pexecute($ins_stmt, $ins_data);
$log->logAction(ADM_ACTION, LOG_INFO, "added template '" . $template . "'");
redirectTo($filename, array('page' => $page, 's' => $s));
$log->logAction(FroxlorLogger::ADM_ACTION, LOG_INFO, "added template '" . $template . "'");
Response::redirectTo($filename, [
'page' => $page
]);
} elseif (!isset($_GET['files'])) {
// email templates
$add = false;
$language_options = '';
$language_options = [];
$template_options = [];
while (list($language_file, $language_name) = each($languages)) {
$templates = array();
foreach ($languages as $language_file => $language_name) {
$templates = [];
$result_stmt = Database::prepare("
SELECT `varname` FROM `" . TABLE_PANEL_TEMPLATES . "`
WHERE `adminid` = :adminid AND `language` = :lang
AND `templategroup` = 'mails' AND `varname` LIKE '%_subject'"
);
Database::pexecute($result_stmt, array('adminid' => $userinfo['adminid'], 'lang' => $language_name));
AND `templategroup` = 'mails' AND `varname` LIKE '%_subject'");
Database::pexecute($result_stmt, [
'adminid' => $userinfo['adminid'],
'lang' => $language_name
]);
while ($row = $result_stmt->fetch(PDO::FETCH_ASSOC)) {
$templates[] = str_replace('_subject', '', $row['varname']);
@@ -344,166 +393,192 @@ if ($action == '') {
if (count(array_diff($available_templates, $templates)) > 0) {
$add = true;
$language_options.= makeoption($language_name, $language_file, $userinfo['language'], true);
$language_options[$language_file] = $language_name;
$templates = array_diff($available_templates, $templates);
foreach ($templates as $template) {
$template_options[$template] = lng('admin.templates.' . $template);
}
}
}
if ($add) {
eval("echo \"" . getTemplate("templates/templates_add_1") . "\";");
UI::view('user/form.html.twig', [
'formaction' => $linker->getLink(['section' => 'templates']),
'formdata' => [
'title' => lng('admin.templates.template_add'),
'image' => 'fa-solid fa-plus',
'self_overview' => ['section' => 'templates', 'page' => 'email'],
'sections' => [
'section_a' => [
'title' => lng('admin.templates.template_add'),
'fields' => [
'language' => [
'label' => lng('login.language'),
'type' => 'select',
'select_var' => $language_options,
'selected' => $userinfo['language']
],
'template' => [
'label' => lng('admin.templates.action'),
'type' => 'select',
'select_var' => $template_options
],
'prepare' => [
'type' => 'hidden',
'value' => 'prepare'
]
]
]
]
],
'editid' => $id
]);
} else {
standard_error('alltemplatesdefined');
exit;
Response::standardError('alltemplatesdefined');
}
} else {
// filetemplates
$result_stmt = Database::prepare("
SELECT `id`, `varname` FROM `" . TABLE_PANEL_TEMPLATES . "`
WHERE `adminid` = :adminid AND `templategroup`='files'"
);
Database::pexecute($result_stmt, array('adminid' => $userinfo['adminid']));
WHERE `adminid` = :adminid AND `templategroup`='files'");
Database::pexecute($result_stmt, [
'adminid' => $userinfo['adminid']
]);
if (Database::num_rows() == count($file_templates)) {
standard_error('alltemplatesdefined');
exit;
Response::standardError('alltemplatesdefined');
} else {
$templatesdefined = array();
$free_templates = '';
$templatesdefined = [];
$free_templates = [];
while ($row = $result_stmt->fetch(PDO::FETCH_ASSOC)) {
$templatesdefined[] = $row['varname'];
}
foreach (array_diff($file_templates, $templatesdefined) as $template) {
$free_templates.= makeoption($lng['admin']['templates'][$template], $template, '', true);
$free_templates[$template] = lng('admin.templates.' . $template);
}
$filetemplate_add_data = include_once dirname(__FILE__) . '/lib/formfields/admin/templates/formfield.filetemplate_add.php';
$filetemplate_add_form = htmlform::genHTMLForm($filetemplate_add_data);
$title = $filetemplate_add_data['filetemplate_add']['title'];
$image = $filetemplate_add_data['filetemplate_add']['image'];
eval("echo \"" . getTemplate("templates/filetemplates_add") . "\";");
UI::view('user/form-replacers.html.twig', [
'formaction' => $linker->getLink(['section' => 'templates']),
'formdata' => $filetemplate_add_data['filetemplate_add'],
'replacers' => $filetemplate_add_data['filetemplate_replacers']
]);
}
}
} elseif($action == 'edit'
&& $subjectid != 0
&& $mailbodyid != 0
) {
} elseif ($action == 'edit' && $subjectid != 0 && $mailbodyid != 0) {
// email templates
$result_stmt = Database::prepare("
SELECT `language`, `varname`, `value` FROM `" . TABLE_PANEL_TEMPLATES . "`
WHERE `adminid` = :adminid AND `id` = :subjectid"
);
Database::pexecute($result_stmt, array('adminid' => $userinfo['adminid'], 'subjectid' => $subjectid));
WHERE `adminid` = :adminid AND `id` = :subjectid");
Database::pexecute($result_stmt, [
'adminid' => $userinfo['adminid'],
'subjectid' => $subjectid
]);
$result = $result_stmt->fetch(PDO::FETCH_ASSOC);
if ($result['varname'] != '') {
if (isset($_POST['send'])
&& $_POST['send'] == 'send'
) {
$subject = validate($_POST['subject'], 'subject', '/^[^\r\n\0]+$/', 'nosubjectcreate');
$mailbody = validate($_POST['mailbody'], 'mailbody', '/^[^\0]+$/', 'nomailbodycreate');
if (isset($_POST['send']) && $_POST['send'] == 'send') {
$subject = Validate::validate($_POST['subject'], 'subject', '/^[^\r\n\0]+$/', 'nosubjectcreate');
$mailbody = Validate::validate($_POST['mailbody'], 'mailbody', '/^[^\0]+$/', 'nomailbodycreate');
$upd_stmt = Database::prepare("
UPDATE `" . TABLE_PANEL_TEMPLATES . "` SET
`value` = :value
WHERE `adminid` = :adminid AND `id` = :id"
);
WHERE `adminid` = :adminid AND `id` = :id");
// subject
Database::pexecute($upd_stmt, array(
Database::pexecute($upd_stmt, [
'value' => $subject,
'adminid' => $userinfo['adminid'],
'id' => $subjectid
));
]);
// same query but mailbody
Database::pexecute($upd_stmt, array(
Database::pexecute($upd_stmt, [
'value' => $mailbody,
'adminid' => $userinfo['adminid'],
'id' => $mailbodyid
));
$log->logAction(ADM_ACTION, LOG_INFO, "edited template '" . $result['varname'] . "'");
redirectTo($filename, array('page' => $page, 's' => $s));
]);
$log->logAction(FroxlorLogger::ADM_ACTION, LOG_INFO, "edited template '" . $result['varname'] . "'");
Response::redirectTo($filename, [
'page' => $page
]);
} else {
$result = htmlentities_array($result);
$template = $lng['admin']['templates'][str_replace('_subject', '', $result['varname'])];
$result = PhpHelper::htmlentitiesArray($result);
$template_name = lng('admin.templates.' . str_replace('_subject', '', $result['varname']));
$subject = $result['value'];
$result_stmt = Database::prepare("
SELECT `language`, `varname`, `value`
FROM `" . TABLE_PANEL_TEMPLATES . "`
WHERE `id` = :id"
);
Database::pexecute($result_stmt, array('id' => $mailbodyid));
WHERE `id` = :id");
Database::pexecute($result_stmt, [
'id' => $mailbodyid
]);
$result = $result_stmt->fetch(PDO::FETCH_ASSOC);
$result = htmlentities_array($result);
$template = str_replace('_mailbody', '', $result['varname']);
// don't escape the already escaped language-string so save up before htmlentities()
$language = $result['language'];
$result = PhpHelper::htmlentitiesArray($result);
$mailbody = $result['value'];
$template_edit_data = include_once dirname(__FILE__) . '/lib/formfields/admin/templates/formfield.template_edit.php';
$template_edit_form = htmlform::genHTMLForm($template_edit_data);
$title = $template_edit_data['template_edit']['title'];
$image = $template_edit_data['template_edit']['image'];
eval("echo \"" . getTemplate("templates/templates_edit") . "\";");
UI::view('user/form-replacers.html.twig', [
'formaction' => $linker->getLink(['section' => 'templates']),
'formdata' => $template_edit_data['template_edit'],
'replacers' => $template_edit_data['template_replacers']
]);
}
}
} elseif($action == 'editf'
&& $id != 0
) {
} elseif ($action == 'editf' && $id != 0) {
// file templates
$result_stmt = Database::prepare("
SELECT * FROM `" . TABLE_PANEL_TEMPLATES . "`
WHERE `adminid` = :adminid AND `id` = :id"
);
Database::pexecute($result_stmt, array('adminid' => $userinfo['adminid'], 'id' => $id));
WHERE `adminid` = :adminid AND `id` = :id");
Database::pexecute($result_stmt, [
'adminid' => $userinfo['adminid'],
'id' => $id
]);
if (Database::num_rows() > 0) {
$row = $result_stmt->fetch(PDO::FETCH_ASSOC);
// filetemplates
if (isset($_POST['filesend'])
&& $_POST['filesend'] == 'filesend'
) {
$filecontent = validate($_POST['filecontent'], 'filecontent', '/^[^\0]+$/', 'filecontentnotset');
if (isset($_POST['filesend']) && $_POST['filesend'] == 'filesend') {
$filecontent = Validate::validate($_POST['filecontent'], 'filecontent', '/^[^\0]+$/', 'filecontentnotset');
$upd_stmt = Database::prepare("
UPDATE `" . TABLE_PANEL_TEMPLATES . "` SET
`value` = :value
WHERE `adminid` = :adminid AND `id` = :id"
);
Database::pexecute($upd_stmt, array(
WHERE `adminid` = :adminid AND `id` = :id");
Database::pexecute($upd_stmt, [
'value' => $filecontent,
'adminid' => $userinfo['adminid'],
'id' => $id
));
$log->logAction(ADM_ACTION, LOG_INFO, "edited template '" . $row['varname'] . "'");
redirectTo($filename, array('page' => $page, 's' => $s));
]);
$log->logAction(FroxlorLogger::ADM_ACTION, LOG_INFO, "edited template '" . $row['varname'] . "'");
Response::redirectTo($filename, [
'page' => $page
]);
} else {
$row = htmlentities_array($row);
$row = PhpHelper::htmlentitiesArray($row);
$filetemplate_edit_data = include_once dirname(__FILE__) . '/lib/formfields/admin/templates/formfield.filetemplate_edit.php';
$filetemplate_edit_form = htmlform::genHTMLForm($filetemplate_edit_data);
$title = $filetemplate_edit_data['filetemplate_edit']['title'];
$image = $filetemplate_edit_data['filetemplate_edit']['image'];
eval("echo \"" . getTemplate("templates/filetemplates_edit") . "\";");
UI::view('user/form-replacers.html.twig', [
'formaction' => $linker->getLink(['section' => 'templates']),
'formdata' => $filetemplate_edit_data['filetemplate_edit'],
'replacers' => $filetemplate_edit_data['filetemplate_replacers'],
'editid' => $id
]);
}
} else {
standard_error('templatenotfound');
exit;
Response::standardError('templatenotfound');
}
}

View File

@@ -1,907 +0,0 @@
<?php
/**
* This file is part of the Froxlor project.
* Copyright (c) 2003-2009 the SysCP Team (see authors).
* Copyright (c) 2010 the Froxlor Team (see authors).
*
* For the full copyright and license information, please view the COPYING
* file that was distributed with this source code. You can also view the
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
*
* @copyright (c) the authors
* @author Florian Lippert <flo@syscp.org> (2003-2009)
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Panel
*
*/
define('AREA', 'admin');
require './lib/init.php';
if (isset($_POST['id'])) {
$id = intval($_POST['id']);
} elseif(isset($_GET['id'])) {
$id = intval($_GET['id']);
// only check if this is not a category-id
if (!isset($_GET['page']) || (isset($_GET['page']) && $_GET['page'] != 'categories')) {
if (!$userinfo['customers_see_all']) {
/*
* Check if the current user is allowed to see the current ticket.
*/
$stmt = Database::prepare("
SELECT `id` FROM `panel_tickets`
WHERE `id` = :id AND `adminid` = :adminid
");
$result = Database::pexecute_first($stmt, array('id' => $id, 'adminid' => $userinfo['adminid']));
if ($result == null) {
// no rights to see the requested ticket
standard_error(array('ticketnotaccessible'));
}
}
}
}
if ($page == 'tickets'
&& $userinfo['customers'] != '0'
) {
// Let's see how many customers we have
$countcustomers_stmt = Database::prepare("
SELECT COUNT(`customerid`) as `countcustomers`
FROM `" . TABLE_PANEL_CUSTOMERS . "` " .
($userinfo['customers_see_all'] ? '' : "WHERE `adminid` = :adminid")
);
$countcustomers = Database::pexecute_first($countcustomers_stmt, array('adminid' => $userinfo['adminid']));
$countcustomers = (int)$countcustomers['countcustomers'];
if ($action == '') {
$log->logAction(ADM_ACTION, LOG_NOTICE, "viewed admin_tickets");
$fields = array(
'status' => $lng['ticket']['status'],
'lastchange' => $lng['ticket']['lastchange'],
'subject' => $lng['ticket']['subject'],
'lastreplier' => $lng['ticket']['lastreplier']
);
$paging = new paging($userinfo, TABLE_PANEL_TICKETS, $fields, null, null, 1, 'desc');
$result_stmt = Database::prepare("
SELECT `main`.`id`, `main`.`customerid`, (
SELECT COUNT(`sub`.`id`)
FROM `" . TABLE_PANEL_TICKETS . "` `sub`
WHERE `sub`.`answerto` = `main`.`id`) as `ticket_answers`,
`main`.`lastchange`, `main`.`subject`, `main`.`status`, `main`.`lastreplier`, `main`.`priority`
FROM `" . TABLE_PANEL_TICKETS . "` as `main`
WHERE `main`.`answerto` = '0' AND `archived` = '0' " .
($userinfo['customers_see_all'] ? '' : " AND `adminid` = :adminid") .
$paging->getSqlWhere(true) . " " . $paging->getSqlOrderBy() . " " . $paging->getSqlLimit()
);
Database::pexecute($result_stmt, array('adminid' => $userinfo['adminid']));
$num_rows = Database::num_rows();
$paging->setEntries($num_rows);
$sortcode = $paging->getHtmlSortCode($lng);
$arrowcode = $paging->getHtmlArrowCode($filename . '?page=' . $page . '&s=' . $s);
$searchcode = $paging->getHtmlSearchCode($lng);
$pagingcode = $paging->getHtmlPagingCode($filename . '?page=' . $page . '&s=' . $s);
$ctickets = array();
while ($row = $result_stmt->fetch(PDO::FETCH_ASSOC)) {
if (!isset($ctickets[$row['customerid']])
|| !is_array($ctickets[$row['customerid']])
) {
$ctickets[$row['customerid']] = array();
}
$ctickets[$row['customerid']][$row['id']] = $row;
}
if ($paging->sortfield == 'customerid'
&& $paging->sortorder == 'desc'
) {
krsort($ctickets);
} else {
ksort($ctickets);
}
$i = 0;
$count = 0;
$tickets_count = 0;
$tickets = '';
foreach ($ctickets as $cid => $ticketrows) {
$_cid = 0;
foreach ($ticketrows as $row) {
if ($paging->checkDisplay($i)) {
$row = htmlentities_array($row);
$row['lastchange'] = date("d.m.y H:i", $row['lastchange']);
if ($_cid != $row['customerid']) {
$cid = $row['customerid'];
$usr_stmt = Database::prepare('
SELECT `customerid`, `firstname`, `name`, `company`, `loginname`
FROM `' . TABLE_PANEL_CUSTOMERS . '`
WHERE `customerid` = :cid'
);
$usr = Database::pexecute_first($usr_stmt, array('cid' => $cid));
if (isset($usr['loginname'])) {
$customer = getCorrectFullUserDetails($usr);
$customerloginname = $usr['loginname'];
$customerid = $usr['customerid'];
} else {
$customer = $lng['ticket']['nonexistingcustomer'];
}
eval("\$tickets.=\"" . getTemplate("tickets/tickets_customer") . "\";");
}
$tickets_count++;
if ($row['status'] >= 0
&& $row['status'] <= 2
) {
$reopen = 0;
} else {
$reopen = 1;
}
$row['status'] = ticket::getStatusText($lng, $row['status']);
$row['priority'] = ticket::getPriorityText($lng, $row['priority']);
if ($row['lastreplier'] == '1') {
$row['lastreplier'] = $lng['ticket']['staff'];
$cananswer = 0;
} else {
$row['lastreplier'] = $lng['ticket']['customer'];
$cananswer = 1;
}
$row['subject'] = html_entity_decode($row['subject']);
if (strlen($row['subject']) > 20) {
$row['subject'] = substr($row['subject'], 0, 17) . '...';
}
eval("\$tickets.=\"" . getTemplate("tickets/tickets_tickets") . "\";");
$count++;
$_cid = $row['customerid'];
}
$i++;
}
}
eval("echo \"" . getTemplate("tickets/tickets") . "\";");
} elseif($action == 'new') {
if ($userinfo['tickets_used'] < $userinfo['tickets']
|| $userinfo['tickets'] == '-1'
) {
if (isset($_POST['send'])
&& $_POST['send'] == 'send'
) {
$newticket = ticket::getInstanceOf($userinfo, -1);
$newticket->Set('subject', validate($_POST['subject'], 'subject'), true, false);
$newticket->Set('priority', validate($_POST['priority'], 'priority'), true, false);
$newticket->Set('category', validate($_POST['category'], 'category'), true, false);
$newticket->Set('customer', (int)$_POST['customer'], true, false);
$newticket->Set('message', validate(htmlentities(str_replace("\r\n", "\n", $_POST['message'])), 'message', '/^[^\0]*$/'), true, false);
if ($newticket->Get('subject') == null) {
standard_error(array('stringisempty', 'mysubject'));
} elseif($newticket->Get('message') == null) {
standard_error(array('stringisempty', 'mymessage'));
} else {
$now = time();
$newticket->Set('admin', $userinfo['adminid'], true, true);
$newticket->Set('dt', $now, true, true);
$newticket->Set('lastchange', $now, true, true);
$newticket->Set('ip', $_SERVER['REMOTE_ADDR'], true, true);
$newticket->Set('status', '0', true, true);
$newticket->Set('lastreplier', '1', true, true);
$newticket->Set('by', '1', true, true);
$newticket->Insert();
$newticket->sendMail((int)$newticket->Get('customer'), 'new_ticket_by_staff_subject', $lng['mails']['new_ticket_by_staff']['subject'], 'new_ticket_by_staff_mailbody', $lng['mails']['new_ticket_by_staff']['mailbody']);
$log->logAction(ADM_ACTION, LOG_NOTICE, "opened a new ticket for customer #" . $newticket->Get('customer') . " - '" . $newticket->Get('subject') . "'");
redirectTo($filename, Array('page' => $page, 's' => $s));
}
} else {
$categories = '';
$where = '';
if ($userinfo['tickets_see_all'] != '1') {
$where = 'WHERE `adminid` = :adminid';
}
$result_stmt = Database::prepare('
SELECT `id`, `name` FROM `' . TABLE_PANEL_TICKET_CATS . '`
'.$where.' ORDER BY `logicalorder`, `name` ASC'
);
$result = Database::pexecute_first($result_stmt, array('adminid' => $userinfo['adminid']));
if (isset($result['name'])
&& $result['name'] != ''
) {
$result2_stmt = Database::prepare('
SELECT `id`, `name` FROM `' . TABLE_PANEL_TICKET_CATS . '`
'.$where.' ORDER BY `logicalorder`, `name` ASC'
);
Database::pexecute($result2_stmt, array('adminid' => $userinfo['adminid']));
while ($row = $result2_stmt->fetch(PDO::FETCH_ASSOC)) {
$categories.= makeoption($row['name'], $row['id']);
}
} else {
$categories = makeoption($lng['ticket']['no_cat'], '0');
}
$customers = '';
$result_customers_stmt = Database::prepare("
SELECT `customerid`, `loginname`, `name`, `firstname`, `company`
FROM `" . TABLE_PANEL_CUSTOMERS . "` " .
($userinfo['customers_see_all'] ? '' : " WHERE `adminid` = :adminid")."
ORDER BY `name` ASC"
);
Database::pexecute($result_customers_stmt, array('adminid' => $userinfo['adminid']));
while ($row_customer = $result_customers_stmt->fetch(PDO::FETCH_ASSOC)) {
$customers.= makeoption(getCorrectFullUserDetails($row_customer) . ' (' . $row_customer['loginname'] . ')', $row_customer['customerid']);
}
$def_prio = Settings::Get('ticket.default_priority');
$priorities = makeoption($lng['ticket']['high'], '1', $def_prio);
$priorities.= makeoption($lng['ticket']['normal'], '2', $def_prio);
$priorities.= makeoption($lng['ticket']['low'], '3', $def_prio);
$ticket_new_data = include_once dirname(__FILE__).'/lib/formfields/admin/tickets/formfield.ticket_new.php';
$ticket_new_form = htmlform::genHTMLForm($ticket_new_data);
$title = $ticket_new_data['ticket_new']['title'];
$image = $ticket_new_data['ticket_new']['image'];
eval("echo \"" . getTemplate("tickets/tickets_new") . "\";");
}
} else {
standard_error('nomoreticketsavailable');
}
} elseif($action == 'answer'
&& $id != 0
) {
if (isset($_POST['send'])
&& $_POST['send'] == 'send'
) {
$replyticket = ticket::getInstanceOf($userinfo, -1);
$replyticket->Set('subject', validate($_POST['subject'], 'subject'), true, false);
$replyticket->Set('priority', validate($_POST['priority'], 'priority'), true, false);
$replyticket->Set('message', validate(htmlentities(str_replace("\r\n", "\n", $_POST['message'])), 'message', '/^[^\0]*$/'), true, false);
if ($replyticket->Get('message') == null) {
standard_error(array('stringisempty', 'mymessage'));
} else {
$now = time();
$mainticket = ticket::getInstanceOf($userinfo, (int)$id);
$replyticket->Set('customer', $mainticket->Get('customer'), true, true);
$replyticket->Set('lastchange', $now, true, true);
$replyticket->Set('ip', $_SERVER['REMOTE_ADDR'], true, true);
$replyticket->Set('status', '1', true, true);
$replyticket->Set('answerto', (int)$id, true, false);
$replyticket->Set('by', '1', true, true);
$replyticket->Insert();
// Update priority if changed
if ($replyticket->Get('priority') != $mainticket->Get('priority')) {
$mainticket->Set('priority', $replyticket->Get('priority'), true);
}
$mainticket->Set('lastchange', $now);
$mainticket->Set('lastreplier', '1');
$mainticket->Set('status', '2');
$mainticket->Update();
$mainticket->sendMail((int)$mainticket->Get('customer'), 'new_reply_ticket_by_staff_subject', $lng['mails']['new_reply_ticket_by_staff']['subject'], 'new_reply_ticket_by_staff_mailbody', $lng['mails']['new_reply_ticket_by_staff']['mailbody']);
$log->logAction(ADM_ACTION, LOG_NOTICE, "answered ticket '" . $mainticket->Get('subject') . "'");
redirectTo($filename, array('page' => $page, 's' => $s));
}
} else {
$ticket_replies = '';
$mainticket = ticket::getInstanceOf($userinfo, (int)$id);
$dt = date("d.m.Y H:i\h", $mainticket->Get('dt'));
$status = ticket::getStatusText($lng, $mainticket->Get('status'));
if ($mainticket->Get('status') >= 0
&& $mainticket->Get('status') <= 2
) {
$isclosed = 0;
} else {
$isclosed = 1;
}
if ($mainticket->Get('by') == '1') {
$by = $lng['ticket']['staff'];
} else {
$cid = $mainticket->Get('customer');
$usr_stmt = Database::prepare('
SELECT `customerid`, `firstname`, `name`, `company`, `loginname`
FROM `' . TABLE_PANEL_CUSTOMERS . '`
WHERE `customerid` = :cid'
);
$usr = Database::pexecute_first($usr_stmt, array('cid' => $cid));
$by = '<a href="'.$linker->getLink(array('section' => 'customers', 'page' => 'customers', 'action' => 'su', 'id' => $cid)).'" rel="external">';
$by .= getCorrectFullUserDetails($usr).'</a>';
}
$subject = $mainticket->Get('subject');
$message = $mainticket->Get('message');
eval("\$ticket_replies.=\"" . getTemplate("tickets/tickets_tickets_main") . "\";");
$result_stmt = Database::prepare('
SELECT `name` FROM `' . TABLE_PANEL_TICKET_CATS . '` WHERE `id` = :cid'
);
$row = Database::pexecute_first($result_stmt, array('cid' => $mainticket->Get('category')));
$andere_stmt = Database::prepare('
SELECT * FROM `' . TABLE_PANEL_TICKETS . '`
WHERE `answerto` = :id ORDER BY `lastchange` ASC'
);
Database::pexecute($andere_stmt, array('id' => $id));
$numrows_andere = Database::num_rows();
while ($row2 = $andere_stmt->fetch(PDO::FETCH_ASSOC)) {
$subticket = ticket::getInstanceOf($userinfo, (int)$row2['id']);
$lastchange = date("d.m.Y H:i\h", $subticket->Get('lastchange'));
if ($subticket->Get('by') == '1') {
$by = $lng['ticket']['staff'];
} else {
$cid = $subticket->Get('customer');
$usr_stmt = Database::prepare('
SELECT `customerid`, `firstname`, `name`, `company`, `loginname`
FROM `' . TABLE_PANEL_CUSTOMERS . '`
WHERE `customerid` = :cid'
);
$usr = Database::pexecute_first($usr_stmt, array('cid' => $cid));
$by = '<a href="'.$linker->getLink(array('section' => 'customers', 'page' => 'customers', 'action' => 'su', 'id' => $cid)).'" rel="external">';
$by .= getCorrectFullUserDetails($usr).'</a>';
}
$subject = $subticket->Get('subject');
$message = $subticket->Get('message');
$row2 = htmlentities_array($row2);
eval("\$ticket_replies.=\"" . getTemplate("tickets/tickets_tickets_list") . "\";");
}
$priorities = makeoption($lng['ticket']['high'], '1', $mainticket->Get('priority'), true, true);
$priorities.= makeoption($lng['ticket']['normal'], '2', $mainticket->Get('priority'), true, true);
$priorities.= makeoption($lng['ticket']['low'], '3', $mainticket->Get('priority'), true, true);
$subject = htmlentities($mainticket->Get('subject'));
$ticket_replies_count = $numrows_andere + 1;
// don't forget the main-ticket!
$ticket_reply_data = include_once dirname(__FILE__).'/lib/formfields/admin/tickets/formfield.ticket_reply.php';
$ticket_reply_form = htmlform::genHTMLForm($ticket_reply_data);
$title = $ticket_reply_data['ticket_reply']['title'];
$image = $ticket_reply_data['ticket_reply']['image'];
eval("echo \"" . getTemplate("tickets/tickets_reply") . "\";");
}
} elseif($action == 'close'
&& $id != 0
) {
if (isset($_POST['send'])
&& $_POST['send'] == 'send'
) {
$now = time();
$mainticket = ticket::getInstanceOf($userinfo, (int)$id);
$mainticket->Set('lastchange', $now, true, true);
$mainticket->Set('lastreplier', '1', true, true);
$mainticket->Set('status', '3', true, true);
$mainticket->Update();
$log->logAction(ADM_ACTION, LOG_NOTICE, "closed ticket '" . $mainticket->Get('subject') . "'");
redirectTo($filename, array('page' => $page, 's' => $s));
} else {
$mainticket = ticket::getInstanceOf($userinfo, (int)$id);
ask_yesno('ticket_reallyclose', $filename, array('id' => $id, 'page' => $page, 'action' => $action), $mainticket->Get('subject'));
}
} elseif($action == 'reopen'
&& $id != 0
) {
$now = time();
$mainticket = ticket::getInstanceOf($userinfo, (int)$id);
$mainticket->Set('lastchange', $now, true, true);
$mainticket->Set('lastreplier', '1', true, true);
$mainticket->Set('status', '0', true, true);
$mainticket->Update();
$log->logAction(ADM_ACTION, LOG_NOTICE, "reopened ticket '" . $mainticket->Get('subject') . "'");
redirectTo($filename, array('page' => $page, 's' => $s));
} elseif($action == 'archive'
&& $id != 0
) {
if (isset($_POST['send'])
&& $_POST['send'] == 'send'
) {
$now = time();
$mainticket = ticket::getInstanceOf($userinfo, (int)$id);
$mainticket->Set('lastchange', $now, true, true);
$mainticket->Set('lastreplier', '1', true, true);
$mainticket->Set('status', '3', true, true);
$mainticket->Update();
$mainticket->Archive();
$log->logAction(ADM_ACTION, LOG_NOTICE, "archived ticket '" . $mainticket->Get('subject') . "'");
redirectTo($filename, array('page' => $page, 's' => $s));
} else {
$mainticket = ticket::getInstanceOf($userinfo, (int)$id);
ask_yesno('ticket_reallyarchive', $filename, array('id' => $id, 'page' => $page, 'action' => $action), $mainticket->Get('subject'));
}
} elseif($action == 'delete'
&& $id != 0
) {
if (isset($_POST['send'])
&& $_POST['send'] == 'send'
) {
$mainticket = ticket::getInstanceOf($userinfo, (int)$id);
$log->logAction(ADM_ACTION, LOG_INFO, "deleted ticket '" . $mainticket->Get('subject') . "'");
$mainticket->Delete();
redirectTo($filename, array('page' => $page, 's' => $s));
} else {
$mainticket = ticket::getInstanceOf($userinfo, (int)$id);
ask_yesno('ticket_reallydelete', $filename, array('id' => $id, 'page' => $page, 'action' => $action), $mainticket->Get('subject'));
}
}
} elseif($page == 'categories'
&& $userinfo['customers'] != '0'
) {
if ($action == '') {
$log->logAction(ADM_ACTION, LOG_NOTICE, "viewed admin_tickets::categories");
$fields = array(
'name' => $lng['ticket']['category'],
'logicalorder' => $lng['ticket']['logicalorder']
);
$where = '1'; // WHERE 1 is like no 'where-clause'
if ($userinfo['tickets_see_all'] != '1') {
$where = " `main`.`adminid` = :adminid";
}
$paging = new paging($userinfo, TABLE_PANEL_TICKET_CATS, $fields);
$result_stmt = Database::prepare("
SELECT `main`.`id`, `main`.`name`, `main`.`logicalorder`, (
SELECT COUNT(`sub`.`id`) FROM `" . TABLE_PANEL_TICKETS . "` `sub`
WHERE `sub`.`category` = `main`.`id`
AND `sub`.`answerto` = '0'
AND `sub`.`adminid` = :adminid
) as `ticketcount`, (
SELECT COUNT(`sub2`.`id`) FROM `" . TABLE_PANEL_TICKETS . "` `sub2`
WHERE `sub2`.`category` = `main`.`id`
AND `sub2`.`answerto` = '0'
AND (`sub2`.`status` = '0' OR `sub2`.`status` = '1' OR `sub2`.`status` = '2')
AND `sub2`.`adminid` = :adminid
) as `ticketcountnotclosed`
FROM `" . TABLE_PANEL_TICKET_CATS . "` `main`
WHERE " . $where . $paging->getSqlWhere(true) . " " .
$paging->getSqlOrderBy() . " " . $paging->getSqlLimit()
);
Database::pexecute($result_stmt, array('adminid' => $userinfo['adminid']));
$numrows = Database::num_rows();
$paging->setEntries($numrows);
$sortcode = $paging->getHtmlSortCode($lng);
$arrowcode = $paging->getHtmlArrowCode($filename . '?page=' . $page . '&s=' . $s);
$searchcode = $paging->getHtmlSearchCode($lng);
$pagingcode = $paging->getHtmlPagingCode($filename . '?page=' . $page . '&s=' . $s);
$i = 0;
$count = 0;
$ticketcategories = '';
$categories_count = $numrows;
while ($row = $result_stmt->fetch(PDO::FETCH_ASSOC)) {
if ($paging->checkDisplay($i)) {
$row = htmlentities_array($row);
$closedtickets_count = ($row['ticketcount'] - $row['ticketcountnotclosed']);
eval("\$ticketcategories.=\"" . getTemplate("tickets/tickets_categories") . "\";");
$count++;
}
$i++;
}
eval("echo \"" . getTemplate("tickets/categories") . "\";");
} elseif($action == 'addcategory') {
if (isset($_POST['send'])
&& $_POST['send'] == 'send'
) {
$category = validate($_POST['category'], 'category');
$order = validate($_POST['logicalorder'], 'logicalorder');
if ($order < 1 || $order >= 1000) {
// use the latest available
$order = ticket::getHighestOrderNumber($userinfo['adminid']) + 1;
}
if ($category == '') {
standard_error(array('stringisempty', 'mycategory'));
} else {
ticket::addCategory($category, $userinfo['adminid'], $order);
$log->logAction(ADM_ACTION, LOG_INFO, "added ticket-category '" . $category . "'");
redirectTo($filename, array('page' => $page, 's' => $s));
}
} else {
$order = ticket::getHighestOrderNumber($userinfo['adminid']) + 1;
$category_new_data = include_once dirname(__FILE__).'/lib/formfields/admin/tickets/formfield.category_new.php';
$category_new_form = htmlform::genHTMLForm($category_new_data);
$title = $category_new_data['category_new']['title'];
$image = $category_new_data['category_new']['image'];
eval("echo \"" . getTemplate("tickets/tickets_newcategory") . "\";");
}
} elseif($action == 'editcategory'
&& $id != 0
) {
if (isset($_POST['send'])
&& $_POST['send'] == 'send'
) {
$category = validate($_POST['category'], 'category');
$order = validate($_POST['logicalorder'], 'logicalorder');
if ($order < 1 || $order >= 1000) {
$order = 1;
}
if ($category == '') {
standard_error(array('stringisempty', 'mycategory'));
} else {
ticket::editCategory($category, $id, $order);
$log->logAction(ADM_ACTION, LOG_INFO, "edited ticket-category '" . $category . "'");
redirectTo($filename, array('page' => $page, 's' => $s));
}
} else {
$row_stmt = Database::prepare('
SELECT * FROM `' . TABLE_PANEL_TICKET_CATS . '` WHERE `id` = :id'
);
$row = Database::pexecute_first($row_stmt, array('id' => $id));
$row = htmlentities_array($row);
$category_edit_data = include_once dirname(__FILE__).'/lib/formfields/admin/tickets/formfield.category_edit.php';
$category_edit_form = htmlform::genHTMLForm($category_edit_data);
$title = $category_edit_data['category_edit']['title'];
$image = $category_edit_data['category_edit']['image'];
eval("echo \"" . getTemplate("tickets/tickets_editcategory") . "\";");
}
} elseif($action == 'deletecategory'
&& $id != 0
) {
if (isset($_POST['send'])
&& $_POST['send'] == 'send'
) {
if (ticket::deleteCategory($id) == false) {
standard_error('categoryhastickets');
}
$log->logAction(ADM_ACTION, LOG_INFO, "deleted ticket-category #" . $id);
redirectTo($filename, array('page' => $page, 's' => $s));
} else {
$name = ticket::getCategoryName($id);
ask_yesno('ticket_reallydeletecat', $filename, array('id' => $id, 'page' => $page, 'action' => $action), $name);
}
}
} elseif($page == 'archive'
&& $userinfo['customers'] != '0'
) {
if ($action == '') {
$log->logAction(ADM_ACTION, LOG_NOTICE, "viewed admin_tickets::archive");
if (isset($_POST['send'])
&& $_POST['send'] == 'send'
) {
$priority = array();
$categories = array();
$subject = validate($_POST['subject'], 'subject');
$priority[0] = isset($_POST['priority1']) ? $_POST['priority1'] : '';
$priority[1] = isset($_POST['priority2']) ? $_POST['priority2'] : '';
$priority[2] = isset($_POST['priority3']) ? $_POST['priority3'] : '';
$fromdate = validate($_POST['fromdate'], 'fromdate');
$todate = validate($_POST['todate'], 'todate');
$message = validate($_POST['message'], 'message');
$customer = validate($_POST['customer'], 'customer');
$cat_stmt = Database::query('SELECT COUNT(`id`) as `ccount` FROM `' . TABLE_PANEL_TICKET_CATS . '`');
$cat = $cat_stmt->fetch(PDO::FETCH_ASSOC);
for ($x = 0;$x < $cat['ccount'];$x++) {
$categories[$x] = isset($_POST['category' . $x]) ? $_POST['category' . $x] : '';
}
$archive_search = ticket::getArchiveSearchStatement($subject, $priority, $fromdate, $todate, $message, $customer, $userinfo['adminid'], $categories);
$query = $archive_search[0];
$archive_params = $archive_search[1];
$fields = array(
'lastchange' => $lng['ticket']['lastchange'],
'subject' => $lng['ticket']['subject'],
'lastreplier' => $lng['ticket']['lastreplier']
);
$paging = new paging($userinfo, TABLE_PANEL_TICKETS, $fields);
$result_stmt = Database::prepare($query . $paging->getSqlWhere(true) . " " . $paging->getSqlOrderBy() . " " . $paging->getSqlLimit());
Database::pexecute($result_stmt, $archive_params);
$sortcode = $paging->getHtmlSortCode($lng);
$arrowcode = $paging->getHtmlArrowCode($filename . '?page=' . $page . '&s=' . $s);
$searchcode = $paging->getHtmlSearchCode($lng);
$pagingcode = $paging->getHtmlPagingCode($filename . '?page=' . $page . '&s=' . $s);
$ctickets = array();
while ($row = $result_stmt->fetch(PDO::FETCH_ASSOC)) {
if (!isset($ctickets[$row['customerid']])
|| !is_array($ctickets[$row['customerid']])
) {
$ctickets[$row['customerid']] = array();
}
$ctickets[$row['customerid']][$row['id']] = $row;
}
if ($paging->sortfield == 'customerid'
&& $paging->sortorder == 'desc'
) {
krsort($ctickets);
} else {
ksort($ctickets);
}
$i = 0;
$count = 0;
$tickets_count = 0;
$tickets = '';
foreach ($ctickets as $cid => $ticketrows) {
if ($paging->sortfield == 'lastchange'
&& $paging->sortorder == 'desc'
) {
krsort($ticketrows);
} else {
ksort($ticketrows);
}
$_cid = -1;
foreach ($ticketrows as $ticket) {
if ($paging->checkDisplay($i)) {
$ticket['lastchange'] = date("d.m.y H:i", $ticket['lastchange']);
if ($_cid != $ticket['customerid']) {
$cid = $ticket['customerid'];
$usr_stmt = Database::prepare('
SELECT `customerid`, `firstname`, `name`, `company`, `loginname`
FROM `' . TABLE_PANEL_CUSTOMERS . '`
WHERE `customerid` = :cid'
);
$usr = Database::pexecute_first($usr_stmt, array('cid' => $cid));
if (isset($usr['loginname'])) {
$customer = getCorrectFullUserDetails($usr);
$customerloginname = $usr['loginname'];
$customerid = $usr['customerid'];
} else {
$customer = $lng['ticket']['nonexistingcustomer'];
$customerid = 0;
$customerloginname = '';
}
eval("\$tickets.=\"" . getTemplate("tickets/tickets_customer") . "\";");
}
$tickets_count++;
switch ($ticket['priority'])
{
case 1: $ticket['display'] = 'high';
break;
case 2: $ticket['display'] = 'normal';
break;
case 3: $ticket['display'] = 'low';
break;
default: $ticket['display'] = 'unknown';
}
$ticket['priority'] = ticket::getPriorityText($lng, $ticket['priority']);
if ($ticket['lastreplier'] == '1') {
$ticket['lastreplier'] = $lng['ticket']['staff'];
} else {
$ticket['lastreplier'] = $lng['ticket']['customer'];
}
if (strlen($ticket['subject']) > 20) {
$ticket['subject'] = substr($ticket['subject'], 0, 17) . '...';
}
$ticket = htmlentities_array($ticket);
eval("\$tickets.=\"" . getTemplate("tickets/archived_tickets") . "\";");
$count++;
$_cid = $ticket['customerid'];
}
}
$i++;
}
eval("echo \"" . getTemplate("tickets/archivesearch") . "\";");
} else {
$archived = array();
$archived = ticket::getLastArchived(6, $userinfo['adminid']);
$tickets = '';
if ($archived !== false) {
foreach ($archived as $id => $ticket) {
$ticket['lastchange'] = date("d.m.y H:i", $ticket['lastchange']);
$ticket['priority'] = ticket::getPriorityText($lng, $ticket['priority']);
if ($ticket['lastreplier'] == '1') {
$ticket['lastreplier'] = $lng['ticket']['staff'];
} else {
$ticket['lastreplier'] = $lng['ticket']['customer'];
}
if (strlen($ticket['subject']) > 20) {
$ticket['subject'] = substr($ticket['subject'], 0, 17) . '...';
}
eval("\$tickets.=\"" . getTemplate("tickets/archived_tickets") . "\";");
}
}
$priorities_options = makecheckbox('priority1', $lng['ticket']['high'], '1');
$priorities_options.= makecheckbox('priority2', $lng['ticket']['normal'], '2');
$priorities_options.= makecheckbox('priority3', $lng['ticket']['low'], '3');
$category_options = '';
$ccount = 0;
$result = Database::query('SELECT * FROM `' . TABLE_PANEL_TICKET_CATS . '` ORDER BY `name` ASC');
while ($row = $result->fetch(PDO::FETCH_ASSOC)) {
$category_options.= makecheckbox('category' . $ccount, $row['name'], $row['id'], true);
$ccount++;
}
$customers = makeoption($lng['ticket']['nocustomer'], '-1', '-1');
$result_customers_stmt = Database::prepare("
SELECT `customerid`, `loginname`, `name`, `firstname`, `company`
FROM `" . TABLE_PANEL_CUSTOMERS . "` " .
($userinfo['customers_see_all'] ? '' : " WHERE `adminid` = :adminid")."
ORDER BY `name` ASC"
);
Database::pexecute($result_customers_stmt, array('adminid' => $userinfo['adminid']));
while ($row_customer = $result_customers_stmt->fetch(PDO::FETCH_ASSOC)) {
$customers.= makeoption(getCorrectFullUserDetails($row_customer) . ' (' . $row_customer['loginname'] . ')', $row_customer['customerid']);
}
eval("echo \"" . getTemplate("tickets/archive") . "\";");
}
} elseif($action == 'view'
&& $id != 0
) {
$log->logAction(ADM_ACTION, LOG_NOTICE, "viewed archived-ticket #" . $id);
$ticket_replies = '';
$mainticket = ticket::getInstanceOf($userinfo, (int)$id);
$lastchange = date("d.m.Y H:i\h", $mainticket->Get('lastchange'));
$dt = date("d.m.Y H:i\h", $mainticket->Get('dt'));
$status = ticket::getStatusText($lng, $mainticket->Get('status'));
$isclosed = 1;
if ($mainticket->Get('by') == '1') {
$by = $lng['ticket']['staff'];
} else {
$cid = $mainticket->Get('customer');
$usr_stmt = Database::prepare('
SELECT `customerid`, `firstname`, `name`, `company`, `loginname`
FROM `' . TABLE_PANEL_CUSTOMERS . '`
WHERE `customerid` = :cid'
);
$usr = Database::pexecute_first($usr_stmt, array('cid' => $cid));
if (isset($usr['loginname'])) {
$customer = getCorrectFullUserDetails($usr);
$customerloginname = ' ('.$usr['loginname'].')';
$customerid = $usr['customerid'];
} else {
$customer = $lng['ticket']['nonexistingcustomer'];
$customerid = 0;
$customerloginname = '';
}
if ($customerid != 0) {
$by = '<a href="'.$linker->getLink(array('section' => 'customers', 'page' => 'customers', 'action' => 'su', 'id' => $customerid)).'" rel="external">';
$by .= $customer.$customerloginname.'</a>';
} else {
$by = $customer;
}
}
$subject = $mainticket->Get('subject');
$message = $mainticket->Get('message');
eval("\$ticket_replies.=\"" . getTemplate("tickets/tickets_tickets_main") . "\";");
$result_stmt = Database::prepare('
SELECT `name` FROM `' . TABLE_PANEL_TICKET_CATS . '` WHERE `id` = :cid'
);
$row = Database::pexecute_first($result_stmt, array('cid' => $mainticket->Get('category')));
$andere_stmt = Database::prepare('
SELECT * FROM `' . TABLE_PANEL_TICKETS . '` WHERE `answerto` = :id'
);
Database::pexecute($andere_stmt, array('id' => $id));
$numrows_andere = Database::num_rows();
while ($row2 = $andere_stmt->fetch(PDO::FETCH_ASSOC)) {
$subticket = ticket::getInstanceOf($userinfo, (int)$row2['id']);
$lastchange = date("d.m.Y H:i\h", $subticket->Get('lastchange'));
if ($subticket->Get('by') == '1') {
$by = $lng['ticket']['staff'];
} else {
$cid = $subticket->Get('customer');
$usr_stmt = Database::prepare('
SELECT `customerid`, `firstname`, `name`, `company`, `loginname`
FROM `' . TABLE_PANEL_CUSTOMERS . '`
WHERE `customerid` = :cid'
);
$usr = Database::pexecute_first($usr_stmt, array('cid' => $cid));
if (isset($usr['loginname'])) {
$customer = getCorrectFullUserDetails($usr);
$customerloginname = ' ('.$usr['loginname'].')';
$customerid = $usr['customerid'];
} else {
$customer = $lng['ticket']['nonexistingcustomer'];
$customerid = 0;
$customerloginname = '';
}
if ($customerid != 0) {
$by = '<a href="'.$linker->getLink(array('section' => 'customers', 'page' => 'customers', 'action' => 'su', 'id' => $customerid)).'" rel="external">';
$by .= $customer.$customerloginname.'</a>';
} else {
$by = $customer;
}
}
$subject = $subticket->Get('subject');
$message = $subticket->Get('message');
eval("\$ticket_replies.=\"" . getTemplate("tickets/tickets_tickets_list") . "\";");
}
$priorities = makeoption($lng['ticket']['high'], '1', htmlentities($mainticket->Get('priority')), true, true);
$priorities.= makeoption($lng['ticket']['normal'], '2', htmlentities($mainticket->Get('priority')), true, true);
$priorities.= makeoption($lng['ticket']['low'], '3', htmlentities($mainticket->Get('priority')), true, true);
$subject = $mainticket->Get('subject');
$ticket_replies_count = $numrows_andere + 1;
// don't forget the main-ticket!
eval("echo \"" . getTemplate("tickets/tickets_view") . "\";");
} elseif($action == 'delete'
&& $id != 0
) {
if (isset($_POST['send'])
&& $_POST['send'] == 'send'
) {
$mainticket = ticket::getInstanceOf($userinfo, (int)$id);
$log->logAction(ADM_ACTION, LOG_INFO, "deleted archived ticket '" . $mainticket->Get('subject') . "'");
$mainticket->Delete();
redirectTo($filename, array('page' => $page, 's' => $s));
} else {
$mainticket = ticket::getInstanceOf($userinfo, (int)$id);
ask_yesno('ticket_reallydelete', $filename, array('id' => $id, 'page' => $page, 'action' => $action), $mainticket->Get('subject'));
}
}
} else {
standard_error('nocustomerforticket');
}

View File

@@ -2,141 +2,47 @@
/**
* This file is part of the Froxlor project.
* Copyright (c) 2003-2009 the SysCP Team (see authors).
* Copyright (c) 2010 the Froxlor Team (see authors).
*
* For the full copyright and license information, please view the COPYING
* file that was distributed with this source code. You can also view the
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* @copyright (c) the authors
* @author Morton Jonuschat <m.jonuschat@chrome-it.de>
* @license GPLv2 http://files.syscp.org/misc/COPYING.txt
* @package Panel
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, you can also view it online at
* https://files.froxlor.org/misc/COPYING.txt
*
* @copyright the authors
* @author Froxlor team <team@froxlor.org>
* @license https://files.froxlor.org/misc/COPYING.txt GPLv2
*/
define('AREA', 'admin');
require './lib/init.php';
const AREA = 'admin';
require __DIR__ . '/lib/init.php';
if ($action == 'logout') {
$logout_stmt = Database::prepare("
DELETE FROM `" . TABLE_PANEL_SESSIONS . "`
WHERE `userid` = :adminid
AND `adminsession` = '1'"
);
Database::pexecute($logout_stmt, array('adminid' => $userinfo['adminid']));
redirectTo('index.php');
exit;
}
use Froxlor\Traffic\Traffic;
use Froxlor\UI\Panel\UI;
use Froxlor\UI\Request;
use Froxlor\UI\Response;
if (isset($_POST['id'])) {
$id = intval($_POST['id']);
} elseif(isset($_GET['id'])) {
$id = intval($_GET['id']);
}
$months = array(
'0' => 'empty',
'1' => 'jan',
'2' => 'feb',
'3' => 'mar',
'4' => 'apr',
'5' => 'may',
'6' => 'jun',
'7' => 'jul',
'8' => 'aug',
'9' => 'sep',
'10' => 'oct',
'11' => 'nov',
'12' => 'dec',
);
$range = Request::any('range', 'currentmonth');
if ($page == 'overview' || $page == 'customers') {
$customerview = 1;
$stats_tables = '';
$minyear_stmt = Database::query("SELECT `year` FROM `". TABLE_PANEL_TRAFFIC . "` ORDER BY `year` ASC LIMIT 1");
$minyear = $minyear_stmt->fetch(PDO::FETCH_ASSOC);
if (!isset($minyear['year']) || $minyear['year'] == 0) {
$maxyears = 0;
} else {
$maxyears = date("Y") - $minyear['year'];
try {
$context = Traffic::getCustomerStats($userinfo, $range);
} catch (Exception $e) {
if ($e->getCode() === 405) {
Response::dynamicError(lng('traffic.nocustomers'));
}
Response::dynamicError($e->getMessage());
}
for ($years = 0; $years<=$maxyears; $years++) {
$overview['year'] = date("Y")-$years;
$overview['type'] = $lng['traffic']['customer'];
$domain_list = '';
$totals = array(
'jan' => 0,
'feb' => 0,
'mar' => 0,
'apr' => 0,
'may' => 0,
'jun' => 0,
'jul' => 0,
'aug' => 0,
'sep' => 0,
'oct' => 0,
'nov' => 0,
'dec' => 0,
);
$customer_name_list_stmt = Database::prepare("
SELECT `customerid`,`company`,`name`,`firstname`
FROM `" . TABLE_PANEL_CUSTOMERS . "`
WHERE `deactivated`='0'" .
($userinfo['customers_see_all'] ? '' : " AND `adminid` = :id") . "
ORDER BY name"
);
Database::pexecute($customer_name_list_stmt, array('id' => $userinfo['adminid']));
while($customer_name = $customer_name_list_stmt->fetch(PDO::FETCH_ASSOC)) {
$virtual_host = array(
'name' => ($customer_name['company'] == '' ? $customer_name['name'] . ", " . $customer_name['firstname'] : $customer_name['company']),
'customerid' => $customer_name['customerid'],
'jan' => '-',
'feb' => '-',
'mar' => '-',
'apr' => '-',
'may' => '-',
'jun' => '-',
'jul' => '-',
'aug' => '-',
'sep' => '-',
'oct' => '-',
'nov' => '-',
'dec' => '-',
);
$traffic_list_stmt = Database::prepare("
SELECT month, SUM(http+ftp_up+ftp_down+mail)*1024 AS traffic
FROM `" . TABLE_PANEL_TRAFFIC . "`
WHERE year = :year AND `customerid` = :id
GROUP BY month ORDER BY month"
);
Database::pexecute($traffic_list_stmt, array('year' => (date("Y")-$years), 'id' => $customer_name['customerid']));
while ($traffic_month = $traffic_list_stmt->fetch(PDO::FETCH_ASSOC)) {
$virtual_host[$months[(int)$traffic_month['month']]] = size_readable($traffic_month['traffic'], 'GiB', 'bi', '%01.'.(int)Settings::Get('panel.decimal_places').'f %s');
$totals[$months[(int)$traffic_month['month']]] += $traffic_month['traffic'];
}
eval("\$domain_list .= sprintf(\"%s\", \"" . getTemplate("traffic/index_table_row") . "\");");
}
// sum up totals
$virtual_host = array(
'name' => $lng['traffic']['months']['total'],
);
foreach ($totals as $month => $bytes) {
$virtual_host[$month] = ($bytes == 0 ? '-' : size_readable($bytes, 'GiB', 'bi', '%01.'.(int)Settings::Get('panel.decimal_places').'f %s'));
}
$customerview = 0;
eval("\$total_list = sprintf(\"%s\", \"" . getTemplate("traffic/index_table_row") . "\");");
eval("\$stats_tables .= sprintf(\"%s\", \"" . getTemplate("traffic/index_table") . "\");");
}
eval("echo \"" . getTemplate("traffic/index") . "\";");
// pass metrics to the view
UI::view('user/traffic.html.twig', $context);
}

View File

@@ -4,107 +4,113 @@
* This file is part of the Froxlor project.
* Copyright (c) 2010 the Froxlor Team (see authors).
*
* For the full copyright and license information, please view the COPYING
* file that was distributed with this source code. You can also view the
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* @copyright (c) the authors
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Panel
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, you can also view it online at
* https://files.froxlor.org/misc/COPYING.txt
*
* @copyright the authors
* @author Froxlor team <team@froxlor.org>
* @license https://files.froxlor.org/misc/COPYING.txt GPLv2
*/
define('AREA', 'admin');
require './lib/init.php';
const AREA = 'admin';
require __DIR__ . '/lib/init.php';
use Froxlor\Cron\TaskId;
use Froxlor\Froxlor;
use Froxlor\FroxlorLogger;
use Froxlor\Install\Preconfig;
use Froxlor\Install\Update;
use Froxlor\Settings;
use Froxlor\System\Cronjob;
use Froxlor\UI\Panel\UI;
use Froxlor\UI\Response;
use Froxlor\User;
if ($page == 'overview') {
$log->logAction(ADM_ACTION, LOG_NOTICE, "viewed admin_updates");
$log->logAction(FroxlorLogger::ADM_ACTION, LOG_NOTICE, "viewed admin_updates");
/**
* this is a dirty hack but syscp 1.4.2.1 does not
* have any version/dbversion in the database (don't know why)
* so we have to set them both to run a correct upgrade
*/
if (!isFroxlor()) {
if (Settings::Get('panel.version') == null
|| Settings::Get('panel.version') == ''
) {
Settings::Set('panel.version', '1.4.2.1');
}
if (Settings::Get('system.dbversion') == null
|| Settings::Get('system.dbversion') == ''
) {
/**
* for syscp-stable (1.4.2.1) this value has to be 0
* so the required table-fields are added correctly
* and the svn-version has its value in the database
* -> bug #54
*/
$result_stmt = Database::query("
SELECT `value` FROM `" . TABLE_PANEL_SETTINGS . "` WHERE `varname` = 'dbversion'"
);
$result = $result_stmt->fetch(PDO::FETCH_ASSOC);
if (isset($result['value'])) {
Settings::Set('system.dbversion', (int)$result['value'], false);
} else {
Settings::Set('system.dbversion', 0, false);
}
}
if (!Froxlor::isFroxlor()) {
throw new Exception('SysCP/customized upgrades are not supported');
}
if (hasUpdates($version)) {
if (Froxlor::hasDbUpdates() || Froxlor::hasUpdates()) {
$successful_update = false;
$message = '';
if (isset($_POST['send'])
&& $_POST['send'] == 'send'
) {
if ((isset($_POST['update_preconfig'])
&& isset($_POST['update_changesagreed'])
&& intval($_POST['update_changesagreed']) != 0)
|| !isset($_POST['update_preconfig'])
) {
eval("echo \"" . getTemplate('update/update_start') . "\";");
if (isset($_POST['send']) && $_POST['send'] == 'send') {
if ((isset($_POST['update_preconfig']) && isset($_POST['update_changesagreed']) && intval($_POST['update_changesagreed']) != 0) || !isset($_POST['update_preconfig'])) {
include_once Froxlor::getInstallDir() . 'install/updatesql.php';
include_once './install/updatesql.php';
User::updateCounters();
Cronjob::inserttask(TaskId::REBUILD_VHOST);
@chmod(Froxlor::getInstallDir() . '/lib/userdata.inc.php', 0400);
$redirect_url = 'admin_index.php?s=' . $s;
eval("echo \"" . getTemplate('update/update_end') . "\";");
updateCounters();
inserttask('1');
@chmod('./lib/userdata.inc.php', 0440);
$successful_update = true;
UI::view('install/update.html.twig', [
'checks' => Update::getUpdateTasks()
]);
exit;
} else {
$message = '<br /><strong style="color: red">You have to agree that you have read the update notifications.</strong>';
$message = '<br><br><strong>You have to agree that you have read the update notifications.</strong>';
}
}
if (!$successful_update) {
$current_version = Settings::Get('panel.version');
$new_version = $version;
$ui_text = $lng['update']['update_information']['part_a'];
$ui_text = str_replace('%curversion', $current_version, $ui_text);
$ui_text = str_replace('%newversion', $new_version, $ui_text);
$update_information = $ui_text;
include_once './install/updates/preconfig.php';
$preconfig = getPreConfig($current_version);
if ($preconfig != '') {
$update_information .= '<br />' . $preconfig . $message;
$current_db_version = Settings::Get('panel.db_version');
if (empty($current_db_version)) {
$current_db_version = "0";
}
$new_version = Froxlor::VERSION;
$new_db_version = Froxlor::DBVERSION;
$update_information .= $lng['update']['update_information']['part_b'];
eval("echo \"" . getTemplate('update/index') . "\";");
}
if (Froxlor::VERSION != $current_version) {
$replacer_currentversion = $current_version;
$replacer_newversion = $new_version;
} else {
$success_message = $lng['update']['noupdatesavail'];
$redirect_url = 'admin_index.php?s=' . $s;
eval("echo \"" . getTemplate('update/noupdatesavail') . "\";");
// show db version
$replacer_currentversion = $current_db_version;
$replacer_newversion = $new_db_version;
}
$ui_text = lng('update.update_information.part_a', [$replacer_newversion, $replacer_currentversion]);
$ui_text .= lng('update.update_information.part_b');
$upd_formfield = [
'updates' => [
'title' => lng('update.update'),
'image' => 'fa-solid fa-download',
'description' => lng('update.description'),
'sections' => [],
'buttons' => [
[
'label' => lng('update.proceed')
]
]
]
];
$preconfig = Preconfig::getPreConfig();
if (!empty($preconfig)) {
$upd_formfield['updates']['sections'] = $preconfig;
}
UI::view('user/form-note.html.twig', [
'formaction' => $linker->getLink(['section' => 'updates']),
'formdata' => $upd_formfield['updates'],
// alert
'type' => !empty($message) ? 'danger' : 'info',
'alert_msg' => $ui_text . $message
]);
} else {
Response::standardSuccess('update.noupdatesavail', Settings::Get('system.update_channel') == 'testing' ? lng('serversettings.uc_testing') . ' ' : '');
}
}

44
api.php Normal file
View File

@@ -0,0 +1,44 @@
<?php
/**
* This file is part of the Froxlor project.
* Copyright (c) 2010 the Froxlor Team (see authors).
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, you can also view it online at
* https://files.froxlor.org/misc/COPYING.txt
*
* @copyright the authors
* @author Froxlor team <team@froxlor.org>
* @license https://files.froxlor.org/misc/COPYING.txt GPLv2
*/
use Froxlor\Api\Api;
use Froxlor\Api\Response;
require __DIR__ . '/vendor/autoload.php';
require __DIR__ . '/lib/functions.php';
require __DIR__ . '/lib/tables.inc.php';
// set error-handler
@set_error_handler([
'\\Froxlor\\Api\\Api',
'phpErrHandler'
]);
// Return response
try {
echo (new Api)->formatMiddleware(@file_get_contents('php://input'))->handle();
} catch (Exception $e) {
echo Response::jsonErrorResponse($e->getMessage(), $e->getCode());
}

186
api_keys.php Normal file
View File

@@ -0,0 +1,186 @@
<?php
/**
* This file is part of the Froxlor project.
* Copyright (c) 2010 the Froxlor Team (see authors).
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, you can also view it online at
* https://files.froxlor.org/misc/COPYING.txt
*
* @copyright the authors
* @author Froxlor team <team@froxlor.org>
* @license https://files.froxlor.org/misc/COPYING.txt GPLv2
*/
if (!defined('AREA')) {
header("Location: index.php");
exit();
}
use Froxlor\Database\Database;
use Froxlor\FroxlorLogger;
use Froxlor\UI\HTML;
use Froxlor\UI\Listing;
use Froxlor\UI\Panel\UI;
use Froxlor\UI\Request;
use Froxlor\UI\Response;
// redirect if this customer has no permission for API usage
if ($userinfo['adminsession'] == 0 && $userinfo['api_allowed'] == 0) {
Response::redirectTo('customer_index.php');
}
// redirect if this admin has no permission for API usage
if ($userinfo['adminsession'] == 1 && $userinfo['api_allowed'] == 0) {
Response::redirectTo('admin_index.php');
}
// This file is being included in admin_index and customer_index
// and therefore does not need to require lib/init.php
$del_stmt = Database::prepare("DELETE FROM `" . TABLE_API_KEYS . "` WHERE id = :id");
$id = (int)Request::any('id');
// do the delete and then just show a success-message and the apikeys list again
if ($action == 'delete' && $id > 0) {
HTML::askYesNo('apikey_reallydelete', $filename, [
'id' => $id,
'page' => $page,
'action' => 'deletesure'
], '', [
'section' => 'index',
'page' => $page
]);
} elseif (isset($_POST['send']) && $_POST['send'] == 'send' && $action == 'deletesure' && $id > 0) {
$chk = (AREA == 'admin' && $userinfo['customers_see_all'] == '1') ? true : false;
if (AREA == 'customer') {
$chk_stmt = Database::prepare("
SELECT c.customerid FROM `" . TABLE_PANEL_CUSTOMERS . "` c
LEFT JOIN `" . TABLE_API_KEYS . "` ak ON ak.customerid = c.customerid
WHERE ak.`id` = :id AND c.`customerid` = :cid
");
$chk = Database::pexecute_first($chk_stmt, [
'id' => $id,
'cid' => $userinfo['customerid']
]);
} elseif (AREA == 'admin' && $userinfo['customers_see_all'] == '0') {
$chk_stmt = Database::prepare("
SELECT a.adminid FROM `" . TABLE_PANEL_ADMINS . "` a
LEFT JOIN `" . TABLE_API_KEYS . "` ak ON ak.adminid = a.adminid
WHERE ak.`id` = :id AND a.`adminid` = :aid
");
$chk = Database::pexecute_first($chk_stmt, [
'id' => $id,
'aid' => $userinfo['adminid']
]);
}
if ($chk !== false) {
Database::pexecute($del_stmt, [
'id' => $id
]);
Response::standardSuccess('apikeys.apikey_removed', $id, [
'filename' => $filename,
'page' => $page
]);
}
} elseif ($action == 'add') {
if (isset($_POST['send']) && $_POST['send'] == 'send') {
$ins_stmt = Database::prepare("
INSERT INTO `" . TABLE_API_KEYS . "` SET
`apikey` = :key, `secret` = :secret, `adminid` = :aid, `customerid` = :cid, `valid_until` = '-1', `allowed_from` = ''
");
// customer generates for himself, admins will see a customer-select-box later
if (AREA == 'admin') {
$cid = 0;
} elseif (AREA == 'customer') {
$cid = $userinfo['customerid'];
}
$key = hash('sha256', openssl_random_pseudo_bytes(64 * 64));
$secret = hash('sha512', openssl_random_pseudo_bytes(64 * 64 * 4));
Database::pexecute($ins_stmt, [
'key' => $key,
'secret' => $secret,
'aid' => $userinfo['adminid'],
'cid' => $cid
]);
Response::standardSuccess('apikeys.apikey_added', '', [
'filename' => $filename,
'page' => $page
]);
}
HTML::askYesNo('apikey_reallyadd', $filename, [
'id' => $id,
'page' => $page,
'action' => $action
], '', [
'section' => 'index',
'page' => $page
]);
exit;
}
$log->logAction(FroxlorLogger::USR_ACTION, LOG_NOTICE, "viewed api::api_keys");
// select all my (accessible) api-keys
$keys_stmt_query = "SELECT ak.*, c.loginname, a.loginname as adminname
FROM `" . TABLE_API_KEYS . "` ak
LEFT JOIN `" . TABLE_PANEL_CUSTOMERS . "` c ON `c`.`customerid` = `ak`.`customerid`
LEFT JOIN `" . TABLE_PANEL_ADMINS . "` a ON `a`.`adminid` = `ak`.`adminid`
WHERE ";
$qry_params = [];
if (AREA == 'admin' && $userinfo['customers_see_all'] == '0') {
// admin with only customer-specific permissions
$keys_stmt_query .= "ak.adminid = :adminid ";
$qry_params['adminid'] = $userinfo['adminid'];
$fields = [
'a.loginname' => lng('login.username')
];
} elseif (AREA == 'customer') {
// customer-area
$keys_stmt_query .= "ak.customerid = :cid ";
$qry_params['cid'] = $userinfo['customerid'];
$fields = [
'c.loginname' => lng('login.username')
];
} else {
// admin who can see all customers / reseller / admins
$keys_stmt_query .= "1 ";
$fields = [
'a.loginname' => lng('login.username')
];
}
//$keys_stmt_query .= $paging->getSqlWhere(true) . " " . $paging->getSqlOrderBy() . " " . $paging->getSqlLimit();
$keys_stmt = Database::prepare($keys_stmt_query);
Database::pexecute($keys_stmt, $qry_params);
$all_keys = $keys_stmt->fetchAll(PDO::FETCH_ASSOC);
$apikeys_list_data = include_once dirname(__FILE__) . '/lib/tablelisting/tablelisting.apikeys.php';
$collection = [
'data' => $all_keys,
'pagination' => []
];
$tpl = 'user/table.html.twig';
UI::view($tpl, [
'listing' => Listing::formatFromArray($collection, $apikeys_list_data['apikeys_list'], 'apikeys_list'),
'actions_links' => (int)$userinfo['api_allowed'] == 1 ? [
[
'href' => $linker->getLink(['section' => 'index', 'page' => $page, 'action' => 'add']),
'label' => lng('apikeys.key_add')
]
] : null,
]);

66
bin/froxlor-cli Executable file
View File

@@ -0,0 +1,66 @@
#!/usr/bin/env php
<?php
/**
* This file is part of the Froxlor project.
* Copyright (c) 2010 the Froxlor Team (see authors).
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, you can also view it online at
* https://files.froxlor.org/misc/COPYING.txt
*
* @copyright the authors
* @author Froxlor team <team@froxlor.org>
* @license https://files.froxlor.org/misc/COPYING.txt GPLv2
*/
declare(strict_types=1);
use Froxlor\Cli\ConfigDiff;
use Symfony\Component\Console\Application;
use Froxlor\Cli\RunApiCommand;
use Froxlor\Cli\ConfigServices;
use Froxlor\Cli\PhpSessionclean;
use Froxlor\Cli\SwitchServerIp;
use Froxlor\Cli\UpdateCommand;
use Froxlor\Cli\InstallCommand;
use Froxlor\Cli\MasterCron;
use Froxlor\Cli\UserCommand;
use Froxlor\Cli\ValidateAcmeWebroot;
use Froxlor\Froxlor;
// validate correct php version
if (version_compare("7.4.0", PHP_VERSION, ">=")) {
die('Froxlor requires at least php-7.4. Please validate that your php-cli version is suitable.');
}
// ensure that default timezone is set
if (function_exists("date_default_timezone_set") && function_exists("date_default_timezone_get")) {
@date_default_timezone_set(@date_default_timezone_get());
}
require dirname(__DIR__) . '/vendor/autoload.php';
require dirname(__DIR__) . '/lib/tables.inc.php';
$application = new Application('froxlor-cli', Froxlor::getFullVersion());
$application->add(new RunApiCommand());
$application->add(new ConfigServices());
$application->add(new PhpSessionclean());
$application->add(new SwitchServerIp());
$application->add(new UpdateCommand());
$application->add(new InstallCommand());
$application->add(new MasterCron());
$application->add(new UserCommand());
$application->add(new ValidateAcmeWebroot());
$application->add(new ConfigDiff());
$application->run();

278
build.xml Normal file
View File

@@ -0,0 +1,278 @@
<?xml version="1.0" encoding="UTF-8"?>
<project name="froxlor" default="build">
<!-- Use this when the tools are managed by Composer in ${basedir}/vendor/bin -->
<property name="pdepend" value="${basedir}/vendor/bin/pdepend" />
<property name="phpcpd" value="${basedir}/vendor/bin/phpcpd" />
<property name="phpcs" value="${basedir}/vendor/bin/phpcs" />
<property name="phploc" value="${basedir}/vendor/bin/phploc" />
<property name="phpmd" value="${basedir}/vendor/bin/phpmd" />
<property name="phpunit" value="${basedir}/vendor/bin/phpunit" />
<target name="full-build"
depends="prepare,composer,static-analysis,phpunit,-check-failure"
description="Performs static analysis, runs the tests, and generates project documentation" />
<target name="full-build-parallel"
depends="prepare,composer,static-analysis-parallel,phpunit,-check-failure"
description="Performs static analysis (executing the tools in parallel), runs the tests, and generates project documentation" />
<target name="quick-build"
depends="prepare,composer,lint,phpunit-no-coverage,-check-failure"
description="Performs a lint check and runs the tests (without generating code coverage reports)" />
<target name="static-analysis"
depends="composer,lint,phploc-ci,pdepend,phpmd-ci,phpcs-ci,phpcompat-ci,phpcpd-ci"
description="Performs static analysis" />
<!-- Adjust the threadCount attribute's value to the number of CPUs -->
<target name="static-analysis-parallel"
description="Performs static analysis (executing the tools in parallel)">
<parallel threadCount="2">
<sequential>
<antcall target="pdepend" />
<antcall target="phpmd-ci" />
</sequential>
<antcall target="lint" />
<antcall target="phpcpd-ci" />
<antcall target="phpcs-ci" />
<antcall target="phpcompat-ci" />
<antcall target="phploc-ci" />
</parallel>
</target>
<target name="clean" unless="clean.done"
description="Cleanup build artifacts">
<delete dir="${basedir}/build/api" />
<delete dir="${basedir}/build/coverage" />
<delete dir="${basedir}/build/logs" />
<delete dir="${basedir}/build/pdepend" />
<property name="clean.done" value="true" />
</target>
<target name="prepare" unless="prepare.done" depends="clean"
description="Prepare for build">
<mkdir dir="${basedir}/build/api" />
<mkdir dir="${basedir}/build/coverage" />
<mkdir dir="${basedir}/build/logs" />
<mkdir dir="${basedir}/build/pdepend" />
<property name="prepare.done" value="true" />
</target>
<target name="composer"
description="Installing composer dependencies" depends="prepare">
<exec executable="composer" failonerror="true">
<arg value="install" />
<arg value="--prefer-dist" />
<arg value="--no-progress" />
</exec>
</target>
<target name="lint" unless="lint.done"
description="Perform syntax check of sourcecode files">
<apply executable="php" taskname="lint">
<arg value="-l" />
<fileset dir="${basedir}/lib/Froxlor">
<include name="**/*.php" />
<modified />
</fileset>
<fileset dir="${basedir}/tests">
<include name="**/*.php" />
<modified />
</fileset>
</apply>
<property name="lint.done" value="true" />
</target>
<target name="phploc" unless="phploc.done"
description="Measure project size using PHPLOC and print human readable output. Intended for usage on the command line.">
<exec executable="${phploc}" taskname="phploc">
<arg value="--count-tests" />
<arg path="${basedir}/lib/Froxlor" />
<arg path="${basedir}/tests" />
</exec>
<property name="phploc.done" value="true" />
</target>
<target name="phploc-ci" unless="phploc.done" depends="prepare"
description="Measure project size using PHPLOC and log result in CSV and XML format. Intended for usage within a continuous integration environment.">
<exec executable="${phploc}" taskname="phploc">
<arg value="--count-tests" />
<arg value="--log-csv" />
<arg path="${basedir}/build/logs/phploc.csv" />
<arg value="--log-xml" />
<arg path="${basedir}/build/logs/phploc.xml" />
<arg path="${basedir}/lib/Froxlor" />
<arg path="${basedir}/tests" />
</exec>
<property name="phploc.done" value="true" />
</target>
<target name="pdepend" unless="pdepend.done" depends="prepare"
description="Calculate software metrics using PHP_Depend and log result in XML format. Intended for usage within a continuous integration environment.">
<exec executable="${pdepend}" taskname="pdepend">
<arg value="--jdepend-xml=${basedir}/build/logs/jdepend.xml" />
<arg
value="--jdepend-chart=${basedir}/build/pdepend/dependencies.svg" />
<arg
value="--overview-pyramid=${basedir}/build/pdepend/overview-pyramid.svg" />
<arg path="${basedir}/lib/Froxlor" />
</exec>
<property name="pdepend.done" value="true" />
</target>
<target name="phpmd" unless="phpmd.done"
description="Perform project mess detection using PHPMD and print human readable output. Intended for usage on the command line before committing.">
<exec executable="${phpmd}" taskname="phpmd">
<arg path="${basedir}/lib/Froxlor" />
<arg value="text" />
<arg path="${basedir}/phpmd.xml" />
</exec>
<property name="phpmd.done" value="true" />
</target>
<target name="phpmd-ci" unless="phpmd.done" depends="prepare"
description="Perform project mess detection using PHPMD and log result in XML format. Intended for usage within a continuous integration environment.">
<exec executable="${phpmd}" taskname="phpmd">
<arg path="${basedir}/lib/Froxlor" />
<arg value="xml" />
<arg path="${basedir}/phpmd.xml" />
<arg value="--reportfile" />
<arg path="${basedir}/build/logs/pmd.xml" />
</exec>
<property name="phpmd.done" value="true" />
</target>
<target name="phpcs" unless="phpcs.done"
description="Find coding standard violations using PHP_CodeSniffer and print human readable output. Intended for usage on the command line before committing.">
<exec executable="${phpcs}" taskname="phpcs">
<arg value="--standard=${basedir}/phpcs.xml" />
<arg value="--extensions=php" />
<arg path="${basedir}/lib/Froxlor" />
<arg path="${basedir}/tests" />
</exec>
<property name="phpcs.done" value="true" />
</target>
<target name="phpcs-ci" unless="phpcs.done" depends="prepare"
description="Find coding standard violations using PHP_CodeSniffer and log result in XML format. Intended for usage within a continuous integration environment.">
<exec executable="${phpcs}" output="/dev/null" taskname="phpcs">
<arg value="--report=checkstyle" />
<arg
value="--report-file=${basedir}/build/logs/checkstyle-standard.xml" />
<arg value="--standard=${basedir}/phpcs.xml" />
<arg value="--extensions=php" />
<arg path="${basedir}/lib/Froxlor" />
<arg path="${basedir}/tests" />
</exec>
<property name="phpcs.done" value="true" />
</target>
<target name="phpcompat" unless="phpcompat.done"
depends="composer"
description="Find php violations using PHP_CodeSniffer and print human readable output. Intended for usage on the command line before committing.">
<exec executable="${phpcs}" taskname="phpcompat">
<arg
line="--standard=PHPCompatibility --runtime-set testVersion 5.6 ${basedir}/lib/Froxlor ${basedir}/tests" />
</exec>
<property name="phpcompat.done" value="true" />
</target>
<target name="phpcompat-ci" unless="phpcompat.done"
depends="composer"
description="Find php violations using PHP_CodeSniffer and log result in XML format. Intended for usage within a continuous integration environment.">
<exec executable="${phpcs}" output="/dev/null"
taskname="phpcompat">
<arg
line="--standard=PHPCompatibility --runtime-set testVersion 5.6 --report=checkstyle --report-file=${basedir}/build/logs/checkstyle-compat.xml ${basedir}/lib/Froxlor ${basedir}/tests" />
</exec>
<property name="phpcompat.done" value="true" />
</target>
<target name="phpcpd" unless="phpcpd.done"
description="Find duplicate code using PHPCPD and print human readable output. Intended for usage on the command line before committing.">
<exec executable="${phpcpd}" taskname="phpcpd">
<arg path="${basedir}/lib/Froxlor" />
</exec>
<property name="phpcpd.done" value="true" />
</target>
<target name="phpcpd-ci" unless="phpcpd.done" depends="prepare"
description="Find duplicate code using PHPCPD and log result in XML format. Intended for usage within a continuous integration environment.">
<exec executable="${phpcpd}" taskname="phpcpd">
<arg value="--log-pmd" />
<arg path="${basedir}/build/logs/pmd-cpd.xml" />
<arg path="${basedir}/lib/Froxlor" />
</exec>
<property name="phpcpd.done" value="true" />
</target>
<target name="phpunit-prepare" unless="phpunit-prepare.done" depends="composer"
description="prepare xdebug unit tests">
<exec executable="${phpunit}" resultproperty="result.phpunit-prepare"
taskname="phpunit">
<arg value="--configuration" />
<arg path="${basedir}/phpunit.xml" />
<arg value="--dump-xdebug-filter" />
<arg path="${basedir}/tests/xdebug-filter.php" />
</exec>
<property name="phpunit-prepare.done" value="true" />
</target>
<target name="phpunit" unless="phpunit.done" depends="phpunit-prepare"
description="Run unit tests with PHPUnit">
<exec executable="${phpunit}" failonerror="true" resultproperty="result.phpunit"
taskname="phpunit">
<arg value="--configuration" />
<arg path="${basedir}/phpunit.xml" />
<arg value="--testsuite" />
<arg value="froxlor" />
<arg value="--prepend" />
<arg path="${basedir}/tests/xdebug-filter.php" />
</exec>
<property name="phpunit.done" value="true" />
</target>
<target name="phpunit-no-coverage" unless="phpunit.done"
depends="composer"
description="Run unit tests with PHPUnit (without generating code coverage reports)">
<exec executable="${phpunit}" failonerror="true" resultproperty="result.phpunit"
taskname="phpunit">
<arg value="--configuration" />
<arg path="${basedir}/phpunit.xml" />
<arg value="--testsuite" />
<arg value="froxlor" />
<arg value="--no-coverage" />
</exec>
<property name="phpunit.done" value="true" />
</target>
<target name="-check-failure">
<fail message="PHPUnit did not finish successfully">
<condition>
<not>
<equals arg1="${result.phpunit}" arg2="0" />
</not>
</condition>
</fail>
</target>
</project>

1
cache/.gitignore vendored
View File

@@ -1 +1,2 @@
!.gitignore
*

88
composer.json Normal file
View File

@@ -0,0 +1,88 @@
{
"name": "froxlor/froxlor",
"description": "The server administration software for your needs. Developed by experienced server administrators, this panel simplifies the effort of managing your hosting platform.",
"keywords": [
"server",
"administration",
"php"
],
"homepage": "https://www.froxlor.org",
"license": "GPL-2.0-or-later",
"authors": [
{
"name": "Michael Kaufmann",
"email": "team@froxlor.org",
"role": "Lead Developer"
}
],
"support": {
"email": "team@froxlor.org",
"issues": "https://github.com/Froxlor/Froxlor/issues",
"forum": "https://forum.froxlor.org/",
"source": "https://github.com/Froxlor/Froxlor",
"docs": "https://docs.froxlor.org/",
"chat": "https://discord.froxlor.org/"
},
"funding": [
{
"type": "github",
"url": "https://github.com/sponsors/d00p"
}
],
"require": {
"php": "^7.4 || ^8.0",
"ext-session": "*",
"ext-ctype": "*",
"ext-pdo": "*",
"ext-pdo_mysql": "*",
"ext-simplexml": "*",
"ext-xml": "*",
"ext-filter": "*",
"ext-posix": "*",
"ext-mbstring": "*",
"ext-curl": "*",
"ext-json": "*",
"ext-openssl": "*",
"ext-fileinfo": "*",
"ext-gmp": "*",
"ext-gd": "*",
"phpmailer/phpmailer": "~6.0",
"monolog/monolog": "^1.24",
"robthree/twofactorauth": "^1.6",
"froxlor/idna-convert-legacy": "^2.1",
"voku/anti-xss": "^4.1",
"twig/twig": "^3.3",
"erusev/parsedown": "^1.7",
"symfony/console": "^5.4",
"pear/net_dns2": "^1.5"
},
"require-dev": {
"phpunit/phpunit": "^9",
"ext-pcntl": "*",
"phpcompatibility/php-compatibility": "*",
"squizlabs/php_codesniffer": "*",
"pdepend/pdepend": "^2.9",
"sebastian/phpcpd": "^6.0",
"phploc/phploc": "^7.0",
"phpmd/phpmd": "^2.10",
"phpunit/php-timer" : "^5",
"phpstan/phpstan": "^1.8"
},
"suggest": {
"ext-bcmath": "*",
"ext-zip": "*",
"ext-apcu": "*",
"ext-readline": "*"
},
"autoload": {
"psr-4": {
"Froxlor\\": [
"lib/Froxlor"
]
}
},
"scripts": {
"post-install-cmd": "if [ -f ./vendor/bin/phpcs ]; then \"vendor/bin/phpcs\" --config-set installed_paths vendor/phpcompatibility/php-compatibility ; fi",
"post-update-cmd" : "if [ -f ./vendor/bin/phpcs ]; then \"vendor/bin/phpcs\" --config-set installed_paths vendor/phpcompatibility/php-compatibility ; fi"
}
}

4476
composer.lock generated Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -2,465 +2,343 @@
/**
* This file is part of the Froxlor project.
* Copyright (c) 2003-2009 the SysCP Team (see authors).
* Copyright (c) 2010 the Froxlor Team (see authors).
*
* For the full copyright and license information, please view the COPYING
* file that was distributed with this source code. You can also view the
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* @copyright (c) the authors
* @author Florian Lippert <flo@syscp.org> (2003-2009)
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Panel
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, you can also view it online at
* https://files.froxlor.org/misc/COPYING.txt
*
* @copyright the authors
* @author Froxlor team <team@froxlor.org>
* @license https://files.froxlor.org/misc/COPYING.txt GPLv2
*/
define('AREA', 'customer');
require './lib/init.php';
const AREA = 'customer';
require __DIR__ . '/lib/init.php';
if (isset($_POST['id'])) {
$id = intval($_POST['id']);
} elseif (isset($_GET['id'])) {
$id = intval($_GET['id']);
use Froxlor\Api\Commands\CustomerBackups as CustomerBackups;
use Froxlor\Api\Commands\DirOptions as DirOptions;
use Froxlor\Api\Commands\DirProtections as DirProtections;
use Froxlor\Customer\Customer;
use Froxlor\FileDir;
use Froxlor\FroxlorLogger;
use Froxlor\PhpHelper;
use Froxlor\Settings;
use Froxlor\UI\Collection;
use Froxlor\UI\HTML;
use Froxlor\UI\Listing;
use Froxlor\UI\Panel\UI;
use Froxlor\UI\Request;
use Froxlor\UI\Response;
// redirect if this customer page is hidden via settings
if (Settings::IsInList('panel.customer_hide_options', 'extras')) {
Response::redirectTo('customer_index.php');
}
$id = (int)Request::any('id');
if ($page == 'overview' || $page == 'htpasswds') {
// redirect if this customer sub-page is hidden via settings
if (Settings::IsInList('panel.customer_hide_options', 'extras.directoryprotection')) {
Response::redirectTo('customer_index.php');
}
if ($page == 'overview') {
$log->logAction(USR_ACTION, LOG_NOTICE, "viewed customer_extras");
eval("echo \"" . getTemplate("extras/extras") . "\";");
} elseif ($page == 'htpasswds') {
if ($action == '') {
$log->logAction(USR_ACTION, LOG_NOTICE, "viewed customer_extras::htpasswds");
$fields = array(
'username' => $lng['login']['username'],
'path' => $lng['panel']['path']
);
$paging = new paging($userinfo, TABLE_PANEL_HTPASSWDS, $fields);
$result_stmt = Database::prepare("SELECT * FROM `" . TABLE_PANEL_HTPASSWDS . "`
WHERE `customerid`= :customerid " . $paging->getSqlWhere(true) . " " . $paging->getSqlOrderBy() . " " . $paging->getSqlLimit()
);
Database::pexecute($result_stmt, array("customerid" => $userinfo['customerid']));
$paging->setEntries(Database::num_rows());
$sortcode = $paging->getHtmlSortCode($lng);
$arrowcode = $paging->getHtmlArrowCode($filename . '?page=' . $page . '&s=' . $s);
$searchcode = $paging->getHtmlSearchCode($lng);
$pagingcode = $paging->getHtmlPagingCode($filename . '?page=' . $page . '&s=' . $s);
$i = 0;
$count = 0;
$htpasswds = '';
while ($row = $result_stmt->fetch(PDO::FETCH_ASSOC)) {
if ($paging->checkDisplay($i)) {
if (strpos($row['path'], $userinfo['documentroot']) === 0) {
$row['path'] = substr($row['path'], strlen($userinfo['documentroot']));
$log->logAction(FroxlorLogger::USR_ACTION, LOG_NOTICE, "viewed customer_extras::htpasswds");
$fields = [
'username' => lng('login.username'),
'path' => lng('panel.path')
];
try {
$htpasswd_list_data = include_once dirname(__FILE__) . '/lib/tablelisting/customer/tablelisting.htpasswd.php';
$collection = (new Collection(DirProtections::class, $userinfo))
->withPagination($htpasswd_list_data['htpasswd_list']['columns'], $htpasswd_list_data['htpasswd_list']['default_sorting']);
} catch (Exception $e) {
Response::dynamicError($e->getMessage());
}
$row = htmlentities_array($row);
eval("\$htpasswds.=\"" . getTemplate("extras/htpasswds_htpasswd") . "\";");
$count++;
}
$i++;
}
eval("echo \"" . getTemplate("extras/htpasswds") . "\";");
UI::view('user/table.html.twig', [
'listing' => Listing::format($collection, $htpasswd_list_data, 'htpasswd_list'),
'actions_links' => [
[
'href' => $linker->getLink(['section' => 'extras', 'page' => 'htpasswds', 'action' => 'add']),
'label' => lng('extras.directoryprotection_add')
]
],
'entity_info' => lng('extras.description')
]);
} elseif ($action == 'delete' && $id != 0) {
$result_stmt = Database::prepare("SELECT * FROM `" . TABLE_PANEL_HTPASSWDS . "`
WHERE `customerid`= :customerid
AND `id`= :id"
);
Database::pexecute($result_stmt, array("customerid" => $userinfo['customerid'], "id" => $id));
$result = $result_stmt->fetch(PDO::FETCH_ASSOC);
try {
$json_result = DirProtections::getLocal($userinfo, [
'id' => $id
])->get();
} catch (Exception $e) {
Response::dynamicError($e->getMessage());
}
$result = json_decode($json_result, true)['data'];
if (isset($result['username']) && $result['username'] != '') {
if (isset($_POST['send']) && $_POST['send'] == 'send') {
$stmt = Database::prepare("DELETE FROM `" . TABLE_PANEL_HTPASSWDS . "`
WHERE `customerid`= :customerid
AND `id`= :id"
);
Database::pexecute($stmt, array("customerid" => $userinfo['customerid'], "id" => $id));
$log->logAction(USR_ACTION, LOG_INFO, "deleted htpasswd for '" . $result['username'] . " (" . $result['path'] . ")'");
inserttask('1');
redirectTo($filename, array('page' => $page, 's' => $s));
try {
DirProtections::getLocal($userinfo, $_POST)->delete();
} catch (Exception $e) {
Response::dynamicError($e->getMessage());
}
Response::redirectTo($filename, [
'page' => $page
]);
} else {
if (strpos($result['path'], $userinfo['documentroot']) === 0) {
$result['path'] = substr($result['path'], strlen($userinfo['documentroot']));
$result['path'] = str_replace($userinfo['documentroot'], "/", $result['path']);
}
ask_yesno('extras_reallydelete', $filename, array('id' => $id, 'page' => $page, 'action' => $action), $result['username'] . ' (' . $result['path'] . ')');
HTML::askYesNo('extras_reallydelete', $filename, [
'id' => $id,
'page' => $page,
'action' => $action
], $result['username'] . ' (' . $result['path'] . ')');
}
}
} elseif ($action == 'add') {
if (isset($_POST['send']) && $_POST['send'] == 'send') {
$path = makeCorrectDir(validate($_POST['path'], 'path'));
$userpath = $path;
$path = makeCorrectDir($userinfo['documentroot'] . '/' . $path);
$username = validate($_POST['username'], 'username', '/^[a-zA-Z0-9][a-zA-Z0-9\-_]+\$?$/');
$authname = validate($_POST['directory_authname'], 'directory_authname', '/^[a-zA-Z0-9][a-zA-Z0-9\-_ ]+\$?$/');
validate($_POST['directory_password'], 'password');
$username_path_check_stmt = Database::prepare("SELECT `id`, `username`, `path` FROM `" . TABLE_PANEL_HTPASSWDS . "`
WHERE `username`= :username
AND `path`= :path
AND `customerid`= :customerid"
);
$params = array(
"username" => $username,
"path" => $path,
"customerid" => $userinfo['customerid']
);
Database::pexecute($username_path_check_stmt, $params);
$username_path_check = $username_path_check_stmt->fetch(PDO::FETCH_ASSOC);
if (CRYPT_STD_DES == 1) {
$saltfordescrypt = substr(md5(uniqid(microtime(), 1)), 4, 2);
$password = crypt($_POST['directory_password'], $saltfordescrypt);
} else {
$password = crypt($_POST['directory_password']);
try {
DirProtections::getLocal($userinfo, $_POST)->add();
} catch (Exception $e) {
Response::dynamicError($e->getMessage());
}
if (!$_POST['path']) {
standard_error('invalidpath');
}
if ($username == '') {
standard_error(array('stringisempty', 'myloginname'));
} elseif ($username_path_check['username'] == $username && $username_path_check['path'] == $path) {
standard_error('userpathcombinationdupe');
} elseif ($_POST['directory_password'] == '') {
standard_error(array('stringisempty', 'mypassword'));
} elseif ($path == '') {
standard_error('patherror');
Response::redirectTo($filename, [
'page' => $page
]);
} else {
$stmt = Database::prepare("INSERT INTO `" . TABLE_PANEL_HTPASSWDS . "` SET
`customerid` = :customerid,
`username` = :username,
`password` = :password,
`path` = :path,
`authname` = :authname"
);
$params = array(
"customerid" => $userinfo['customerid'],
"username" => $username,
"password" => $password,
"path" => $path,
"authname" => $authname
);
Database::pexecute($stmt, $params);
$log->logAction(USR_ACTION, LOG_INFO, "added htpasswd for '" . $username . " (" . $path . ")'");
inserttask('1');
redirectTo($filename, array('page' => $page, 's' => $s));
}
} else {
$pathSelect = makePathfield($userinfo['documentroot'], $userinfo['guid'], $userinfo['guid']);
$pathSelect = FileDir::makePathfield($userinfo['documentroot'], $userinfo['guid'], $userinfo['guid']);
$htpasswd_add_data = include_once dirname(__FILE__) . '/lib/formfields/customer/extras/formfield.htpasswd_add.php';
$htpasswd_add_form = htmlform::genHTMLForm($htpasswd_add_data);
$title = $htpasswd_add_data['htpasswd_add']['title'];
$image = $htpasswd_add_data['htpasswd_add']['image'];
eval("echo \"" . getTemplate("extras/htpasswds_add") . "\";");
UI::view('user/form.html.twig', [
'formaction' => $linker->getLink(['section' => 'extras']),
'formdata' => $htpasswd_add_data['htpasswd_add']
]);
}
} elseif ($action == 'edit' && $id != 0) {
$result_stmt = Database::prepare("SELECT * FROM `" . TABLE_PANEL_HTPASSWDS . "`
WHERE `customerid`= :customerid
AND `id`= :id"
);
Database::pexecute($result_stmt, array("customerid" => $userinfo['customerid'], "id" => $id));
$result = $result_stmt->fetch(PDO::FETCH_ASSOC);
try {
$json_result = DirProtections::getLocal($userinfo, [
'id' => $id
])->get();
} catch (Exception $e) {
Response::dynamicError($e->getMessage());
}
$result = json_decode($json_result, true)['data'];
if (isset($result['username']) && $result['username'] != '') {
if (isset($_POST['send']) && $_POST['send'] == 'send') {
validate($_POST['directory_password'], 'password');
$authname = validate($_POST['directory_authname'], 'directory_authname', '/^[a-zA-Z0-9][a-zA-Z0-9\-_ ]+\$?$/');
if (CRYPT_STD_DES == 1) {
$saltfordescrypt = substr(md5(uniqid(microtime(), 1)), 4, 2);
$password = crypt($_POST['directory_password'], $saltfordescrypt);
} else {
$password = crypt($_POST['directory_password']);
}
$params = array(
"customerid" => $userinfo['customerid'],
"id" => $id
);
$pwd_sql = '';
if ($_POST['directory_password'] != '') {
$pwd_sql = "`password`= :password ";
$params["password"] = $password;
}
$auth_sql = '';
if ($authname != $result['authname']) {
$auth_sql = "`authname`= :authname ";
$params["authname"] = $authname;
}
if ($pwd_sql != '' || $auth_sql != '') {
if ($pwd_sql !='' && $auth_sql != '') {
$pwd_sql.= ', ';
}
$stmt = Database::prepare("UPDATE `" . TABLE_PANEL_HTPASSWDS . "`
SET ".$pwd_sql.$auth_sql."
WHERE `customerid`= :customerid
AND `id`= :id"
);
Database::pexecute($stmt, $params);
$log->logAction(USR_ACTION, LOG_INFO, "edited htpasswd for '" . $result['username'] . " (" . $result['path'] . ")'");
inserttask('1');
redirectTo($filename, array('page' => $page, 's' => $s));
try {
DirProtections::getLocal($userinfo, $_POST)->update();
} catch (Exception $e) {
Response::dynamicError($e->getMessage());
}
Response::redirectTo($filename, [
'page' => $page
]);
} else {
if (strpos($result['path'], $userinfo['documentroot']) === 0) {
$result['path'] = substr($result['path'], strlen($userinfo['documentroot']));
$result['path'] = str_replace($userinfo['documentroot'], "/", $result['path']);
}
$result = htmlentities_array($result);
$result = PhpHelper::htmlentitiesArray($result);
$htpasswd_edit_data = include_once dirname(__FILE__) . '/lib/formfields/customer/extras/formfield.htpasswd_edit.php';
$htpasswd_edit_form = htmlform::genHTMLForm($htpasswd_edit_data);
$title = $htpasswd_edit_data['htpasswd_edit']['title'];
$image = $htpasswd_edit_data['htpasswd_edit']['image'];
eval("echo \"" . getTemplate("extras/htpasswds_edit") . "\";");
UI::view('user/form.html.twig', [
'formaction' => $linker->getLink(['section' => 'extras', 'id' => $id]),
'formdata' => $htpasswd_edit_data['htpasswd_edit'],
'editid' => $id
]);
}
}
}
} elseif ($page == 'htaccess') {
// redirect if this customer sub-page is hidden via settings
if (Settings::IsInList('panel.customer_hide_options', 'extras.pathoptions')) {
Response::redirectTo('customer_index.php');
}
if ($action == '') {
$log->logAction(USR_ACTION, LOG_NOTICE, "viewed customer_extras::htaccess");
$fields = array(
'path' => $lng['panel']['path'],
'options_indexes' => $lng['extras']['view_directory'],
'error404path' => $lng['extras']['error404path'],
'error403path' => $lng['extras']['error403path'],
'error500path' => $lng['extras']['error500path'],
'options_cgi' => $lng['extras']['execute_perl']
);
$paging = new paging($userinfo, TABLE_PANEL_HTACCESS, $fields);
$result_stmt = Database::prepare("SELECT * FROM `" . TABLE_PANEL_HTACCESS . "`
WHERE `customerid`= :customerid " . $paging->getSqlWhere(true) . " " . $paging->getSqlOrderBy() . " " . $paging->getSqlLimit()
);
Database::pexecute($result_stmt, array("customerid" => $userinfo['customerid']));
$paging->setEntries(Database::num_rows());
$sortcode = $paging->getHtmlSortCode($lng);
$arrowcode = $paging->getHtmlArrowCode($filename . '?page=' . $page . '&s=' . $s);
$searchcode = $paging->getHtmlSearchCode($lng);
$pagingcode = $paging->getHtmlPagingCode($filename . '?page=' . $page . '&s=' . $s);
$i = 0;
$count = 0;
$htaccess = '';
$log->logAction(FroxlorLogger::USR_ACTION, LOG_NOTICE, "viewed customer_extras::htaccess");
$cperlenabled = customerHasPerlEnabled($userinfo['customerid']);
$cperlenabled = Customer::customerHasPerlEnabled($userinfo['customerid']);
while ($row = $result_stmt->fetch(PDO::FETCH_ASSOC)) {
if ($paging->checkDisplay($i)) {
if (strpos($row['path'], $userinfo['documentroot']) === 0) {
$row['path'] = substr($row['path'], strlen($userinfo['documentroot']));
// don't show nothing wehn it's the docroot, show slash
if ($row['path'] == '') { $row['path'] = '/'; }
try {
$htaccess_list_data = include_once dirname(__FILE__) . '/lib/tablelisting/customer/tablelisting.htaccess.php';
$collection = (new Collection(DirOptions::class, $userinfo))
->withPagination($htaccess_list_data['htaccess_list']['columns'], $htaccess_list_data['htaccess_list']['default_sorting']);
} catch (Exception $e) {
Response::dynamicError($e->getMessage());
}
$row['options_indexes'] = str_replace('1', $lng['panel']['yes'], $row['options_indexes']);
$row['options_indexes'] = str_replace('0', $lng['panel']['no'], $row['options_indexes']);
$row['options_cgi'] = str_replace('1', $lng['panel']['yes'], $row['options_cgi']);
$row['options_cgi'] = str_replace('0', $lng['panel']['no'], $row['options_cgi']);
$row = htmlentities_array($row);
eval("\$htaccess.=\"" . getTemplate("extras/htaccess_htaccess") . "\";");
$count++;
}
$i++;
}
eval("echo \"" . getTemplate("extras/htaccess") . "\";");
UI::view('user/table.html.twig', [
'listing' => Listing::format($collection, $htaccess_list_data, 'htaccess_list'),
'actions_links' => [
[
'href' => $linker->getLink(['section' => 'extras', 'page' => 'htaccess', 'action' => 'add']),
'label' => lng('extras.pathoptions_add')
]
],
'entity_info' => lng('extras.description')
]);
} elseif ($action == 'delete' && $id != 0) {
$result_stmt = Database::prepare("SELECT * FROM `" . TABLE_PANEL_HTACCESS . "`
WHERE `customerid` = :customerid
AND `id` = :id"
);
Database::pexecute($result_stmt, array("customerid" => $userinfo['customerid'], "id" => $id));
$result = $result_stmt->fetch(PDO::FETCH_ASSOC);
try {
$json_result = DirOptions::getLocal($userinfo, [
'id' => $id
])->get();
} catch (Exception $e) {
Response::dynamicError($e->getMessage());
}
$result = json_decode($json_result, true)['data'];
if (isset($result['customerid']) && $result['customerid'] != '' && $result['customerid'] == $userinfo['customerid']) {
if (isset($_POST['send']) && $_POST['send'] == 'send') {
$stmt = Database::prepare("DELETE FROM `" . TABLE_PANEL_HTACCESS . "`
WHERE `customerid`= :customerid
AND `id`= :id"
);
Database::pexecute($stmt, array("customerid" => $userinfo['customerid'], "id" => $id));
$log->logAction(USR_ACTION, LOG_INFO, "deleted htaccess for '" . str_replace($userinfo['documentroot'], '', $result['path']) . "'");
inserttask('1');
redirectTo($filename, array('page' => $page, 's' => $s));
try {
DirOptions::getLocal($userinfo, $_POST)->delete();
} catch (Exception $e) {
Response::dynamicError($e->getMessage());
}
Response::redirectTo($filename, [
'page' => $page
]);
} else {
ask_yesno('extras_reallydelete_pathoptions', $filename, array('id' => $id, 'page' => $page, 'action' => $action), str_replace($userinfo['documentroot'], '', $result['path']));
HTML::askYesNo('extras_reallydelete_pathoptions', $filename, [
'id' => $id,
'page' => $page,
'action' => $action
], str_replace($userinfo['documentroot'], '/', $result['path']));
}
}
} elseif ($action == 'add') {
if (isset($_POST['send']) && $_POST['send'] == 'send') {
$path = makeCorrectDir(validate($_POST['path'], 'path'));
$userpath = $path;
$path = makeCorrectDir($userinfo['documentroot'] . '/' . $path);
$path_dupe_check_stmt = Database::prepare("SELECT `id`, `path` FROM `" . TABLE_PANEL_HTACCESS . "`
WHERE `path`= :path
AND `customerid`= :customerid"
);
Database::pexecute($path_dupe_check_stmt, array("path" => $path, "customerid" => $userinfo['customerid']));
$path_dupe_check = $path_dupe_check_stmt->fetch(PDO::FETCH_ASSOC);
if (!$_POST['path']) {
standard_error('invalidpath');
try {
DirOptions::getLocal($userinfo, $_POST)->add();
} catch (Exception $e) {
Response::dynamicError($e->getMessage());
}
if (isset($_POST['options_cgi']) && (int)$_POST['options_cgi'] != 0) {
$options_cgi = '1';
Response::redirectTo($filename, [
'page' => $page
]);
} else {
$options_cgi = '0';
}
$error404path = '';
if (isset($_POST['error404path'])) {
$error404path = correctErrorDocument($_POST['error404path']);
}
$error403path = '';
if (isset($_POST['error403path'])) {
$error403path = correctErrorDocument($_POST['error403path']);
}
$error500path = '';
if (isset($_POST['error500path'])) {
$error500path = correctErrorDocument($_POST['error500path']);
}
if ($path_dupe_check['path'] == $path) {
standard_error('errordocpathdupe', $userpath);
} elseif ($path == '') {
standard_error('patherror');
} else {
$stmt = Database::prepare('INSERT INTO `' . TABLE_PANEL_HTACCESS . '` SET
`customerid` = :customerid,
`path` = :path,
`options_indexes` = :options_indexes,
`error404path` = :error404path,
`error403path` = :error403path,
`error500path` = :error500path,
`options_cgi` = :options_cgi'
);
$params = array(
"customerid" => $userinfo['customerid'],
"path" => $path,
"options_indexes" => $_POST['options_indexes'] == '1' ? '1' : '0',
"error403path" => $error403path,
"error404path" => $error404path,
"error500path" => $error500path,
"options_cgi" => $options_cgi
);
Database::pexecute($stmt, $params);
$log->logAction(USR_ACTION, LOG_INFO, "added htaccess for '" . $path . "'");
inserttask('1');
redirectTo($filename, array('page' => $page, 's' => $s));
}
} else {
$pathSelect = makePathfield($userinfo['documentroot'], $userinfo['guid'], $userinfo['guid']);
$cperlenabled = customerHasPerlEnabled($userinfo['customerid']);
$pathSelect = FileDir::makePathfield($userinfo['documentroot'], $userinfo['guid'], $userinfo['guid']);
$cperlenabled = Customer::customerHasPerlEnabled($userinfo['customerid']);
$htaccess_add_data = include_once dirname(__FILE__) . '/lib/formfields/customer/extras/formfield.htaccess_add.php';
$htaccess_add_form = htmlform::genHTMLForm($htaccess_add_data);
$title = $htaccess_add_data['htaccess_add']['title'];
$image = $htaccess_add_data['htaccess_add']['image'];
eval("echo \"" . getTemplate("extras/htaccess_add") . "\";");
UI::view('user/form.html.twig', [
'formaction' => $linker->getLink(['section' => 'extras']),
'formdata' => $htaccess_add_data['htaccess_add']
]);
}
} elseif (($action == 'edit') && ($id != 0)) {
$result_stmt = Database::prepare("SELECT * FROM `" . TABLE_PANEL_HTACCESS . "`
WHERE `customerid` = :customerid
AND `id` = :id"
);
Database::pexecute($result_stmt, array("customerid" => $userinfo['customerid'], "id" => $id));
$result = $result_stmt->fetch(PDO::FETCH_ASSOC);
try {
$json_result = DirOptions::getLocal($userinfo, [
'id' => $id
])->get();
} catch (Exception $e) {
Response::dynamicError($e->getMessage());
}
$result = json_decode($json_result, true)['data'];
if ((isset($result['customerid'])) && ($result['customerid'] != '') && ($result['customerid'] == $userinfo['customerid'])) {
if (isset($_POST['send']) && $_POST['send'] == 'send') {
$option_indexes = intval($_POST['options_indexes']);
$options_cgi = isset($_POST['options_cgi']) ? intval($_POST['options_cgi']) : 0;
if ($option_indexes != '1') {
$option_indexes = '0';
try {
DirOptions::getLocal($userinfo, $_POST)->update();
} catch (Exception $e) {
Response::dynamicError($e->getMessage());
}
if ($options_cgi != '1') {
$options_cgi = '0';
}
$error404path = correctErrorDocument($_POST['error404path']);
$error403path = correctErrorDocument($_POST['error403path']);
$error500path = correctErrorDocument($_POST['error500path']);
if (($option_indexes != $result['options_indexes'])
|| ($error404path != $result['error404path'])
|| ($error403path != $result['error403path'])
|| ($error500path != $result['error500path'])
|| ($options_cgi != $result['options_cgi'])
) {
inserttask('1');
$stmt = Database::prepare("UPDATE `" . TABLE_PANEL_HTACCESS . "`
SET `options_indexes` = :options_indexes,
`error404path` = :error404path,
`error403path` = :error403path,
`error500path` = :error500path,
`options_cgi` = :options_cgi
WHERE `customerid` = :customerid
AND `id` = :id"
);
$params = array(
"customerid" => $userinfo['customerid'],
"options_indexes" => $_POST['options_indexes'] == '1' ? '1' : '0',
"error403path" => $error403path,
"error404path" => $error404path,
"error500path" => $error500path,
"options_cgi" => $options_cgi,
"id" => $id
);
Database::pexecute($stmt, $params);
$log->logAction(USR_ACTION, LOG_INFO, "edited htaccess for '" . str_replace($userinfo['documentroot'], '', $result['path']) . "'");
}
redirectTo($filename, array('page' => $page, 's' => $s));
Response::redirectTo($filename, [
'page' => $page
]);
} else {
if (strpos($result['path'], $userinfo['documentroot']) === 0) {
$result['path'] = substr($result['path'], strlen($userinfo['documentroot']));
// don't show nothing wehn it's the docroot, show slash
if ($result['path'] == '') { $result['path'] = '/'; }
$result['path'] = str_replace($userinfo['documentroot'], "/", $result['path']);
}
$cperlenabled = Customer::customerHasPerlEnabled($userinfo['customerid']);
$result['error404path'] = $result['error404path'];
$result['error403path'] = $result['error403path'];
$result['error500path'] = $result['error500path'];
$cperlenabled = customerHasPerlEnabled($userinfo['customerid']);
/*
$options_indexes = makeyesno('options_indexes', '1', '0', $result['options_indexes']);
$options_cgi = makeyesno('options_cgi', '1', '0', $result['options_cgi']);
*/
$result = htmlentities_array($result);
$result = PhpHelper::htmlentitiesArray($result);
$htaccess_edit_data = include_once dirname(__FILE__) . '/lib/formfields/customer/extras/formfield.htaccess_edit.php';
$htaccess_edit_form = htmlform::genHTMLForm($htaccess_edit_data);
$title = $htaccess_edit_data['htaccess_edit']['title'];
$image = $htaccess_edit_data['htaccess_edit']['image'];
UI::view('user/form.html.twig', [
'formaction' => $linker->getLink(['section' => 'extras', 'id' => $id]),
'formdata' => $htaccess_edit_data['htaccess_edit'],
'editid' => $id
]);
}
}
}
} elseif ($page == 'backup') {
// redirect if this customer sub-page is hidden via settings
if (Settings::IsInList('panel.customer_hide_options', 'extras.backup')) {
Response::redirectTo('customer_index.php');
}
eval("echo \"" . getTemplate("extras/htaccess_edit") . "\";");
if (Settings::Get('system.backupenabled') == 1) {
if ($action == 'abort') {
if (isset($_POST['send']) && $_POST['send'] == 'send') {
$log->logAction(FroxlorLogger::USR_ACTION, LOG_NOTICE, "customer_extras::backup - aborted scheduled backupjob");
try {
CustomerBackups::getLocal($userinfo, $_POST)->delete();
} catch (Exception $e) {
Response::dynamicError($e->getMessage());
}
Response::redirectTo($filename, [
'page' => $page,
'action' => ''
]);
} else {
HTML::askYesNo('extras_reallydelete_backup', $filename, [
'backup_job_entry' => $id,
'section' => 'extras',
'page' => $page,
'action' => $action
]);
}
} elseif ($action == '') {
$log->logAction(FroxlorLogger::USR_ACTION, LOG_NOTICE, "viewed customer_extras::backup");
// check whether there is a backup-job for this customer
try {
$backup_list_data = include_once dirname(__FILE__) . '/lib/tablelisting/customer/tablelisting.backups.php';
$collection = (new Collection(CustomerBackups::class, $userinfo));
} catch (Exception $e) {
Response::dynamicError($e->getMessage());
}
if (isset($_POST['send']) && $_POST['send'] == 'send') {
try {
CustomerBackups::getLocal($userinfo, $_POST)->add();
} catch (Exception $e) {
Response::dynamicError($e->getMessage());
}
Response::standardSuccess('backupscheduled');
} else {
$pathSelect = FileDir::makePathfield($userinfo['documentroot'], $userinfo['guid'], $userinfo['guid']);
$backup_data = include_once dirname(__FILE__) . '/lib/formfields/customer/extras/formfield.backup.php';
UI::view('user/form-datatable.html.twig', [
'formaction' => $linker->getLink(['section' => 'extras']),
'formdata' => $backup_data['backup'],
'tabledata' => Listing::format($collection, $backup_list_data, 'backup_list'),
]);
}
}
} else {
Response::standardError('backupfunctionnotenabled');
}
}

View File

@@ -2,444 +2,202 @@
/**
* This file is part of the Froxlor project.
* Copyright (c) 2003-2009 the SysCP Team (see authors).
* Copyright (c) 2010 the Froxlor Team (see authors).
*
* For the full copyright and license information, please view the COPYING
* file that was distributed with this source code. You can also view the
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* @copyright (c) the authors
* @author Florian Lippert <flo@syscp.org> (2003-2009)
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Panel
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, you can also view it online at
* https://files.froxlor.org/misc/COPYING.txt
*
* @copyright the authors
* @author Froxlor team <team@froxlor.org>
* @license https://files.froxlor.org/misc/COPYING.txt GPLv2
*/
define('AREA', 'customer');
require './lib/init.php';
const AREA = 'customer';
require __DIR__ . '/lib/init.php';
$id = 0;
if (isset($_POST['id'])) {
$id = intval($_POST['id']);
} elseif (isset($_GET['id'])) {
$id = intval($_GET['id']);
use Froxlor\Api\Commands\Ftps as Ftps;
use Froxlor\Database\Database;
use Froxlor\FileDir;
use Froxlor\FroxlorLogger;
use Froxlor\Settings;
use Froxlor\UI\Collection;
use Froxlor\UI\HTML;
use Froxlor\UI\Listing;
use Froxlor\UI\Panel\UI;
use Froxlor\UI\Request;
use Froxlor\UI\Response;
use Froxlor\CurrentUser;
// redirect if this customer page is hidden via settings
if (Settings::IsInList('panel.customer_hide_options', 'ftp')) {
Response::redirectTo('customer_index.php');
}
if ($page == 'overview') {
$log->logAction(USR_ACTION, LOG_NOTICE, "viewed customer_ftp");
eval("echo \"" . getTemplate('ftp/ftp') . "\";");
} elseif ($page == 'accounts') {
$id = (int)Request::any('id', 0);
if ($page == 'overview' || $page == 'accounts') {
if ($action == '') {
$log->logAction(USR_ACTION, LOG_NOTICE, "viewed customer_ftp::accounts");
$fields = array(
'username' => $lng['login']['username'],
'homedir' => $lng['panel']['path'],
'description' => $lng['panel']['ftpdesc']
);
$paging = new paging($userinfo, TABLE_FTP_USERS, $fields);
$result_stmt = Database::prepare("SELECT `id`, `username`, `description`, `homedir` FROM `" . TABLE_FTP_USERS . "`
WHERE `customerid`= :customerid " . $paging->getSqlWhere(true) . " " . $paging->getSqlOrderBy() . " " . $paging->getSqlLimit()
);
Database::pexecute($result_stmt, array("customerid" => $userinfo['customerid']));
$ftps_count = Database::num_rows();
$paging->setEntries($ftps_count);
$sortcode = $paging->getHtmlSortCode($lng);
$arrowcode = $paging->getHtmlArrowCode($filename . '?page=' . $page . '&s=' . $s);
$searchcode = $paging->getHtmlSearchCode($lng);
$pagingcode = $paging->getHtmlPagingCode($filename . '?page=' . $page . '&s=' . $s);
$i = 0;
$count = 0;
$accounts = '';
while ($row = $result_stmt->fetch(PDO::FETCH_ASSOC)) {
if ($paging->checkDisplay($i)) {
if (strpos($row['homedir'], $userinfo['documentroot']) === 0) {
$row['documentroot'] = substr($row['homedir'], strlen($userinfo['documentroot']));
} else {
$row['documentroot'] = $row['homedir'];
$log->logAction(FroxlorLogger::USR_ACTION, LOG_NOTICE, "viewed customer_ftp::accounts");
try {
$ftp_list_data = include_once dirname(__FILE__) . '/lib/tablelisting/customer/tablelisting.ftps.php';
$collection = (new Collection(Ftps::class, $userinfo))
->withPagination($ftp_list_data['ftp_list']['columns'], $ftp_list_data['ftp_list']['default_sorting']);
} catch (Exception $e) {
Response::dynamicError($e->getMessage());
}
$row['documentroot'] = makeCorrectDir($row['documentroot']);
$row = htmlentities_array($row);
eval("\$accounts.=\"" . getTemplate('ftp/accounts_account') . "\";");
$count++;
$actions_links = false;
if (CurrentUser::canAddResource('ftps')) {
$actions_links = [
[
'href' => $linker->getLink(['section' => 'ftp', 'page' => 'accounts', 'action' => 'add']),
'label' => lng('ftp.account_add')
]
];
}
$i++;
}
eval("echo \"" . getTemplate('ftp/accounts') . "\";");
UI::view('user/table.html.twig', [
'listing' => Listing::format($collection, $ftp_list_data, 'ftp_list'),
'actions_links' => $actions_links,
'entity_info' => lng('ftp.description')
]);
} elseif ($action == 'delete' && $id != 0) {
$result_stmt = Database::prepare("SELECT `id`, `username`, `homedir`, `up_count`, `up_bytes`, `down_count`, `down_bytes` FROM `" . TABLE_FTP_USERS . "`
WHERE `customerid` = :customerid
AND `id` = :id"
);
Database::pexecute($result_stmt, array("customerid" => $userinfo['customerid'], "id" => $id));
$result = $result_stmt->fetch(PDO::FETCH_ASSOC);
try {
$json_result = Ftps::getLocal($userinfo, [
'id' => $id
])->get();
} catch (Exception $e) {
Response::dynamicError($e->getMessage());
}
$result = json_decode($json_result, true)['data'];
if (isset($result['username']) && $result['username'] != $userinfo['loginname']) {
if (isset($_POST['send']) && $_POST['send'] == 'send') {
$stmt = Database::prepare("UPDATE `" . TABLE_FTP_USERS . "`
SET `up_count` = `up_count` + :up_count,
`up_bytes` = `up_bytes` + :up_bytes,
`down_count` = `down_count` + :down_count,
`down_bytes` = `down_bytes` + :down_bytes
WHERE `username` = :username"
);
$params = array(
"up_count" => $result['up_count'],
"up_bytes" => $result['up_bytes'],
"down_count" => $result['down_count'],
"down_bytes" => $result['down_bytes'],
"username" => $userinfo['loginname']
);
Database::pexecute($stmt, $params);
$result_stmt = Database::prepare("SELECT `username`, `homedir` FROM `" . TABLE_FTP_USERS . "`
WHERE `customerid` = :customerid
AND `id` = :id"
);
Database::pexecute($result_stmt, array("customerid" => $userinfo['customerid'], "id" => $id));
$result = $result_stmt->fetch(PDO::FETCH_ASSOC);
$stmt = Database::prepare("DELETE FROM `" . TABLE_FTP_QUOTATALLIES . "` WHERE `name` = :name");
Database::pexecute($stmt, array("name" => $result['username']));
$stmt = Database::prepare("DELETE FROM `" . TABLE_FTP_USERS . "`
WHERE `customerid` = :customerid
AND `id` = :id"
);
Database::pexecute($stmt, array("customerid" => $userinfo['customerid'], "id" => $id));
$stmt = Database::prepare("
UPDATE `" . TABLE_FTP_GROUPS . "` SET
`members` = REPLACE(`members`, :username,'')
WHERE `customerid` = :customerid
");
Database::pexecute($stmt, array("username" => ",".$result['username'], "customerid" => $userinfo['customerid']));
$log->logAction(USR_ACTION, LOG_INFO, "deleted ftp-account '" . $result['username'] . "'");
$resetaccnumber = ($userinfo['ftps_used'] == '1') ? " , `ftp_lastaccountnumber`='0'" : '';
// refs #293
if (isset($_POST['delete_userfiles']) && (int)$_POST['delete_userfiles'] == 1) {
inserttask('8', $userinfo['loginname'], $result['homedir']);
try {
Ftps::getLocal($userinfo, $_POST)->delete();
} catch (Exception $e) {
Response::dynamicError($e->getMessage());
}
$stmt = Database::prepare("UPDATE `" . TABLE_PANEL_CUSTOMERS . "`
SET `ftps_used` = `ftps_used` - 1 $resetaccnumber
WHERE `customerid` = :customerid"
);
Database::pexecute($stmt, array("customerid" => $userinfo['customerid']));
redirectTo($filename, array('page' => $page, 's' => $s));
Response::redirectTo($filename, [
'page' => $page
]);
} else {
ask_yesno_withcheckbox('ftp_reallydelete', 'admin_customer_alsoremoveftphomedir', $filename, array('id' => $id, 'page' => $page, 'action' => $action), $result['username']);
HTML::askYesNoWithCheckbox('ftp_reallydelete', 'admin_customer_alsoremoveftphomedir', $filename, [
'id' => $id,
'page' => $page,
'action' => $action
], $result['username']);
}
} else {
standard_error('ftp_cantdeletemainaccount');
Response::standardError('ftp_cantdeletemainaccount');
}
} elseif ($action == 'add') {
if ($userinfo['ftps_used'] < $userinfo['ftps'] || $userinfo['ftps'] == '-1') {
if (isset($_POST['send'])
&& $_POST['send'] == 'send') {
$description = validate($_POST['ftp_description'], 'description');
// @FIXME use a good path-validating regex here (refs #1231)
$path = validate($_POST['path'], 'path');
$password = validate($_POST['ftp_password'], 'password');
$password = validatePassword($password);
$sendinfomail = isset($_POST['sendinfomail']) ? 1 : 0;
if ($sendinfomail != 1) {
$sendinfomail = 0;
}
if (Settings::Get('customer.ftpatdomain') == '1') {
$ftpusername = validate($_POST['ftp_username'], 'username', '/^[a-zA-Z0-9][a-zA-Z0-9\-_]+\$?$/');
if ($ftpusername == '') {
standard_error(array('stringisempty', 'username'));
}
$ftpdomain = $idna_convert->encode(validate($_POST['ftp_domain'], 'domain'));
$ftpdomain_check_stmt = Database::prepare("SELECT `id`, `domain`, `customerid` FROM `" . TABLE_PANEL_DOMAINS . "`
WHERE `domain` = :domain
AND `customerid` = :customerid"
);
Database::pexecute($ftpdomain_check_stmt, array("domain" => $ftpdomain, "customerid" => $userinfo['customerid']));
$ftpdomain_check = $ftpdomain_check_stmt->fetch(PDO::FETCH_ASSOC);
if ($ftpdomain_check['domain'] != $ftpdomain) {
standard_error('maindomainnonexist', $domain);
}
$username = $ftpusername . "@" . $ftpdomain;
} else {
$username = $userinfo['loginname'] . Settings::Get('customer.ftpprefix') . (intval($userinfo['ftp_lastaccountnumber']) + 1);
}
$username_check_stmt = Database::prepare("SELECT * FROM `" . TABLE_FTP_USERS . "`
WHERE `username` = :username"
);
Database::pexecute($username_check_stmt, array("username" => $username));
$username_check = $username_check_stmt->fetch(PDO::FETCH_ASSOC);
if (!empty($username_check) && $username_check['username'] = $username) {
standard_error('usernamealreadyexists', $username);
} elseif ($password == '') {
standard_error(array('stringisempty', 'mypassword'));
} elseif ($path == '') {
standard_error('patherror');
} else {
$path = makeCorrectDir($userinfo['documentroot'] . '/' . $path);
$cryptPassword = makeCryptPassword($password);
$stmt = Database::prepare("INSERT INTO `" . TABLE_FTP_USERS . "`
(`customerid`, `username`, `description`, `password`, `homedir`, `login_enabled`, `uid`, `gid`)
VALUES (:customerid, :username, :description, :password, :homedir, 'y', :guid, :guid)"
);
$params = array(
"customerid" => $userinfo['customerid'],
"username" => $username,
"description" => $description,
"password" => $cryptPassword,
"homedir" => $path,
"guid" => $userinfo['guid']
);
Database::pexecute($stmt, $params);
$result_stmt = Database::prepare("SELECT `bytes_in_used` FROM `" . TABLE_FTP_QUOTATALLIES . "`
WHERE `name` = :name"
);
Database::pexecute($result_stmt, array("name" => $userinfo['loginname']));
while ($row = $result_stmt->fetch(PDO::FETCH_ASSOC)) {
$stmt = Database::prepare("INSERT INTO `" . TABLE_FTP_QUOTATALLIES . "`
(`name`, `quota_type`, `bytes_in_used`, `bytes_out_used`, `bytes_xfer_used`, `files_in_used`, `files_out_used`, `files_xfer_used`)
VALUES (:name, 'user', :bytes_in_used, '0', '0', '0', '0', '0')"
);
Database::pexecute($stmt, array("name" => $username, "bytes_in_used" => $row['bytes_in_used']));
}
$stmt = Database::prepare("UPDATE `" . TABLE_FTP_GROUPS . "`
SET `members` = CONCAT_WS(',',`members`, :username)
WHERE `customerid`= :customerid
AND `gid`= :guid"
);
$params = array(
"username" => $username,
"customerid" => $userinfo['customerid'],
"guid" => $userinfo['guid']
);
Database::pexecute($stmt, $params);
$stmt = Database::prepare("UPDATE `" . TABLE_PANEL_CUSTOMERS . "`
SET `ftps_used` = `ftps_used` + 1,
`ftp_lastaccountnumber` = `ftp_lastaccountnumber` + 1
WHERE `customerid` = :customerid"
);
Database::pexecute($stmt, array("customerid" => $userinfo['customerid']));
$log->logAction(USR_ACTION, LOG_INFO, "added ftp-account '" . $username . " (" . $path . ")'");
inserttask(5);
if ($sendinfomail == 1) {
$replace_arr = array(
'SALUTATION' => getCorrectUserSalutation($userinfo),
'CUST_NAME' => getCorrectUserSalutation($userinfo), // < keep this for compatibility
'USR_NAME' => $username,
'USR_PASS' => $password,
'USR_PATH' => makeCorrectDir(substr($path, strlen($userinfo['documentroot'])))
);
$def_language = $userinfo['def_language'];
$result_stmt = Database::prepare("SELECT `value` FROM `" . TABLE_PANEL_TEMPLATES . "`
WHERE `adminid` = :adminid
AND `language` = :lang
AND `templategroup`='mails'
AND `varname`='new_ftpaccount_by_customer_subject'"
);
Database::pexecute($result_stmt, array("adminid" => $userinfo['adminid'], "lang" => $def_language));
$result = $result_stmt->fetch(PDO::FETCH_ASSOC);
$mail_subject = html_entity_decode(replace_variables((($result['value'] != '') ? $result['value'] : $lng['customer']['ftp_add']['infomail_subject']), $replace_arr));
$def_language = $userinfo['def_language'];
$result_stmt = Database::prepare("SELECT `value` FROM `" . TABLE_PANEL_TEMPLATES . "`
WHERE `adminid` = :adminid
AND `language` = :lang
AND `templategroup`='mails'
AND `varname`='new_ftpaccount_by_customer_mailbody'"
);
Database::pexecute($result_stmt, array("adminid" => $userinfo['adminid'], "lang" => $def_language));
$result = $result_stmt->fetch(PDO::FETCH_ASSOC);
$mail_body = html_entity_decode(replace_variables((($result['value'] != '') ? $result['value'] : $lng['customer']['ftp_add']['infomail_body']['main']), $replace_arr));
$_mailerror = false;
if (isset($_POST['send']) && $_POST['send'] == 'send') {
try {
$mail->Subject = $mail_subject;
$mail->AltBody = $mail_body;
$mail->MsgHTML(str_replace("\n", "<br />", $mail_body));
$mail->AddAddress($userinfo['email'], getCorrectUserSalutation($userinfo));
$mail->Send();
} catch(phpmailerException $e) {
$mailerr_msg = $e->errorMessage();
$_mailerror = true;
Ftps::getLocal($userinfo, $_POST)->add();
} catch (Exception $e) {
$mailerr_msg = $e->getMessage();
$_mailerror = true;
}
if ($_mailerror) {
$log->logAction(USR_ACTION, LOG_ERR, "Error sending mail: " . $mailerr_msg);
standard_error('errorsendingmail', $userinfo['email']);
}
$mail->ClearAddresses();
}
redirectTo($filename, array('page' => $page, 's' => $s));
Response::dynamicError($e->getMessage());
}
Response::redirectTo($filename, [
'page' => $page
]);
} else {
$pathSelect = makePathfield($userinfo['documentroot'], $userinfo['guid'], $userinfo['guid'], '/');
$pathSelect = FileDir::makePathfield($userinfo['documentroot'], $userinfo['guid'], $userinfo['guid'], '/');
if (Settings::Get('customer.ftpatdomain') == '1') {
$domainlist = array();
$domains = '';
$domainlist = [];
$result_domains_stmt = Database::prepare("SELECT `domain` FROM `" . TABLE_PANEL_DOMAINS . "`
WHERE `customerid`= :customerid"
);
Database::pexecute($result_domains_stmt, array("customerid" => $userinfo['customerid']));
WHERE `customerid`= :customerid ORDER BY `domain` ASC");
Database::pexecute($result_domains_stmt, [
"customerid" => $userinfo['customerid']
]);
while ($row_domain = $result_domains_stmt->fetch(PDO::FETCH_ASSOC)) {
$domainlist[] = $row_domain['domain'];
}
sort($domainlist);
if (isset($domainlist[0]) && $domainlist[0] != '') {
foreach ($domainlist as $dom) {
$domains .= makeoption($idna_convert->decode($dom), $dom);
}
$domainlist[$row_domain['domain']] = $idna_convert->decode($row_domain['domain']);
}
}
//$sendinfomail = makeyesno('sendinfomail', '1', '0', '0');
if (Settings::Get('system.allow_customer_shell') == '1') {
$shells['/bin/false'] = "/bin/false";
$shells_avail = Settings::Get('system.available_shells');
if (!empty($shells_avail)) {
$shells_avail_arr = explode(",", $shells_avail);
$shells_avail_arr = array_map("trim", $shells_avail_arr);
foreach ($shells_avail_arr as $shell) {
$shells[$shell] = $shell;
}
}
}
$ftp_add_data = include_once dirname(__FILE__) . '/lib/formfields/customer/ftp/formfield.ftp_add.php';
$ftp_add_form = htmlform::genHTMLForm($ftp_add_data);
$title = $ftp_add_data['ftp_add']['title'];
$image = $ftp_add_data['ftp_add']['image'];
eval("echo \"" . getTemplate('ftp/accounts_add') . "\";");
UI::view('user/form.html.twig', [
'formaction' => $linker->getLink(['section' => 'ftp']),
'formdata' => $ftp_add_data['ftp_add']
]);
}
}
} elseif ($action == 'edit' && $id != 0) {
$result_stmt = Database::prepare("SELECT `id`, `username`, `description`, `homedir`, `uid`, `gid` FROM `" . TABLE_FTP_USERS . "`
WHERE `customerid` = :customerid
AND `id` = :id"
);
Database::pexecute($result_stmt, array("customerid" => $userinfo['customerid'], "id" => $id));
$result = $result_stmt->fetch(PDO::FETCH_ASSOC);
try {
$json_result = Ftps::getLocal($userinfo, [
'id' => $id
])->get();
} catch (Exception $e) {
Response::dynamicError($e->getMessage());
}
$result = json_decode($json_result, true)['data'];
if (isset($result['username']) && $result['username'] != '') {
if (isset($_POST['send']) && $_POST['send'] == 'send') {
// @FIXME use a good path-validating regex here (refs #1231)
$path = validate($_POST['path'], 'path');
$_setnewpass = false;
if (isset($_POST['ftp_password']) && $_POST['ftp_password'] != '') {
$password = validate($_POST['ftp_password'], 'password');
$password = validatePassword($password);
$_setnewpass = true;
try {
Ftps::getLocal($userinfo, $_POST)->update();
} catch (Exception $e) {
Response::dynamicError($e->getMessage());
}
if ($_setnewpass) {
if ($password == '') {
standard_error(array('stringisempty', 'mypassword'));
exit;
}
$log->logAction(USR_ACTION, LOG_INFO, "updated ftp-account password for '" . $result['username'] . "'");
$cryptPassword = makeCryptPassword($password);
$stmt = Database::prepare("UPDATE `" . TABLE_FTP_USERS . "`
SET `password` = :password
WHERE `customerid` = :customerid
AND `id` = :id"
);
Database::pexecute($stmt, array("customerid" => $userinfo['customerid'], "id" => $id, "password" => $cryptPassword));
}
if ($path != '') {
$path = makeCorrectDir($userinfo['documentroot'] . '/' . $path);
if ($path != $result['homedir']) {
if (!file_exists($path)) {
// it's the task for "new ftp" but that will
// create all directories and correct their permissions
inserttask(5);
}
$log->logAction(USR_ACTION, LOG_INFO, "updated ftp-account homdir for '" . $result['username'] . "'");
$stmt = Database::prepare("UPDATE `" . TABLE_FTP_USERS . "`
SET `homedir` = :homedir
WHERE `customerid` = :customerid
AND `id` = :id"
);
$params = array(
"homedir" => $path,
"customerid" => $userinfo['customerid'],
"id" => $id
);
Database::pexecute($stmt, $params);
}
}
$log->logAction(USR_ACTION, LOG_INFO, "edited ftp-account '" . $result['username'] . "'");
$description = validate($_POST['ftp_description'], 'description');
$stmt = Database::prepare("UPDATE `" . TABLE_FTP_USERS . "`
SET `description` = :desc
WHERE `customerid` = :customerid
AND `id` = :id"
);
Database::pexecute($stmt, array("desc" => $description, "customerid" => $userinfo['customerid'], "id" => $id));
redirectTo($filename, array('page' => $page, 's' => $s));
Response::redirectTo($filename, [
'page' => $page
]);
} else {
if (strpos($result['homedir'], $userinfo['documentroot']) === 0) {
$homedir = substr($result['homedir'], strlen($userinfo['documentroot']));
$homedir = str_replace($userinfo['documentroot'], "/", $result['homedir']);
} else {
$homedir = $result['homedir'];
}
$homedir = makeCorrectDir($homedir);
$homedir = FileDir::makeCorrectDir($homedir);
$pathSelect = makePathfield($userinfo['documentroot'], $userinfo['guid'], $userinfo['guid'], $homedir);
$pathSelect = FileDir::makePathfield($userinfo['documentroot'], $userinfo['guid'], $userinfo['guid'], $homedir);
if (Settings::Get('customer.ftpatdomain') == '1') {
$domains = '';
$result_domains_stmt = Database::prepare("SELECT `domain` FROM `" . TABLE_PANEL_DOMAINS . "`
WHERE `customerid` = :customerid"
);
Database::pexecute($result_domains_stmt, array("customerid" => $userinfo['customerid']));
while ($row_domain = $result_domains_stmt->fetch(PDO::FETCH_ASSOC)) {
$domains .= makeoption($idna_convert->decode($row_domain['domain']), $row_domain['domain']);
if (Settings::Get('system.allow_customer_shell') == '1') {
$shells['/bin/false'] = "/bin/false";
$shells_avail = Settings::Get('system.available_shells');
if (!empty($shells_avail)) {
$shells_avail_arr = explode(",", $shells_avail);
$shells_avail_arr = array_map("trim", $shells_avail_arr);
foreach ($shells_avail_arr as $shell) {
$shells[$shell] = $shell;
}
}
}
$ftp_edit_data = include_once dirname(__FILE__) . '/lib/formfields/customer/ftp/formfield.ftp_edit.php';
$ftp_edit_form = htmlform::genHTMLForm($ftp_edit_data);
$title = $ftp_edit_data['ftp_edit']['title'];
$image = $ftp_edit_data['ftp_edit']['image'];
eval("echo \"" . getTemplate('ftp/accounts_edit') . "\";");
UI::view('user/form.html.twig', [
'formaction' => $linker->getLink(['section' => 'ftp', 'id' => $id]),
'formdata' => $ftp_edit_data['ftp_edit'],
'editid' => $id
]);
}
}
}

View File

@@ -2,66 +2,87 @@
/**
* This file is part of the Froxlor project.
* Copyright (c) 2003-2009 the SysCP Team (see authors).
* Copyright (c) 2010 the Froxlor Team (see authors).
*
* For the full copyright and license information, please view the COPYING
* file that was distributed with this source code. You can also view the
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* @copyright (c) the authors
* @author Florian Lippert <flo@syscp.org> (2003-2009)
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Panel
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, you can also view it online at
* https://files.froxlor.org/misc/COPYING.txt
*
* @copyright the authors
* @author Froxlor team <team@froxlor.org>
* @license https://files.froxlor.org/misc/COPYING.txt GPLv2
*/
define('AREA', 'customer');
require './lib/init.php';
const AREA = 'customer';
require __DIR__ . '/lib/init.php';
use Froxlor\Api\Commands\Customers as Customers;
use Froxlor\CurrentUser;
use Froxlor\Database\Database;
use Froxlor\Froxlor;
use Froxlor\FroxlorLogger;
use Froxlor\Settings;
use Froxlor\System\Crypt;
use Froxlor\UI\Panel\UI;
use Froxlor\UI\Response;
use Froxlor\Validate\Validate;
use Froxlor\Language;
use Froxlor\System\Cronjob;
use Froxlor\Cron\TaskId;
if ($action == 'logout') {
$log->logAction(USR_ACTION, LOG_NOTICE, 'logged out');
$log->logAction(FroxlorLogger::USR_ACTION, LOG_NOTICE, 'logged out');
$params = array("customerid" => $userinfo['customerid']);
if (Settings::Get('session.allow_multiple_login') == '1') {
$stmt = Database::prepare("DELETE FROM `" . TABLE_PANEL_SESSIONS . "`
WHERE `userid` = :customerid
AND `adminsession` = '0'
AND `hash` = :hash"
);
$params["hash"] = $s;
} else {
$stmt = Database::prepare("DELETE FROM `" . TABLE_PANEL_SESSIONS . "`
WHERE `userid` = :customerid
AND `adminsession` = '0'"
);
unset($_SESSION['userinfo']);
CurrentUser::setData();
session_destroy();
Response::redirectTo('index.php');
} elseif ($action == 'suback') {
if (is_array(CurrentUser::getField('switched_user'))) {
$result = CurrentUser::getData();
$result = $result['switched_user'];
session_regenerate_id(true);
CurrentUser::setData($result);
$target = (isset($_GET['target']) ? $_GET['target'] : 'index');
$redirect = "admin_" . $target . ".php";
if (!file_exists(Froxlor::getInstallDir() . "/" . $redirect)) {
$redirect = "admin_index.php";
}
Response::redirectTo($redirect, null, true);
} else {
Response::dynamicError("Cannot change back - You've never switched to another user :-)");
}
Database::pexecute($stmt, $params);
redirectTo('index.php');
exit;
}
if ($page == 'overview') {
$log->logAction(USR_ACTION, LOG_NOTICE, "viewed customer_index");
$log->logAction(FroxlorLogger::USR_ACTION, LOG_NOTICE, "viewed customer_index");
$domain_stmt = Database::prepare("SELECT `domain` FROM `" . TABLE_PANEL_DOMAINS . "`
WHERE `customerid` = :customerid
AND `parentdomainid` = '0'
AND `id` <> :standardsubdomain
");
Database::pexecute($domain_stmt, array("customerid" => $userinfo['customerid'], "standardsubdomain" => $userinfo['standardsubdomain']));
$domains = '';
$domainArray = array();
Database::pexecute($domain_stmt, [
"customerid" => $userinfo['customerid'],
"standardsubdomain" => $userinfo['standardsubdomain']
]);
$domainArray = [];
while ($row = $domain_stmt->fetch(PDO::FETCH_ASSOC)) {
$domainArray[] = $idna_convert->decode($row['domain']);
}
natsort($domainArray);
$domains = implode(',<br />', $domainArray);
// standard-subdomain
$stdsubdomain = '';
@@ -71,7 +92,10 @@ if ($page == 'overview') {
WHERE `customerid` = :customerid
AND `id` = :standardsubdomain
");
$std_domain = Database::pexecute_first($std_domain_stmt, array("customerid" => $userinfo['customerid'], "standardsubdomain" => $userinfo['standardsubdomain']));
$std_domain = Database::pexecute_first($std_domain_stmt, [
"customerid" => $userinfo['customerid'],
"standardsubdomain" => $userinfo['standardsubdomain']
]);
$stdsubdomain = $std_domain['domain'];
}
@@ -79,237 +103,175 @@ if ($page == 'overview') {
$yesterday = time() - (60 * 60 * 24);
$month = date('M Y', $yesterday);
$userinfo['diskspace'] = round($userinfo['diskspace'] / 1024, Settings::Get('panel.decimal_places'));
$userinfo['diskspace_used'] = round($userinfo['diskspace_used'] / 1024, Settings::Get('panel.decimal_places'));
$userinfo['traffic'] = round($userinfo['traffic'] / (1024 * 1024), Settings::Get('panel.decimal_places'));
$userinfo['traffic_used'] = round($userinfo['traffic_used'] / (1024 * 1024), Settings::Get('panel.decimal_places'));
$userinfo = str_replace_array('-1', $lng['customer']['unlimited'], $userinfo, 'diskspace traffic mysqls emails email_accounts email_forwarders email_quota ftps tickets subdomains');
// get disk-space usages for web, mysql and mail
$usages_stmt = Database::prepare("SELECT * FROM `" . TABLE_PANEL_DISKSPACE . "` WHERE `customerid` = :cid ORDER BY `stamp` DESC LIMIT 1");
$usages = Database::pexecute_first($usages_stmt, [
'cid' => $userinfo['customerid']
]);
$services_enabled = "";
$se = array();
if ($userinfo['imap'] == '1') $se[] = "IMAP";
if ($userinfo['pop3'] == '1') $se[] = "POP3";
if ($userinfo['phpenabled'] == '1') $se[] = "PHP";
if ($userinfo['perlenabled'] == '1') $se[] = "Perl/CGI";
$services_enabled = implode(", ", $se);
// get everything in bytes for the percentage calculation on the dashboard
$userinfo['diskspace_bytes'] = ($userinfo['diskspace'] > -1) ? $userinfo['diskspace'] * 1024 : -1;
$userinfo['traffic_bytes'] = ($userinfo['traffic'] > -1) ? $userinfo['traffic'] * 1024 : -1;
$userinfo['traffic_bytes_used'] = $userinfo['traffic_used'] * 1024;
eval("echo \"" . getTemplate('index/index') . "\";");
} elseif ($page == 'change_password') {
if (isset($_POST['send']) && $_POST['send'] == 'send') {
$old_password = validate($_POST['old_password'], 'old password');
if (md5($old_password) != $userinfo['password']) {
standard_error('oldpasswordnotcorrect');
exit;
if ($usages) {
$userinfo['diskspace_bytes_used'] = $usages['webspace'] * 1024;
$userinfo['mailspace_used'] = $usages['mail'] * 1024;
$userinfo['dbspace_used'] = $usages['mysql'] * 1024;
$userinfo['total_bytes_used'] = ($usages['webspace'] + $usages['mail'] + $usages['mysql']) * 1024;
} else {
$userinfo['diskspace_bytes_used'] = 0;
$userinfo['total_bytes_used'] = 0;
$userinfo['mailspace_used'] = 0;
$userinfo['dbspace_used'] = 0;
}
$new_password = validatePassword($_POST['new_password'], 'new password');
$new_password_confirm = validatePassword($_POST['new_password_confirm'], 'new password confirm');
UI::twig()->addGlobal('userinfo', $userinfo);
UI::view('user/index.html.twig', [
'domains' => $domainArray,
'stdsubdomain' => $stdsubdomain
]);
} elseif ($page == 'change_password') {
if (isset($_POST['send']) && $_POST['send'] == 'send') {
$old_password = Validate::validate($_POST['old_password'], 'old password');
if (!Crypt::validatePasswordLogin($userinfo, $old_password, TABLE_PANEL_CUSTOMERS, 'customerid')) {
Response::standardError('oldpasswordnotcorrect');
}
try {
$new_password = Crypt::validatePassword($_POST['new_password'], 'new password');
$new_password_confirm = Crypt::validatePassword($_POST['new_password_confirm'], 'new password confirm');
} catch (Exception $e) {
Response::dynamicError($e->getMessage());
}
if ($old_password == '') {
standard_error(array('stringisempty', 'oldpassword'));
Response::standardError([
'stringisempty',
'changepassword.old_password'
]);
} elseif ($new_password == '') {
standard_error(array('stringisempty', 'newpassword'));
Response::standardError([
'stringisempty',
'changepassword.new_password'
]);
} elseif ($new_password_confirm == '') {
standard_error(array('stringisempty', 'newpasswordconfirm'));
Response::standardError([
'stringisempty',
'changepassword.new_password_confirm'
]);
} elseif ($new_password != $new_password_confirm) {
standard_error('newpasswordconfirmerror');
Response::standardError('newpasswordconfirmerror');
} else {
// Update user password
$stmt = Database::prepare("UPDATE `" . TABLE_PANEL_CUSTOMERS . "`
SET `password` = :newpassword
WHERE `customerid` = :customerid
AND `password` = :oldpassword"
);
$params = array(
"newpassword" => md5($new_password),
"customerid" => $userinfo['customerid'],
"oldpassword" => md5($old_password)
);
Database::pexecute($stmt, $params);
$log->logAction(USR_ACTION, LOG_NOTICE, 'changed password');
try {
Customers::getLocal($userinfo, [
'id' => $userinfo['customerid'],
'new_customer_password' => $new_password
])->update();
} catch (Exception $e) {
Response::dynamicError($e->getMessage());
}
$log->logAction(FroxlorLogger::USR_ACTION, LOG_NOTICE, 'changed password');
// Update ftp password
if (isset($_POST['change_main_ftp']) && $_POST['change_main_ftp'] == 'true') {
$cryptPassword = makeCryptPassword($new_password);
$cryptPassword = Crypt::makeCryptPassword($new_password);
$stmt = Database::prepare("UPDATE `" . TABLE_FTP_USERS . "`
SET `password` = :password
WHERE `customerid` = :customerid
AND `username` = :username"
);
$params = array(
AND `username` = :username");
$params = [
"password" => $cryptPassword,
"customerid" => $userinfo['customerid'],
"username" => $userinfo['loginname']
);
];
Database::pexecute($stmt, $params);
$log->logAction(USR_ACTION, LOG_NOTICE, 'changed main ftp password');
$log->logAction(FroxlorLogger::USR_ACTION, LOG_NOTICE, 'changed main ftp password');
}
// Update webalizer password
if (isset($_POST['change_webalizer']) && $_POST['change_webalizer'] == 'true') {
if (CRYPT_STD_DES == 1) {
$saltfordescrypt = substr(md5(uniqid(microtime(), 1)), 4, 2);
$new_webalizer_password = crypt($new_password, $saltfordescrypt);
} else {
$new_webalizer_password = crypt($new_password);
}
// Update statistics password
if (isset($_POST['change_stats']) && $_POST['change_stats'] == 'true') {
$new_stats_password = Crypt::makeCryptPassword($new_password, true);
$stmt = Database::prepare("UPDATE `" . TABLE_PANEL_HTPASSWDS . "`
SET `password` = :password
WHERE `customerid` = :customerid
AND `username` = :username"
);
$params = array(
"password" => $new_webalizer_password,
AND `username` = :username");
$params = [
"password" => $new_stats_password,
"customerid" => $userinfo['customerid'],
"username" => $userinfo['loginname']
);
];
Database::pexecute($stmt, $params);
Cronjob::inserttask(TaskId::REBUILD_VHOST);
}
redirectTo($filename, array('s' => $s));
Response::redirectTo($filename);
}
} else {
eval("echo \"" . getTemplate('index/change_password') . "\";");
UI::view('user/change_password.html.twig');
}
} elseif ($page == 'change_language') {
$languages = Language::getLanguages();
if (isset($_POST['send']) && $_POST['send'] == 'send') {
$def_language = validate($_POST['def_language'], 'default language');
$def_language = Validate::validate($_POST['def_language'], 'default language');
if (isset($languages[$def_language])) {
$stmt = Database::prepare("UPDATE `" . TABLE_PANEL_CUSTOMERS . "`
SET `def_language` = :lang
WHERE `customerid` = :customerid"
);
Database::pexecute($stmt, array("lang" => $def_language, "customerid" => $userinfo['customerid']));
$stmt = Database::prepare("UPDATE `" . TABLE_PANEL_SESSIONS . "`
SET `language` = :lang
WHERE `hash` = :hash"
);
Database::pexecute($stmt, array("lang" => $def_language, "hash" => $s));
$log->logAction(USR_ACTION, LOG_NOTICE, "changed default language to '" . $def_language . "'");
try {
Customers::getLocal($userinfo, [
'id' => $userinfo['customerid'],
'def_language' => $def_language
])->update();
CurrentUser::setField('language', $def_language);
} catch (Exception $e) {
Response::dynamicError($e->getMessage());
}
redirectTo($filename, array('s' => $s));
}
$log->logAction(FroxlorLogger::USR_ACTION, LOG_NOTICE, "changed default language to '" . $def_language . "'");
Response::redirectTo($filename);
} else {
$default_lang = Settings::Get('panel.standardlanguage');
if ($userinfo['def_language'] != '') {
$default_lang = $userinfo['def_language'];
}
$language_options = '';
while (list($language_file, $language_name) = each($languages)) {
$language_options .= makeoption($language_name, $language_file, $default_lang, true);
}
eval("echo \"" . getTemplate('index/change_language') . "\";");
UI::view('user/change_language.html.twig', [
'languages' => $languages,
'default_lang' => $default_lang
]);
}
} elseif ($page == 'change_theme') {
if (isset($_POST['send']) && $_POST['send'] == 'send') {
$theme = validate($_POST['theme'], 'theme');
$theme = Validate::validate($_POST['theme'], 'theme');
try {
Customers::getLocal($userinfo, [
'id' => $userinfo['customerid'],
'theme' => $theme
])->update();
} catch (Exception $e) {
Response::dynamicError($e->getMessage());
}
$stmt = Database::prepare("UPDATE `" . TABLE_PANEL_CUSTOMERS . "`
SET `theme` = :theme
WHERE `customerid` = :customerid"
);
Database::pexecute($stmt, array("theme" => $theme, "customerid" => $userinfo['customerid']));
$stmt = Database::prepare("UPDATE `" . TABLE_PANEL_SESSIONS . "`
SET `theme` = :theme
WHERE `hash` = :hash"
);
Database::pexecute($stmt, array("theme" => $theme, "hash" => $s));
$log->logAction(USR_ACTION, LOG_NOTICE, "changed default theme to '" . $theme . "'");
redirectTo($filename, array('s' => $s));
$log->logAction(FroxlorLogger::USR_ACTION, LOG_NOTICE, "changed default theme to '" . $theme . "'");
Response::redirectTo($filename);
} else {
$default_theme = Settings::Get('panel.default_theme');
if ($userinfo['theme'] != '') {
$default_theme = $userinfo['theme'];
}
$theme_options = '';
$themes_avail = getThemes();
foreach ($themes_avail as $t => $d) {
$theme_options.= makeoption($d, $t, $default_theme, true);
}
$themes_avail = UI::getThemes();
eval("echo \"" . getTemplate('index/change_theme') . "\";");
UI::view('user/change_theme.html.twig', [
'themes' => $themes_avail,
'default_theme' => $default_theme
]);
}
} elseif ($page == 'send_error_report' && Settings::Get('system.allow_error_report_customer') == '1') {
// only show this if we really have an exception to report
if (isset($_GET['errorid']) && $_GET['errorid'] != '') {
$errid = $_GET['errorid'];
// read error file
$err_dir = makeCorrectDir(FROXLOR_INSTALL_DIR."/logs/");
$err_file = makeCorrectFile($err_dir."/".$errid."_sql-error.log");
if (file_exists($err_file)) {
$error_content = file_get_contents($err_file);
$error = explode("|", $error_content);
$_error = array(
'code' => str_replace("\n", "", substr($error[1], 5)),
'message' => str_replace("\n", "", substr($error[2], 4)),
'file' => str_replace("\n", "", substr($error[3], 5 + strlen(FROXLOR_INSTALL_DIR))),
'line' => str_replace("\n", "", substr($error[4], 5)),
'trace' => str_replace(FROXLOR_INSTALL_DIR, "", substr($error[5], 6))
);
// build mail-content
$mail_body = "Dear froxlor-team,\n\n";
$mail_body .= "the following error has been reported by a user:\n\n";
$mail_body .= "-------------------------------------------------------------\n";
$mail_body .= $_error['code'].' '.$_error['message']."\n\n";
$mail_body .= "File: ".$_error['file'].':'.$_error['line']."\n\n";
$mail_body .= "Trace:\n".trim($_error['trace'])."\n\n";
$mail_body .= "-------------------------------------------------------------\n\n";
$mail_body .= "Froxlor-version: ".$version."\n\n";
$mail_body .= "End of report";
$mail_html = str_replace("\n", "<br />", $mail_body);
// send actual report to dev-team
if (isset($_POST['send'])
&& $_POST['send'] == 'send'
) {
// send mail and say thanks
$_mailerror = false;
try {
$mail->Subject = '[Froxlor] Error report by user';
$mail->AltBody = $mail_body;
$mail->MsgHTML($mail_html);
$mail->AddAddress('error-reports@froxlor.org', 'Froxlor Developer Team');
$mail->Send();
} catch(phpmailerException $e) {
$mailerr_msg = $e->errorMessage();
$_mailerror = true;
} catch (Exception $e) {
$mailerr_msg = $e->getMessage();
$_mailerror = true;
}
if ($_mailerror) {
// error when reporting an error...LOLFUQ
standard_error('send_report_error', $mailerr_msg);
}
// finally remove error from fs
@unlink($err_file);
redirectTo($filename, array('s' => $s));
}
// show a nice summary of the error-report
// before actually sending anything
eval("echo \"" . getTemplate("index/send_error_report") . "\";");
} else {
redirectTo($filename, array('s' => $s));
}
} else {
redirectTo($filename, array('s' => $s));
}
require_once __DIR__ . '/error_report.php';
} elseif ($page == 'apikeys' && Settings::Get('api.enabled') == 1) {
require_once __DIR__ . '/api_keys.php';
} elseif ($page == '2fa' && Settings::Get('2fa.enabled') == 1) {
require_once __DIR__ . '/2fa.php';
}

54
customer_logger.php Normal file
View File

@@ -0,0 +1,54 @@
<?php
/**
* This file is part of the Froxlor project.
* Copyright (c) 2010 the Froxlor Team (see authors).
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, you can also view it online at
* https://files.froxlor.org/misc/COPYING.txt
*
* @copyright the authors
* @author Froxlor team <team@froxlor.org>
* @license https://files.froxlor.org/misc/COPYING.txt GPLv2
*/
const AREA = 'customer';
require __DIR__ . '/lib/init.php';
use Froxlor\Api\Commands\SysLog;
use Froxlor\Settings;
use Froxlor\UI\Collection;
use Froxlor\UI\Listing;
use Froxlor\UI\Panel\UI;
use Froxlor\UI\Response;
// redirect if this customer page is hidden via settings
if (Settings::IsInList('panel.customer_hide_options', 'extras.logger')) {
Response::redirectTo('customer_index.php');
}
if ($page == 'log') {
if ($action == '') {
try {
$syslog_list_data = include_once dirname(__FILE__) . '/lib/tablelisting/tablelisting.syslog.php';
$collection = (new Collection(SysLog::class, $userinfo))
->withPagination($syslog_list_data['syslog_list']['columns'], $syslog_list_data['syslog_list']['default_sorting']);
} catch (Exception $e) {
Response::dynamicError($e->getMessage());
}
UI::view('user/table.html.twig', [
'listing' => Listing::format($collection, $syslog_list_data, 'syslog_list')
]);
}
}

View File

@@ -2,23 +2,47 @@
/**
* This file is part of the Froxlor project.
* Copyright (c) 2003-2009 the SysCP Team (see authors).
* Copyright (c) 2010 the Froxlor Team (see authors).
*
* For the full copyright and license information, please view the COPYING
* file that was distributed with this source code. You can also view the
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* @copyright (c) the authors
* @author Florian Lippert <flo@syscp.org> (2003-2009)
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Panel
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, you can also view it online at
* https://files.froxlor.org/misc/COPYING.txt
*
* @copyright the authors
* @author Froxlor team <team@froxlor.org>
* @license https://files.froxlor.org/misc/COPYING.txt GPLv2
*/
define('AREA', 'customer');
require './lib/init.php';
const AREA = 'customer';
require __DIR__ . '/lib/init.php';
use Froxlor\Api\Commands\Mysqls;
use Froxlor\Api\Commands\MysqlServer;
use Froxlor\Database\Database;
use Froxlor\FroxlorLogger;
use Froxlor\Settings;
use Froxlor\UI\Collection;
use Froxlor\UI\HTML;
use Froxlor\UI\Listing;
use Froxlor\UI\Panel\UI;
use Froxlor\UI\Request;
use Froxlor\UI\Response;
use Froxlor\CurrentUser;
// redirect if this customer page is hidden via settings or no resources given
if (Settings::IsInList('panel.customer_hide_options', 'mysql') || $userinfo['mysqls'] == 0) {
Response::redirectTo('customer_index.php');
}
// get sql-root access data
Database::needRoot(true);
@@ -26,78 +50,49 @@ Database::needSqlData();
$sql_root = Database::getSqlData();
Database::needRoot(false);
if (isset($_POST['id'])) {
$id = intval($_POST['id']);
} elseif (isset($_GET['id'])) {
$id = intval($_GET['id']);
}
$id = (int)Request::any('id');
if ($page == 'overview') {
$log->logAction(USR_ACTION, LOG_NOTICE, "viewed customer_mysql");
Database::needSqlData();
$sql = Database::getSqlData();
$lng['mysql']['description'] = str_replace('<SQL_HOST>', $sql['host'], $lng['mysql']['description']);
eval("echo \"" . getTemplate('mysql/mysql') . "\";");
} elseif ($page == 'mysqls') {
if ($page == 'overview' || $page == 'mysqls') {
if ($action == '') {
$log->logAction(USR_ACTION, LOG_NOTICE, "viewed customer_mysql::mysqls");
$fields = array(
'databasename' => $lng['mysql']['databasename'],
'description' => $lng['mysql']['databasedescription']
);
$paging = new paging($userinfo, TABLE_PANEL_DATABASES, $fields);
$result_stmt = Database::prepare("SELECT * FROM `" . TABLE_PANEL_DATABASES . "`
WHERE `customerid`= :customerid " . $paging->getSqlWhere(true) . " " . $paging->getSqlOrderBy() . " " . $paging->getSqlLimit()
);
Database::pexecute($result_stmt, array("customerid" => $userinfo['customerid']));
$mysqls_count = Database::num_rows();
$paging->setEntries($mysqls_count);
$log->logAction(FroxlorLogger::USR_ACTION, LOG_NOTICE, "viewed customer_mysql::mysqls");
$sortcode = $paging->getHtmlSortCode($lng);
$arrowcode = $paging->getHtmlArrowCode($filename . '?page=' . $page . '&s=' . $s);
$searchcode = $paging->getHtmlSearchCode($lng);
$pagingcode = $paging->getHtmlPagingCode($filename . '?page=' . $page . '&s=' . $s);
$i = 0;
$count = 0;
$mysqls = '';
$multiple_mysqlservers = count(json_decode($userinfo['allowed_mysqlserver'] ?? '[]', true)) > 1;
$dbservers_stmt = Database::query("SELECT COUNT(DISTINCT `dbserver`) as numservers FROM `".TABLE_PANEL_DATABASES."`");
$dbserver = $dbservers_stmt->fetch(PDO::FETCH_ASSOC);
$count_mysqlservers = $dbserver['numservers'];
// Begin root-session
Database::needRoot(true);
while ($row = $result_stmt->fetch(PDO::FETCH_ASSOC)) {
if ($paging->checkDisplay($i)) {
$row = htmlentities_array($row);
$mbdata_stmt = Database::prepare("SELECT SUM(data_length + index_length) as MB FROM information_schema.TABLES
WHERE table_schema = :table_schema
GROUP BY table_schema"
);
Database::pexecute($mbdata_stmt, array("table_schema" => $row['databasename']));
$mbdata = $mbdata_stmt->fetch(PDO::FETCH_ASSOC);
$row['size'] = size_readable($mbdata['MB'], 'GiB', 'bi', '%01.' . (int)Settings::Get('panel.decimal_places') . 'f %s');
eval("\$mysqls.=\"" . getTemplate('mysql/mysqls_database') . "\";");
$count++;
try {
$mysql_list_data = include_once dirname(__FILE__) . '/lib/tablelisting/customer/tablelisting.mysqls.php';
$collection = (new Collection(Mysqls::class, $userinfo))
->withPagination($mysql_list_data['mysql_list']['columns'], $mysql_list_data['mysql_list']['default_sorting']);
} catch (Exception $e) {
Response::dynamicError($e->getMessage());
}
$i++;
$actions_links = false;
if (CurrentUser::canAddResource('mysqls')) {
$actions_links = [
[
'href' => $linker->getLink(['section' => 'mysql', 'page' => 'mysqls', 'action' => 'add']),
'label' => lng('mysql.database_create')
]
];
}
Database::needRoot(false);
// End root-session
eval("echo \"" . getTemplate('mysql/mysqls') . "\";");
UI::view('user/table.html.twig', [
'listing' => Listing::format($collection, $mysql_list_data, 'mysql_list'),
'actions_links' => $actions_links,
'entity_info' => lng('mysql.description')
]);
} elseif ($action == 'delete' && $id != 0) {
$result_stmt = Database::prepare('SELECT `id`, `databasename`, `description`, `dbserver` FROM `' . TABLE_PANEL_DATABASES . '`
WHERE `customerid`="' . (int)$userinfo['customerid'] . '"
AND `id`="' . (int)$id . '"'
);
Database::pexecute($result_stmt, array("customerid" => $userinfo['customerid']));
$result = $result_stmt->fetch(PDO::FETCH_ASSOC);
try {
$json_result = Mysqls::getLocal($userinfo, [
'id' => $id
])->get();
} catch (Exception $e) {
Response::dynamicError($e->getMessage());
}
$result = json_decode($json_result, true)['data'];
if (isset($result['databasename']) && $result['databasename'] != '') {
Database::needRoot(true, $result['dbserver']);
Database::needRoot(true, $result['dbserver'], false);
Database::needSqlData();
$sql_root = Database::getSqlData();
Database::needRoot(false);
@@ -107,252 +102,96 @@ if ($page == 'overview') {
}
if (isset($_POST['send']) && $_POST['send'] == 'send') {
// Begin root-session
Database::needRoot(true, $result['dbserver']);
$dbm = new DbManager($log);
$dbm->getManager()->deleteDatabase($result['databasename']);
$log->logAction(USR_ACTION, LOG_INFO, "deleted database '" . $result['databasename'] . "'");
Database::needRoot(false);
// End root-session
$stmt = Database::prepare("DELETE FROM `" . TABLE_PANEL_DATABASES . "`
WHERE `customerid` = :customerid
AND `id` = :id"
);
Database::pexecute($stmt, array("customerid" => $userinfo['customerid'], "id" => $id));
$resetaccnumber = ($userinfo['mysqls_used'] == '1') ? " , `mysql_lastaccountnumber` = '0' " : '';
$stmt = Database::prepare("UPDATE `" . TABLE_PANEL_CUSTOMERS . "`
SET `mysqls_used` = `mysqls_used` - 1 " . $resetaccnumber . "
WHERE `customerid` = :customerid"
);
Database::pexecute($stmt, array("customerid" => $userinfo['customerid']));
redirectTo($filename, array('page' => $page, 's' => $s));
try {
Mysqls::getLocal($userinfo, $_POST)->delete();
} catch (Exception $e) {
Response::dynamicError($e->getMessage());
}
Response::redirectTo($filename, [
'page' => $page
]);
} else {
$dbnamedesc = $result['databasename'];
if (isset($result['description']) && $result['description'] != '') {
$dbnamedesc .= ' (' . $result['description'] . ')';
}
ask_yesno('mysql_reallydelete', $filename, array('id' => $id, 'page' => $page, 'action' => $action), $dbnamedesc);
HTML::askYesNo('mysql_reallydelete', $filename, [
'id' => $id,
'page' => $page,
'action' => $action
], $dbnamedesc);
}
}
} elseif ($action == 'add') {
if ($userinfo['mysqls_used'] < $userinfo['mysqls'] || $userinfo['mysqls'] == '-1') {
if (isset($_POST['send']) && $_POST['send'] == 'send') {
$password = validate($_POST['mysql_password'], 'password');
$password = validatePassword($password);
$sendinfomail = isset($_POST['sendinfomail']) ? 1 : 0;
if ($sendinfomail != 1) {
$sendinfomail = 0;
}
if ($password == '') {
standard_error(array('stringisempty', 'mypassword'));
} else {
$dbserver = 0;
$dbservers_stmt = Database::query("SELECT COUNT(DISTINCT `dbserver`) as numservers FROM `".TABLE_PANEL_DATABASES."`");
$_dbserver = $dbservers_stmt->fetch(PDO::FETCH_ASSOC);
$count_mysqlservers = $_dbserver['numservers'];
if ($count_mysqlservers > 1) {
$dbserver = validate($_POST['mysql_server'], html_entity_decode($lng['mysql']['mysql_server']), '', '', 0);
Database::needRoot(true, $dbserver);
Database::needSqlData();
$sql_root = Database::getSqlData();
Database::needRoot(false);
if (!isset($sql_root) || !is_array($sql_root)) {
$dbserver = 0;
}
}
// validate description before actual adding the database, #1052
$databasedescription = validate(trim($_POST['description']), 'description');
// create database, user, set permissions, etc.pp.
$dbm = new DbManager($log);
$username = $dbm->createDatabase(
$userinfo['loginname'],
$password,
$userinfo['mysql_lastaccountnumber']
);
// Statement modified for Database description -- PH 2004-11-29
$stmt = Database::prepare('INSERT INTO `' . TABLE_PANEL_DATABASES . '`
(`customerid`, `databasename`, `description`, `dbserver`)
VALUES (:customerid, :databasename, :description, :dbserver)'
);
$params = array(
"customerid" => $userinfo['customerid'],
"databasename" => $username,
"description" => $databasedescription,
"dbserver" => $dbserver
);
Database::pexecute($stmt, $params);
$stmt = Database::prepare('UPDATE `' . TABLE_PANEL_CUSTOMERS . '`
SET `mysqls_used` = `mysqls_used` + 1, `mysql_lastaccountnumber` = `mysql_lastaccountnumber` + 1
WHERE `customerid` = :customerid'
);
Database::pexecute($stmt, array("customerid" => $userinfo['customerid']));
if ($sendinfomail == 1) {
$pma = $lng['admin']['notgiven'];
if (Settings::Get('panel.phpmyadmin_url') != '') {
$pma = Settings::Get('panel.phpmyadmin_url');
}
Database::needRoot(true, $dbserver);
Database::needSqlData();
$sql_root = Database::getSqlData();
Database::needRoot(false);
$replace_arr = array(
'SALUTATION' => getCorrectUserSalutation($userinfo),
'CUST_NAME' => getCorrectUserSalutation($userinfo), // < keep this for compatibility
'DB_NAME' => $username,
'DB_PASS' => $password,
'DB_DESC' => $databasedescription,
'DB_SRV' => $sql_root['caption'],
'PMA_URI' => $pma
);
$def_language = $userinfo['def_language'];
$result_stmt = Database::prepare("SELECT `value` FROM `" . TABLE_PANEL_TEMPLATES . "`
WHERE `adminid` = :adminid
AND `language` = :lang
AND `templategroup`='mails'
AND `varname`='new_database_by_customer_subject'"
);
Database::pexecute($result_stmt, array("adminid" => $userinfo['adminid'], "lang" => $def_language));
$result = $result_stmt->fetch(PDO::FETCH_ASSOC);
$mail_subject = html_entity_decode(replace_variables((($result['value'] != '') ? $result['value'] : $lng['customer']['mysql_add']['infomail_subject']), $replace_arr));
$result_stmt = Database::prepare("SELECT `value` FROM `" . TABLE_PANEL_TEMPLATES . "`
WHERE `adminid`= :adminid
AND `language`= :lang
AND `templategroup` = 'mails'
AND `varname` = 'new_database_by_customer_mailbody'"
);
Database::pexecute($result_stmt, array("adminid" => $userinfo['adminid'], "lang" => $def_language));
$result = $result_stmt->fetch(PDO::FETCH_ASSOC);
$mail_body = html_entity_decode(replace_variables((($result['value'] != '') ? $result['value'] : $lng['customer']['mysql_add']['infomail_body']['main']), $replace_arr));
$_mailerror = false;
try {
$mail->Subject = $mail_subject;
$mail->AltBody = $mail_body;
$mail->MsgHTML(str_replace("\n", "<br />", $mail_body));
$mail->AddAddress($userinfo['email'], getCorrectUserSalutation($userinfo));
$mail->Send();
} catch(phpmailerException $e) {
$mailerr_msg = $e->errorMessage();
$_mailerror = true;
Mysqls::getLocal($userinfo, $_POST)->add();
} catch (Exception $e) {
$mailerr_msg = $e->getMessage();
$_mailerror = true;
}
if ($_mailerror) {
$log->logAction(USR_ACTION, LOG_ERR, "Error sending mail: " . $mailerr_msg);
standard_error('errorsendingmail', $userinfo['email']);
}
$mail->ClearAddresses();
}
redirectTo($filename, array('page' => $page, 's' => $s));
Response::dynamicError($e->getMessage());
}
Response::redirectTo($filename, [
'page' => $page
]);
} else {
$dbservers_stmt = Database::query("SELECT DISTINCT `dbserver` FROM `".TABLE_PANEL_DATABASES."`");
$mysql_servers = '';
$count_mysqlservers = 0;
while ($dbserver = $dbservers_stmt->fetch(PDO::FETCH_ASSOC)) {
Database::needRoot(true, $dbserver['dbserver']);
Database::needSqlData();
$sql_root = Database::getSqlData();
$mysql_servers .= makeoption($sql_root['caption'], $dbserver['dbserver']);
$count_mysqlservers++;
$mysql_servers = [];
try {
$result_json = MysqlServer::getLocal($userinfo)->listing();
$result_decoded = json_decode($result_json, true)['data']['list'];
foreach ($result_decoded as $dbserver => $dbdata) {
$mysql_servers[$dbserver] = $dbdata['caption'];
}
} catch (Exception $e) {
/* just none */
}
Database::needRoot(false);
$mysql_add_data = include_once dirname(__FILE__) . '/lib/formfields/customer/mysql/formfield.mysql_add.php';
$mysql_add_form = htmlform::genHTMLForm($mysql_add_data);
$title = $mysql_add_data['mysql_add']['title'];
$image = $mysql_add_data['mysql_add']['image'];
eval("echo \"" . getTemplate('mysql/mysqls_add') . "\";");
UI::view('user/form.html.twig', [
'formaction' => $linker->getLink(['section' => 'mysql']),
'formdata' => $mysql_add_data['mysql_add']
]);
}
}
} elseif ($action == 'edit' && $id != 0) {
$result_stmt = Database::prepare("SELECT `id`, `databasename`, `description`, `dbserver` FROM `" . TABLE_PANEL_DATABASES . "`
WHERE `customerid` = :customerid
AND `id` = :id"
);
Database::pexecute($result_stmt, array("customerid" => $userinfo['customerid'], "id" => $id));
$result = $result_stmt->fetch(PDO::FETCH_ASSOC);
try {
$json_result = Mysqls::getLocal($userinfo, [
'id' => $id
])->get();
} catch (Exception $e) {
Response::dynamicError($e->getMessage());
}
$result = json_decode($json_result, true)['data'];
if (isset($result['databasename']) && $result['databasename'] != '') {
if (!isset($sql_root[$result['dbserver']]) || !is_array($sql_root[$result['dbserver']])) {
$result['dbserver'] = 0;
}
if (isset($_POST['send']) && $_POST['send'] == 'send') {
// Only change Password if it is set, do nothing if it is empty! -- PH 2004-11-29
$password = validate($_POST['mysql_password'], 'password');
if ($password != '') {
// validate password
$password = validatePassword($password);
// Begin root-session
Database::needRoot(true);
foreach (array_map('trim', explode(',', Settings::Get('system.mysql_access_host'))) as $mysql_access_host) {
$stmt = Database::prepare("SET PASSWORD FOR :dbname@:host = PASSWORD(:password)");
$params = array(
"dbname" => $result['databasename'],
"host" => $mysql_access_host,
"password" => $password
);
Database::pexecute($stmt, $params);
try {
$json_result = Mysqls::getLocal($userinfo, $_POST)->update();
} catch (Exception $e) {
Response::dynamicError($e->getMessage());
}
$stmt = Database::prepare("FLUSH PRIVILEGES");
Database::pexecute($stmt);
Database::needRoot(false);
// End root-session
}
// Update the Database description -- PH 2004-11-29
$log->logAction(USR_ACTION, LOG_INFO, "edited database '" . $result['databasename'] . "'");
$databasedescription = validate($_POST['description'], 'description');
$stmt = Database::prepare("UPDATE `" . TABLE_PANEL_DATABASES . "`
SET `description` = :desc
WHERE `customerid` = :customerid
AND `id` = :id"
);
Database::pexecute($stmt, array("desc" => $databasedescription, "customerid" => $userinfo['customerid'], "id" => $id));
redirectTo($filename, array('page' => $page, 's' => $s));
Response::redirectTo($filename, [
'page' => $page
]);
} else {
$dbservers_stmt = Database::query("SELECT COUNT(DISTINCT `dbserver`) as numservers FROM `".TABLE_PANEL_DATABASES."`");
$dbserver = $dbservers_stmt->fetch(PDO::FETCH_ASSOC);
$count_mysqlservers = $dbserver['numservers'];
Database::needRoot(true, $result['dbserver']);
Database::needSqlData();
$sql_root = Database::getSqlData();
Database::needRoot(false);
$mysql_servers = [];
try {
$result_json = MysqlServer::getLocal($userinfo)->listing();
$result_decoded = json_decode($result_json, true)['data']['list'];
foreach ($result_decoded as $dbserver => $dbdata) {
$mysql_servers[$dbserver] = $dbdata['caption'] . ' (' . $dbdata['host'] . (isset($dbdata['port']) && !empty($dbdata['port']) ? ':' . $dbdata['port'] : '').')';
}
} catch (Exception $e) {
/* just none */
}
$mysql_edit_data = include_once dirname(__FILE__) . '/lib/formfields/customer/mysql/formfield.mysql_edit.php';
$mysql_edit_form = htmlform::genHTMLForm($mysql_edit_data);
$title = $mysql_edit_data['mysql_edit']['title'];
$image = $mysql_edit_data['mysql_edit']['image'];
eval("echo \"" . getTemplate('mysql/mysqls_edit') . "\";");
UI::view('user/form.html.twig', [
'formaction' => $linker->getLink(['section' => 'mysql', 'id' => $id]),
'formdata' => $mysql_edit_data['mysql_edit'],
'editid' => $id
]);
}
}
}

View File

@@ -1,376 +0,0 @@
<?php
/**
* This file is part of the Froxlor project.
* Copyright (c) 2003-2009 the SysCP Team (see authors).
* Copyright (c) 2010 the Froxlor Team (see authors).
*
* For the full copyright and license information, please view the COPYING
* file that was distributed with this source code. You can also view the
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
*
* @copyright (c) the authors
* @author Florian Lippert <flo@syscp.org> (2003-2009)
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Panel
*
*/
define('AREA', 'customer');
require './lib/init.php';
if (isset($_POST['id'])) {
$id = intval($_POST['id']);
//Check if the current user is allowed to see the current ticket.
$stmt = Database::prepare("SELECT `id` FROM `panel_tickets` WHERE `id` = :id AND `customerid` = :customerid");
$result = Database::pexecute_first($stmt, array("id" => $id, "customerid" => $userinfo['customerid']));
if ($result == null) {
// no rights to see the requested ticket
standard_error(array('ticketnotaccessible'));
}
} elseif (isset($_GET['id'])) {
$id = intval($_GET['id']);
}
if ($page == 'overview') {
$log->logAction(USR_ACTION, LOG_NOTICE, "viewed customer_tickets");
eval("echo \"" . getTemplate("tickets/ticket") . "\";");
} elseif ($page == 'tickets') {
if ($action == '') {
$log->logAction(USR_ACTION, LOG_NOTICE, "viewed customer_tickets::tickets");
$fields = array(
'status' => $lng['ticket']['status'],
'lastchange' => $lng['ticket']['lastchange'],
'subject' => $lng['ticket']['subject'],
'lastreplier' => $lng['ticket']['lastreplier']
);
$paging = new paging($userinfo, TABLE_PANEL_TICKETS, $fields);
$stmt = Database::prepare('SELECT `main`.`id`, (SELECT COUNT(`sub`.`id`) FROM `' . TABLE_PANEL_TICKETS . '` `sub`
WHERE `sub`.`answerto` = `main`.`id`) AS `ticket_answers`, `main`.`lastchange`, `main`.`subject`, `main`.`status`, `main`.`lastreplier`, `main`.`priority`
FROM `' . TABLE_PANEL_TICKETS . '` as `main`
WHERE `main`.`answerto` = "0"
AND `archived` = "0"
AND `customerid`= :customerid ' . $paging->getSqlWhere(true) . " " . $paging->getSqlOrderBy() . " " . $paging->getSqlLimit()
);
Database::pexecute($stmt, array("customerid" => $userinfo['customerid']));
$paging->setEntries(Database::num_rows());
$sortcode = $paging->getHtmlSortCode($lng);
$arrowcode = $paging->getHtmlArrowCode($filename . '?page=' . $page . '&s=' . $s);
$searchcode = $paging->getHtmlSearchCode($lng);
$pagingcode = $paging->getHtmlPagingCode($filename . '?page=' . $page . '&s=' . $s);
$i = 0;
$count = 0;
$tickets = '';
$tickets_count = 0;
while ($row = $stmt->fetch(PDO::FETCH_ASSOC)) {
if ($paging->checkDisplay($i)) {
$tickets_count++;
$row = htmlentities_array($row);
$row['lastchange'] = date("d.m.y H:i", $row['lastchange']);
if ($row['status'] >= 0 && $row['status'] <= 2) {
$reopen = 0;
} else {
$reopen = 1;
}
$row['status'] = ticket::getStatusText($lng, $row['status']);
$row['priority'] = ticket::getPriorityText($lng, $row['priority']);
if ($row['lastreplier'] == '1') {
$row['lastreplier'] = $lng['ticket']['staff'];
$cananswer = 1;
} else {
$row['lastreplier'] = $lng['ticket']['customer'];
$cananswer = 0;
}
$row['subject'] = html_entity_decode($row['subject']);
if (strlen($row['subject']) > 20) {
$row['subject'] = substr($row['subject'], 0, 17) . '...';
}
eval("\$tickets.=\"" . getTemplate("tickets/tickets_tickets") . "\";");
$count++;
}
$i++;
}
$supportavailable = 0;
$time = date("Hi", time());
$day = date("w", time());
$start = substr(Settings::Get('ticket.worktime_begin'), 0, 2) . substr(Settings::Get('ticket.worktime_begin'), 3, 2);
$end = substr(Settings::Get('ticket.worktime_end'), 0, 2) . substr(Settings::Get('ticket.worktime_end'), 3, 2);
if ($time >= $start && $time <= $end) {
$supportavailable = 1;
}
if (Settings::Get('ticket.worktime_sat') == "0" && $day == "6") {
$supportavailable = 0;
}
if (Settings::Get('ticket.worktime_sun') == "0" && $day == "0") {
$supportavailable = 0;
}
if (Settings::Get('ticket.worktime_all') == "1") {
$supportavailable = 1;
}
$ticketsopen = 0;
$stmt = Database::prepare('SELECT COUNT(`id`) as `count` FROM `' . TABLE_PANEL_TICKETS . '`
WHERE `customerid` = :customerid
AND `answerto` = "0"
AND (`status` = "0" OR `status` = "1" OR `status` = "2")'
);
$opentickets = Database::pexecute_first($stmt, array("customerid" => $userinfo['customerid']));
if (Settings::Get('ticket.concurrently_open') != - 1 && Settings::Get('ticket.concurrently_open') != '') {
$notmorethanxopentickets = strtr($lng['ticket']['notmorethanxopentickets'], array('%s' => Settings::Get('ticket.concurrently_open')));
} else {
$notmorethanxopentickets = '';
}
$ticketsopen = (int)$opentickets['count'];
eval("echo \"" . getTemplate("tickets/tickets") . "\";");
} elseif ($action == 'new') {
if ($userinfo['tickets_used'] < $userinfo['tickets'] || $userinfo['tickets'] == '-1') {
if (isset($_POST['send']) && $_POST['send'] == 'send') {
$newticket = ticket::getInstanceOf($userinfo, -1);
$newticket->Set('subject', validate($_POST['subject'], 'subject'), true, false);
$newticket->Set('priority', validate($_POST['priority'], 'priority'), true, false);
$newticket->Set('category', validate($_POST['category'], 'category'), true, false);
$newticket->Set('customer', (int)$userinfo['customerid'], true, false);
$newticket->Set('admin', (int)$userinfo['adminid'], true, false);
$newticket->Set('message', validate(str_replace("\r\n", "\n", $_POST['message']), 'message', '/^[^\0]*$/'), true, false);
if ($newticket->Get('subject') == null) {
standard_error(array('stringisempty', 'mysubject'));
} elseif ($newticket->Get('message') == null) {
standard_error(array('stringisempty', 'mymessage'));
} else {
$now = time();
$newticket->Set('dt', $now, true, true);
$newticket->Set('lastchange', $now, true, true);
$newticket->Set('ip', $_SERVER['REMOTE_ADDR'], true, true);
$newticket->Set('status', '0', true, true);
$newticket->Set('lastreplier', '0', true, true);
$newticket->Set('by', '0', true, true);
$newticket->Insert();
$log->logAction(USR_ACTION, LOG_NOTICE, "opened support-ticket '" . $newticket->Get('subject') . "'");
$stmt = Database::prepare('UPDATE `' . TABLE_PANEL_CUSTOMERS . '`
SET `tickets_used`=`tickets_used` + 1
WHERE `customerid`= :customerid'
);
Database::pexecute($stmt, array("customerid" => $userinfo['customerid']));
// Customer mail
$newticket->sendMail((int)$userinfo['customerid'], 'new_ticket_for_customer_subject', $lng['mails']['new_ticket_for_customer']['subject'], 'new_ticket_for_customer_mailbody', $lng['mails']['new_ticket_for_customer']['mailbody']);
// Admin mail
$newticket->sendMail(-1, 'new_ticket_by_customer_subject', $lng['mails']['new_ticket_by_customer']['subject'], 'new_ticket_by_customer_mailbody', $lng['mails']['new_ticket_by_customer']['mailbody']);
redirectTo($filename, array('page' => $page, 's' => $s));
}
} else {
$categories = '';
$result_stmt = Database::prepare('SELECT `id`, `name` FROM `' . TABLE_PANEL_TICKET_CATS . '`
WHERE `adminid` = :adminid
ORDER BY `logicalorder`, `name` ASC'
);
$result = Database::pexecute_first($result_stmt, array("adminid" => $userinfo['adminid']));
if (isset($result['name']) && $result['name'] != '') {
$result2_stmt = Database::prepare('SELECT `id`, `name` FROM `' . TABLE_PANEL_TICKET_CATS . '`
WHERE `adminid` = :adminid
ORDER BY `logicalorder`, `name` ASC'
);
Database::pexecute($result2_stmt, array("adminid" => $userinfo['adminid']));
while ($row = $result2_stmt->fetch(PDO::FETCH_ASSOC)) {
$categories.= makeoption($row['name'], $row['id']);
}
} else {
$categories = makeoption($lng['ticket']['no_cat'], '0');
}
$priorities = makeoption($lng['ticket']['high'], '1');
$priorities.= makeoption($lng['ticket']['normal'], '2');
$priorities.= makeoption($lng['ticket']['low'], '3');
$ticketsopen = 0;
$opentickets_stmt = Database::prepare('SELECT COUNT(`id`) as `count` FROM `' . TABLE_PANEL_TICKETS . '`
WHERE `customerid` = :customerid
AND `answerto` = "0"
AND (`status` = "0" OR `status` = "1" OR `status` = "2")'
);
$opentickets = Database::pexecute_first($opentickets_stmt, array("customerid" => $userinfo['customerid']));
if (Settings::Get('ticket.concurrently_open') != -1 && Settings::Get('ticket.concurrently_open') != '') {
$notmorethanxopentickets = strtr($lng['ticket']['notmorethanxopentickets'], array('%s' => Settings::Get('ticket.concurrently_open')));
} else {
$notmorethanxopentickets = '';
}
$ticketsopen = (int)$opentickets['count'];
$ticket_add_data = include_once dirname(__FILE__).'/lib/formfields/customer/tickets/formfield.ticket_add.php';
$ticket_add_form = htmlform::genHTMLForm($ticket_add_data);
$title = $ticket_add_data['ticket_add']['title'];
$image = $ticket_add_data['ticket_add']['image'];
eval("echo \"" . getTemplate("tickets/tickets_new") . "\";");
}
} else {
standard_error('nomoreticketsavailable');
}
} elseif ($action == 'answer' && $id != 0) {
if (isset($_POST['send']) && $_POST['send'] == 'send') {
$replyticket = ticket::getInstanceOf($userinfo, -1);
$replyticket->Set('subject', validate($_POST['subject'], 'subject'), true, false);
$replyticket->Set('priority', validate($_POST['priority'], 'priority'), true, false);
$replyticket->Set('message', validate(str_replace("\r\n", "\n", $_POST['message']), 'message', '/^[^\0]*$/'), true, false);
if ($replyticket->Get('message') == null) {
standard_error(array('stringisempty', 'mymessage'));
} else {
$now = time();
$replyticket->Set('customer', (int)$userinfo['customerid'], true, true);
$replyticket->Set('lastchange', $now, true, true);
$replyticket->Set('ip', $_SERVER['REMOTE_ADDR'], true, true);
$replyticket->Set('status', '1', true, true);
$replyticket->Set('answerto', (int)$id, true, false);
$replyticket->Set('by', '0', true, true);
$replyticket->Insert();
// Update priority if changed
$mainticket = ticket::getInstanceOf($userinfo, (int)$id);
if ($replyticket->Get('priority') != $mainticket->Get('priority')) {
$mainticket->Set('priority', $replyticket->Get('priority'), true);
}
$mainticket->Set('lastchange', $now);
$mainticket->Set('lastreplier', '0');
$mainticket->Set('status', '1');
$mainticket->Update();
$log->logAction(USR_ACTION, LOG_NOTICE, "answered support-ticket '" . $mainticket->Get('subject') . "'");
$mainticket->sendMail(-1, 'new_reply_ticket_by_customer_subject', $lng['mails']['new_reply_ticket_by_customer']['subject'], 'new_reply_ticket_by_customer_mailbody', $lng['mails']['new_reply_ticket_by_customer']['mailbody']);
redirectTo($filename, array('page' => $page, 's' => $s));
}
} else {
$ticket_replies = '';
$mainticket = ticket::getInstanceOf($userinfo, (int)$id);
$dt = date("d.m.Y H:i\h", $mainticket->Get('dt'));
$status = ticket::getStatusText($lng, $mainticket->Get('status'));
if ($mainticket->Get('status') >= 0 && $mainticket->Get('status') <= 2) {
$isclosed = 0;
} else {
$isclosed = 1;
}
if ($mainticket->Get('by') == '1') {
$by = $lng['ticket']['staff'];
} else {
$cid = $mainticket->Get('customer');
$usr_stmt = Database::prepare('SELECT `customerid`, `firstname`, `name`, `company`, `loginname`
FROM `' . TABLE_PANEL_CUSTOMERS . '`
WHERE `customerid` = :customerid '
);
$usr = Database::pexecute_first($usr_stmt, array("customerid" => $cid));
$by = getCorrectFullUserDetails($usr);
}
$subject = $mainticket->Get('subject');
$message = $mainticket->Get('message');
eval("\$ticket_replies.=\"" . getTemplate("tickets/tickets_tickets_main") . "\";");
$result_stmt = Database::prepare('SELECT `name` FROM `' . TABLE_PANEL_TICKET_CATS . '`
WHERE `id`= :id '
);
$row = Database::pexecute_first($result_stmt, array("id" => $mainticket->Get('category')));
$andere_stmt = Database::prepare('SELECT * FROM `' . TABLE_PANEL_TICKETS . '`
WHERE `answerto`= :answerto
ORDER BY `lastchange` ASC'
);
Database::pexecute($andere_stmt, array("answerto" => $id));
$numrows_andere = Database::num_rows();
while ($row2 = $andere_stmt->fetch(PDO::FETCH_ASSOC)) {
$subticket = ticket::getInstanceOf($userinfo, (int)$row2['id']);
$lastchange = date("d.m.Y H:i\h", $subticket->Get('lastchange'));
if ($subticket->Get('by') == '1') {
$by = $lng['ticket']['staff'];
} else {
$by = getCorrectFullUserDetails($usr);
}
$subject = $subticket->Get('subject');
$message = $subticket->Get('message');
eval("\$ticket_replies.=\"" . getTemplate("tickets/tickets_tickets_list") . "\";");
}
$priorities = makeoption($lng['ticket']['high'], '1', $mainticket->Get('priority'), true, true);
$priorities.= makeoption($lng['ticket']['normal'], '2', $mainticket->Get('priority'), true, true);
$priorities.= makeoption($lng['ticket']['low'], '3', $mainticket->Get('priority'), true, true);
$subject = htmlentities($mainticket->Get('subject'));
$ticket_replies_count = $numrows_andere + 1;
// don't forget the main-ticket!
$ticket_reply_data = include_once dirname(__FILE__).'/lib/formfields/customer/tickets/formfield.ticket_reply.php';
$ticket_reply_form = htmlform::genHTMLForm($ticket_reply_data);
$title = $ticket_reply_data['ticket_reply']['title'];
$image = $ticket_reply_data['ticket_reply']['image'];
eval("echo \"" . getTemplate("tickets/tickets_reply") . "\";");
}
} elseif ($action == 'close' && $id != 0) {
if (isset($_POST['send']) && $_POST['send'] == 'send') {
$now = time();
$mainticket = ticket::getInstanceOf($userinfo, (int)$id);
$mainticket->Set('lastchange', $now, true, true);
$mainticket->Set('lastreplier', '0', true, true);
$mainticket->Set('status', '3', true, true);
$mainticket->Update();
$log->logAction(USR_ACTION, LOG_NOTICE, "closed support-ticket '" . $mainticket->Get('subject') . "'");
redirectTo($filename, array('page' => $page, 's' => $s));
} else {
$mainticket = ticket::getInstanceOf($userinfo, (int)$id);
ask_yesno('ticket_reallyclose', $filename, array('id' => $id, 'page' => $page, 'action' => $action), $mainticket->Get('subject'));
}
} elseif ($action == 'reopen' && $id != 0) {
$ticketsopen = 0;
$opentickets_stmt = Database::prepare('SELECT COUNT(`id`) as `count` FROM `' . TABLE_PANEL_TICKETS . '`
WHERE `customerid` = :customerid
AND `answerto` = "0"
AND (`status` = "0" OR `status` = "1" OR `status` = "2")'
);
$opentickets = Database::pexecute_first($opentickets_stmt, array("customerid" => $userinfo['customerid']));
$ticketsopen = (int)$opentickets['count'];
if ($ticketsopen > Settings::Get('ticket.concurrently_open') && Settings::Get('ticket.concurrently_open') != - 1 && Settings::Get('ticket.concurrently_open') != '') {
standard_error('notmorethanxopentickets', Settings::Get('ticket.concurrently_open'));
}
$now = time();
$mainticket = ticket::getInstanceOf($userinfo, (int)$id);
$mainticket->Set('lastchange', $now, true, true);
$mainticket->Set('lastreplier', '0', true, true);
$mainticket->Set('status', '0', true, true);
$mainticket->Update();
$log->logAction(USR_ACTION, LOG_NOTICE, "reopened support-ticket '" . $mainticket->Get('subject') . "'");
redirectTo($filename, array('page' => $page, 's' => $s));
}
}

View File

@@ -2,159 +2,52 @@
/**
* This file is part of the Froxlor project.
* Copyright (c) 2003-2009 the SysCP Team (see authors).
* Copyright (c) 2010 the Froxlor Team (see authors).
*
* For the full copyright and license information, please view the COPYING
* file that was distributed with this source code. You can also view the
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* @copyright (c) the authors
* @author Florian Lippert <flo@syscp.org> (2003-2009)
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Panel
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, you can also view it online at
* https://files.froxlor.org/misc/COPYING.txt
*
* @copyright the authors
* @author Froxlor team <team@froxlor.org>
* @license https://files.froxlor.org/misc/COPYING.txt GPLv2
*/
define('AREA', 'customer');
$intrafficpage = 1;
require './lib/init.php';
$traffic = '';
$month = null;
$year = null;
const AREA = 'customer';
require __DIR__ . '/lib/init.php';
if (isset($_POST['month']) && isset($_POST['year'])) {
$month = intval($_POST['month']);
$year = intval($_POST['year']);
} elseif (isset($_GET['month']) && isset($_GET['year'])) {
$month = intval($_GET['month']);
$year = intval($_GET['year']);
}
//BAM! $_GET???
elseif (isset($_GET['page']) && $_GET['page'] == 'current') {
if (date('d') != '01') {
$month = date('m');
$year = date('Y');
} else {
if (date('m') == '01') {
$month = 12;
$year = date('Y') - 1;
} else {
$month = date('m') - 1;
$year = date('Y');
}
}
use Froxlor\Traffic\Traffic;
use Froxlor\Settings;
use Froxlor\UI\Panel\UI;
use Froxlor\UI\Request;
use Froxlor\UI\Response;
// redirect if this customer page is hidden via settings
if (Settings::IsInList('panel.customer_hide_options', 'traffic')) {
Response::redirectTo('customer_index.php');
}
if (!is_null($month) && !is_null($year)) {
$traf['byte'] = 0;
$result_stmt = Database::prepare("SELECT SUM(`http`) as 'http', SUM(`ftp_up`) AS 'ftp_up', SUM(`ftp_down`) as 'ftp_down', SUM(`mail`) as 'mail', `day`, `month`, `year`
FROM `" . TABLE_PANEL_TRAFFIC . "`
WHERE `customerid`= :customerid
AND `month` = :month
AND `year` = :year
GROUP BY `day`
ORDER BY `day` DESC"
);
$params = array(
"customerid" => $userinfo['customerid'],
"month" => $month,
"year" => $year
);
Database::pexecute($result_stmt, $params);
$traffic_complete['http'] = 0;
$traffic_complete['ftp'] = 0;
$traffic_complete['mail'] = 0;
$show = '';
$range = Request::any('range', 'currentyear');
while ($row = $result_stmt->fetch(PDO::FETCH_ASSOC)) {
$http = $row['http'];
$ftp = $row['ftp_up'] + $row['ftp_down'];
$mail = $row['mail'];
$traf['byte'] = $http + $ftp + $mail;
$traffic_complete['http'] += $http;
$traffic_complete['ftp'] += $ftp;
$traffic_complete['mail'] += $mail;
$traf['day'] = $row['day'] . '.';
if (extension_loaded('bcmath')) {
$traf['ftptext'] = bcdiv($row['ftp_up'], 1024, Settings::Get('panel.decimal_places')) . " MiB up/ " . bcdiv($row['ftp_down'], 1024, Settings::Get('panel.decimal_places')) . " MiB down (FTP)";
$traf['httptext'] = bcdiv($http, 1024, Settings::Get('panel.decimal_places')) . " MiB (HTTP)";
$traf['mailtext'] = bcdiv($mail, 1024, Settings::Get('panel.decimal_places')) . " MiB (Mail)";
$traf['ftp'] = bcdiv($ftp, 1024, Settings::Get('panel.decimal_places'));
$traf['http'] = bcdiv($http, 1024, Settings::Get('panel.decimal_places'));
$traf['mail'] = bcdiv($mail, 1024, Settings::Get('panel.decimal_places'));
$traf['byte'] = bcdiv($traf['byte'], 1024, Settings::Get('panel.decimal_places'));
} else {
$traf['ftptext'] = round($row['ftp_up'] / 1024, Settings::Get('panel.decimal_places')) . " MiB up/ " . round($row['ftp_down'] / 1024, Settings::Get('panel.decimal_places')) . " MiB down (FTP)";
$traf['httptext'] = round($http / 1024, Settings::Get('panel.decimal_places')) . " MiB (HTTP)";
$traf['mailtext'] = round($mail / 1024, Settings::Get('panel.decimal_places')) . " MiB (Mail)";
$traf['http'] = round($http, Settings::Get('panel.decimal_places'));
$traf['ftp'] = round($ftp, Settings::Get('panel.decimal_places'));
$traf['mail'] = round($mail, Settings::Get('panel.decimal_places'));
$traf['byte'] = round($traf['byte'] / 1024, Settings::Get('panel.decimal_places'));
if ($page == 'current') {
$range = 'currentmonth';
}
eval("\$traffic.=\"" . getTemplate('traffic/traffic_month') . "\";");
$show = $lng['traffic']['months'][intval($row['month'])] . ' ' . $row['year'];
try {
$context = Traffic::getCustomerStats($userinfo, $range);
} catch (Exception $e) {
Response::dynamicError($e->getMessage());
}
$traffic_complete['http'] = size_readable($traffic_complete['http'] * 1024, 'GiB', 'bi', '%01.'.(int)Settings::Get('panel.decimal_places').'f %s');
$traffic_complete['ftp'] = size_readable($traffic_complete['ftp'] * 1024, 'GiB', 'bi', '%01.'.(int)Settings::Get('panel.decimal_places').'f %s');
$traffic_complete['mail'] = size_readable($traffic_complete['mail'] * 1024, 'GiB', 'bi', '%01.'.(int)Settings::Get('panel.decimal_places').'f %s');
eval("echo \"" . getTemplate('traffic/traffic_details') . "\";");
} else {
$result_stmt = Database::prepare("SELECT `month`, `year`, SUM(`http`) AS http, SUM(`ftp_up`) AS ftp_up, SUM(`ftp_down`) AS ftp_down, SUM(`mail`) AS mail
FROM `" . TABLE_PANEL_TRAFFIC . "`
WHERE `customerid` = :customerid
GROUP BY CONCAT(`year`,`month`)
ORDER BY CONCAT(`year`,`month`) DESC
LIMIT 12"
);
Database::pexecute($result_stmt, array("customerid" => $userinfo['customerid']));
$traffic_complete['http'] = 0;
$traffic_complete['ftp'] = 0;
$traffic_complete['mail'] = 0;
while ($row = $result_stmt->fetch(PDO::FETCH_ASSOC)) {
$http = $row['http'];
$ftp_up = $row['ftp_up'];
$ftp_down = $row['ftp_down'];
$mail = $row['mail'];
$traffic_complete['http'] += $http;
$traffic_complete['ftp'] += $ftp_up + $ftp_down;
$traffic_complete['mail'] += $mail;
$traf['month'] = $row['month'];
$traf['year'] = $row['year'];
$traf['monthname'] = $lng['traffic']['months'][intval($row['month'])] . " " . $row['year'];
$traf['byte'] = $http + $ftp_up + $ftp_down + $mail;
if (extension_loaded('bcmath')) {
$traf['ftptext'] = bcdiv($ftp_up, 1024, Settings::Get('panel.decimal_places')) . " MiB up/ " . bcdiv($ftp_down, 1024, Settings::Get('panel.decimal_places')) . " MiB down (FTP)";
$traf['httptext'] = bcdiv($http, 1024, Settings::Get('panel.decimal_places')) . " MiB (HTTP)";
$traf['mailtext'] = bcdiv($mail, 1024, Settings::Get('panel.decimal_places')) . " MiB (Mail)";
$traf['ftp'] = bcdiv(($ftp_up + $ftp_down), 1024, Settings::Get('panel.decimal_places'));
$traf['http'] = bcdiv($http, 1024, Settings::Get('panel.decimal_places'));
$traf['mail'] = bcdiv($mail, 1024, Settings::Get('panel.decimal_places'));
$traf['byte'] = bcdiv($traf['byte'], 1024 * 1024, Settings::Get('panel.decimal_places'));
} else {
$traf['ftptext'] = round($ftp_up / 1024, Settings::Get('panel.decimal_places')) . " MiB up/ " . round($ftp_down / 1024, Settings::Get('panel.decimal_places')) . " MiB down (FTP)";
$traf['httptext'] = round($http / 1024, Settings::Get('panel.decimal_places')) . " MiB (HTTP)";
$traf['mailtext'] = round($mail / 1024, Settings::Get('panel.decimal_places')) . " MiB (Mail)";
$traf['ftp'] = round(($ftp_up + $ftp_down) / 1024, Settings::Get('panel.decimal_places'));
$traf['http'] = round($http / 1024, Settings::Get('panel.decimal_places'));
$traf['mail'] = round($mail / 1024, Settings::Get('panel.decimal_places'));
$traf['byte'] = round($traf['byte'] / (1024 * 1024), Settings::Get('panel.decimal_places'));
}
eval("\$traffic.=\"" . getTemplate('traffic/traffic_traffic') . "\";");
}
$traffic_complete['http'] = size_readable($traffic_complete['http'] * 1024, 'GiB', 'bi', '%01.'.(int)Settings::Get('panel.decimal_places').'f %s');
$traffic_complete['ftp'] = size_readable($traffic_complete['ftp'] * 1024, 'GiB', 'bi', '%01.'.(int)Settings::Get('panel.decimal_places').'f %s');
$traffic_complete['mail'] = size_readable($traffic_complete['mail'] * 1024, 'GiB', 'bi', '%01.'.(int)Settings::Get('panel.decimal_places').'f %s');
eval("echo \"" . getTemplate('traffic/traffic') . "\";");
}
// pass metrics to the view
UI::view('user/traffic.html.twig', $context);

149
dns_editor.php Normal file
View File

@@ -0,0 +1,149 @@
<?php
/**
* This file is part of the Froxlor project.
* Copyright (c) 2010 the Froxlor Team (see authors).
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, you can also view it online at
* https://files.froxlor.org/misc/COPYING.txt
*
* @copyright the authors
* @author Froxlor team <team@froxlor.org>
* @license https://files.froxlor.org/misc/COPYING.txt GPLv2
*/
if (!defined('AREA')) {
header("Location: index.php");
exit();
}
use Froxlor\Api\Commands\DomainZones;
use Froxlor\Dns\Dns;
use Froxlor\UI\Collection;
use Froxlor\UI\HTML;
use Froxlor\UI\Listing;
use Froxlor\UI\Panel\UI;
use Froxlor\UI\Request;
use Froxlor\UI\Response;
// This file is being included in admin_domains and customer_domains
// and therefore does not need to require lib/init.php
$domain_id = (int)Request::any('domain_id');
$record = isset($_POST['dns_record']) ? trim($_POST['dns_record']) : null;
$type = isset($_POST['dns_type']) ? $_POST['dns_type'] : 'A';
$prio = isset($_POST['dns_mxp']) ? (int)$_POST['dns_mxp'] : null;
$content = isset($_POST['dns_content']) ? trim($_POST['dns_content']) : null;
$ttl = isset($_POST['dns_ttl']) ? (int)$_POST['dns_ttl'] : 18000;
// get domain-name
$domain = Dns::getAllowedDomainEntry($domain_id, AREA, $userinfo);
$errors = "";
$success_message = "";
// action for adding a new entry
if ($action == 'add_record' && !empty($_POST)) {
try {
DomainZones::getLocal($userinfo, [
'id' => $domain_id,
'record' => $record,
'type' => $type,
'prio' => $prio,
'content' => $content,
'ttl' => $ttl
])->add();
$success_message = lng('success.dns_record_added');
$record = $prio = $content = "";
} catch (Exception $e) {
$errors = str_replace("\n", "<br>", $e->getMessage());
}
} elseif ($action == 'delete') {
$entry_id = isset($_GET['id']) ? (int)$_GET['id'] : 0;
HTML::askYesNo('dnsentry_reallydelete', $filename, [
'id' => $entry_id,
'domain_id' => $domain_id,
'page' => $page,
'action' => 'deletesure'
], '', [
'section' => 'domains',
'page' => $page,
'domain_id' => $domain_id
]);
} elseif (isset($_POST['send']) && $_POST['send'] == 'send' && $action == 'deletesure' && !empty($_POST)) {
$entry_id = isset($_POST['id']) ? (int)$_POST['id'] : 0;
$domain_id = isset($_POST['domain_id']) ? (int)$_POST['domain_id'] : 0;
// remove entry
if ($entry_id > 0 && $domain_id > 0) {
try {
DomainZones::getLocal($userinfo, [
'entry_id' => $entry_id,
'id' => $domain_id
])->delete();
// success message (inline)
$success_message = lng('success.dns_record_deleted');
} catch (Exception $e) {
$errors = str_replace("\n", "<br>", $e->getMessage());
}
}
}
// select all entries
try {
$dns_list_data = include_once dirname(__FILE__) . '/lib/tablelisting/tablelisting.dns.php';
$collection = (new Collection(DomainZones::class, $userinfo, ['id' => $domain_id]))
->withPagination($dns_list_data['dns_list']['columns'], $dns_list_data['dns_list']['default_sorting'], ['domain_id='.$domain_id]);
} catch (Exception $e) {
Response::dynamicError($e->getMessage());
}
try {
$json_result = DomainZones::getLocal($userinfo, [
'id' => $domain_id
])->get();
} catch (Exception $e) {
Response::dynamicError($e->getMessage());
}
$result = json_decode($json_result, true)['data'];
$zonefile = implode("\n", $result);
$dns_add_data = include_once dirname(__FILE__) . '/lib/formfields/formfield.dns_add.php';
UI::view('user/dns-editor.html.twig', [
'listing' => Listing::format($collection, $dns_list_data, 'dns_list', ['domain_id' => $domain_id]),
'actions_links' => [
[
'href' => $linker->getLink([
'section' => 'domains',
'page' => 'domains',
'action' => 'edit',
'id' => $domain_id
]),
'label' => lng('admin.domain_edit'),
'icon' => 'fa-solid fa-pen'
],
[
'href' => $linker->getLink(['section' => 'domains', 'page' => 'domains']),
'label' => lng('panel.backtooverview'),
'icon' => 'fa-solid fa-reply'
]
],
'formaction' => $linker->getLink(['section' => 'domains', 'action' => 'add_record', 'domain_id' => $domain_id]),
'formdata' => $dns_add_data['dns_add'],
// alert-box
'type' => (!empty($errors) ? 'danger' : (!empty($success_message) ? 'success' : 'warning')),
'alert_msg' => (!empty($errors) ? $errors : (!empty($success_message) ? $success_message : lng('dns.howitworks'))),
'zonefile' => $zonefile,
]);

View File

@@ -0,0 +1,67 @@
<?php
/**
* This file is part of the Froxlor project.
* Copyright (c) 2010 the Froxlor Team (see authors).
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, you can also view it online at
* https://files.froxlor.org/misc/COPYING.txt
*
* @copyright the authors
* @author Froxlor team <team@froxlor.org>
* @license https://files.froxlor.org/misc/COPYING.txt GPLv2
*/
class FroxlorAPI
{
private string $url;
private string $key;
private string $secret;
private ?array $lastError = null;
private ?string $lastStatusCode = null;
public function __construct($url, $key, $secret)
{
$this->url = $url;
$this->key = $key;
$this->secret = $secret;
}
public function request($command, array $data = [])
{
$payload = [
'command' => $command,
'params' => $data
];
$ch = curl_init($this->url);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_USERPWD, $this->key . ":" . $this->secret);
curl_setopt($ch, CURLOPT_TIMEOUT, 30);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($payload));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$result = curl_exec($ch);
$this->lastStatusCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
return json_decode($result ?? curl_error($ch), true);
}
public function getLastStatusCode(): ?string
{
return $this->lastStatusCode;
}
}

View File

@@ -0,0 +1,46 @@
<?php
// include FroxlorAPI helper class
require __DIR__ . '/FroxlorAPI.php';
// create object of FroxlorAPI with URL, apikey and apisecret
$fapi = new FroxlorAPI('http://127.0.0.1/api.php', 'your-api-key', 'your-api-secret');
// customer data
$data = [
'new_loginname' => 'test',
'email' => 'test@froxlor.org',
'firstname' => 'Test',
'name' => 'Testman',
'customernumber' => 1337,
'new_customer_password' => 's0mEcRypt1cpassword' . uniqid()
];
// send request
$response = $fapi->request('Customers.add', $data);
// check for error
if ($fapi->getLastStatusCode() != 200) {
echo "HTTP-STATUS: " . $fapi->getLastStatusCode() . PHP_EOL;
echo "Description: " . $response['message'] . PHP_EOL;
exit();
}
// view response data
var_dump($response);
/*
array(60) {
["customerid"]=>
string(1) "1"
["loginname"]=>
string(4) "test"
["password"]=>
string(63) "$5$asdasdasd.asdasd"
["adminid"]=>
string(1) "1"
["name"]=>
string(7) "Testman"
["firstname"]=>
string(4) "Test"
[...]
*/

0
doc/example/index.html Normal file
View File

View File

@@ -0,0 +1,20 @@
<?php
// include FroxlorAPI helper class
require __DIR__ . '/FroxlorAPI.php';
// create object of FroxlorAPI with URL, apikey and apisecret
$fapi = new FroxlorAPI('http://localhost/api.php', 'your-api-key', 'your-api-secret');
// send request
$response = $fapi->request('Froxlor.listFunctions');
// check for error
if ($fapi->getLastStatusCode() != 200) {
echo "HTTP-STATUS: " . $fapi->getLastStatusCode() . PHP_EOL;
echo "Description: " . $response['message'] . PHP_EOL;
exit();
}
// view response data
var_dump($response);

0
doc/index.html Normal file
View File

117
error_report.php Normal file
View File

@@ -0,0 +1,117 @@
<?php
/**
* This file is part of the Froxlor project.
* Copyright (c) 2010 the Froxlor Team (see authors).
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, you can also view it online at
* https://files.froxlor.org/misc/COPYING.txt
*
* @copyright the authors
* @author Froxlor team <team@froxlor.org>
* @license https://files.froxlor.org/misc/COPYING.txt GPLv2
*/
if (!defined('AREA')) {
header("Location: index.php");
exit();
}
use Froxlor\FileDir;
use Froxlor\Froxlor;
use Froxlor\UI\Panel\UI;
use Froxlor\UI\Request;
use Froxlor\UI\Response;
use Froxlor\Database\Database;
// This file is being included in admin_domains and customer_domains
// and therefore does not need to require lib/init.php
$errid = Request::any('errorid');
if (!empty($errid)) {
// read error file
$err_dir = FileDir::makeCorrectDir(Froxlor::getInstallDir() . "/logs/");
$err_file = FileDir::makeCorrectFile($err_dir . "/" . $errid . "_sql-error.log");
if (file_exists($err_file)) {
$error_content = file_get_contents($err_file);
$error = explode("|", $error_content);
$_error = [
'code' => str_replace("\n", "", substr($error[1], 5)),
'message' => str_replace("\n", "", substr($error[2], 4)),
'file' => str_replace("\n", "", substr($error[3], 5 + strlen(Froxlor::getInstallDir()))),
'line' => str_replace("\n", "", substr($error[4], 5)),
'trace' => str_replace(Froxlor::getInstallDir(), "", substr($error[5], 6))
];
// build mail-content
$mail_body = "Dear froxlor-team,\n\n";
$mail_body .= "the following error has been reported by a user:\n\n";
$mail_body .= "-------------------------------------------------------------\n";
$mail_body .= $_error['code'] . ' ' . $_error['message'] . "\n\n";
$mail_body .= "File: " . $_error['file'] . ':' . $_error['line'] . "\n\n";
$mail_body .= "Trace:\n" . trim($_error['trace']) . "\n\n";
$mail_body .= "-------------------------------------------------------------\n\n";
$mail_body .= "User-Area: " . AREA . "\n";
$mail_body .= "Froxlor-version: " . Froxlor::VERSION . "\n";
$mail_body .= "DB-version: " . Froxlor::DBVERSION . "\n\n";
try {
$mail_body .= "Database: " . Database::getAttribute(PDO::ATTR_SERVER_VERSION);
} catch (\Exception $e) {
/* ignore */
}
$mail_body .= "End of report";
$mail_html = nl2br($mail_body);
// send actual report to dev-team
if (isset($_POST['send']) && $_POST['send'] == 'send') {
// send mail and say thanks
$_mailerror = false;
try {
$mail->Subject = '[Froxlor] Error report by user';
$mail->AltBody = $mail_body;
$mail->MsgHTML($mail_html);
$mail->AddAddress('error-reports@froxlor.org', 'Froxlor Developer Team');
$mail->Send();
} catch (\PHPMailer\PHPMailer\Exception $e) {
$mailerr_msg = $e->errorMessage();
$_mailerror = true;
} catch (Exception $e) {
$mailerr_msg = $e->getMessage();
$_mailerror = true;
}
if ($_mailerror) {
// error when reporting an error...LOLFUQ
Response::standardError('send_report_error', $mailerr_msg);
}
// finally remove error from fs
@unlink($err_file);
Response::standardSuccess('sent_error_report', '', ['filename' => 'index.php']);
}
// show a nice summary of the error-report
// before actually sending anything
UI::view('user/error_report.html.twig', [
'mail_html' => $mail_body,
'errorid' => $errid
]);
} else {
Response::redirectTo($filename);
}
} else {
Response::redirectTo($filename);
}

992
index.php

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

0
install/index.html Normal file
View File

View File

@@ -4,19 +4,66 @@
* This file is part of the Froxlor project.
* Copyright (c) 2010 the Froxlor Team (see authors).
*
* For the full copyright and license information, please view the COPYING
* file that was distributed with this source code. You can also view the
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* @copyright (c) the authors
* @author Michael Kaufmann <mkaufmann@nutime.de>
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Install
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, you can also view it online at
* https://files.froxlor.org/misc/COPYING.txt
*
* @copyright the authors
* @author Froxlor team <team@froxlor.org>
* @license https://files.froxlor.org/misc/COPYING.txt GPLv2
*/
require 'lib/class.FroxlorInstall.php';
use Froxlor\Http\RateLimiter;
use Froxlor\UI\Panel\UI;
use Froxlor\Install\Install;
$frxinstall = new FroxlorInstall();
$frxinstall->run();
require dirname(__DIR__) . '/lib/functions.php';
// define default theme for configurehint, etc.
$_deftheme = 'Froxlor';
// validate correct php version
if (version_compare("7.4.0", PHP_VERSION, ">=")) {
die(view($_deftheme . '/misc/phprequirementfailed.html.twig', [
'{{ basehref }}' => '../',
'{{ froxlor_min_version }}' => '7.4.0',
'{{ current_version }}' => PHP_VERSION,
'{{ current_year }}' => date('Y', time()),
]));
}
// validate vendor autoloader
if (!file_exists(dirname(__DIR__) . '/vendor/autoload.php')) {
die(view($_deftheme . '/misc/vendormissinghint.html.twig', [
'{{ basehref }}' => '../',
'{{ froxlor_install_dir }}' => dirname(__DIR__),
'{{ current_year }}' => date('Y', time()),
]));
}
// check installation status
if (file_exists(dirname(__DIR__) . '/lib/userdata.inc.php')) {
header("Location: ../");
exit;
}
require dirname(__DIR__) . '/vendor/autoload.php';
require dirname(__DIR__) . '/lib/tables.inc.php';
// init twig
UI::initTwig(true);
UI::sendHeaders();
RateLimiter::run(true);
$installer = new Install();
$installer->handle();

File diff suppressed because it is too large Load Diff

View File

@@ -1,88 +0,0 @@
<?php
/**
* This file is part of the Froxlor project.
* Copyright (c) 2003-2009 the SysCP Team (see authors).
* Copyright (c) 2010 the Froxlor Team (see authors).
*
* For the full copyright and license information, please view the COPYING
* file that was distributed with this source code. You can also view the
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
*
* @copyright (c) the authors
* @author Florian Lippert <flo@syscp.org> (2003-2009)
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Language
*
*/
$lng['requirements']['title'] = 'Checking system requirements...';
$lng['requirements']['installed'] = 'installed';
$lng['requirements']['not_true'] = 'no';
$lng['requirements']['notfound'] = 'not found';
$lng['requirements']['notinstalled'] = 'not installed';
$lng['requirements']['activated'] = 'enabled';
$lng['requirements']['phpversion'] = 'PHP version >= 5.3';
$lng['requirements']['phpmagic_quotes_runtime'] = 'magic_quotes_runtime...';
$lng['requirements']['phpmagic_quotes_runtime_description'] = 'PHP setting "magic_quotes_runtime" must be set to "Off". We have disabled it temporary for now please fix the coresponding php.ini.';
$lng['requirements']['phppdo'] = 'PHP PDO extension and PDO-MySQL driver...';
$lng['requirements']['phpxml'] = 'PHP XML-extension...';
$lng['requirements']['phpfilter'] = 'PHP filter-extension...';
$lng['requirements']['phpposix'] = 'PHP posix-extension...';
$lng['requirements']['phpbcmath'] = 'PHP bcmath-extension...';
$lng['requirements']['phpcurl'] = 'PHP curl-extension...';
$lng['requirements']['bcmathdescription'] = 'Traffic-calculation related functions will not work correctly!';
$lng['requirements']['curldescription'] = 'Version-check and news-feed may not work correctly!';
$lng['requirements']['openbasedir'] = 'open_basedir...';
$lng['requirements']['openbasedirenabled'] = 'Froxlor will not work properly with open_basedir enabled. Please disable open_basedir for Froxlor in the coresponding php.ini';
$lng['requirements']['diedbecauseofrequirements'] = 'Cannot install Froxlor without these requirements! Try to fix them and retry.';
$lng['requirements']['froxlor_succ_checks'] = 'All requirements are satisfied';
$lng['install']['lngtitle'] = 'Froxlor install - choose language';
$lng['install']['language'] = 'Installation language';
$lng['install']['lngbtn_go'] = 'Change language';
$lng['install']['title'] = 'Froxlor install - setup';
$lng['install']['welcometext'] = 'Thank you for choosing Froxlor. Please fill out the following fields with the required information to start the installation.<br /><b>Attention:</b> If the database you chose for Froxlor already exists on your System, it will be erased with all containing data!';
$lng['install']['database'] = 'Database connection';
$lng['install']['mysql_host'] = 'MySQL-Hostname';
$lng['install']['mysql_database'] = 'Database name';
$lng['install']['mysql_unpriv_user'] = 'Username for the unprivileged MySQL-account';
$lng['install']['mysql_unpriv_pass'] = 'Password for the unprivileged MySQL-account';
$lng['install']['mysql_root_user'] = 'Username for the MySQL-root-account';
$lng['install']['mysql_root_pass'] = 'Password for the MySQL-root-account';
$lng['install']['admin_account'] = 'Administrator Account';
$lng['install']['admin_user'] = 'Administrator Username';
$lng['install']['admin_pass1'] = 'Administrator Password';
$lng['install']['admin_pass2'] = 'Administrator-Password (confirm)';
$lng['install']['serversettings'] = 'Server settings';
$lng['install']['servername'] = 'Server name (FQDN, no ip-address)';
$lng['install']['serverip'] = 'Server IP';
$lng['install']['webserver'] = 'Webserver';
$lng['install']['apache2'] = 'Apache 2';
$lng['install']['lighttpd'] = 'LigHTTPd';
$lng['install']['nginx'] = 'NGINX';
$lng['install']['httpuser'] = 'HTTP username';
$lng['install']['httpgroup'] = 'HTTP groupname';
$lng['install']['testing_mysql'] = 'Checking MySQL-root access...';
$lng['install']['testing_mysql_fail'] = 'There seems to be a problem with the database-connection. Cannot continue. Please go back and check your credentials.';
$lng['install']['backup_old_db'] = 'Creating backup of old database...';
$lng['install']['backup_binary_missing'] = 'Could not find mysqldump';
$lng['install']['backup_failed'] = 'Could not backup database';
$lng['install']['prepare_db'] = 'Preparing database...';
$lng['install']['create_mysqluser_and_db'] = 'Creating database and username...';
$lng['install']['testing_new_db'] = 'Testing if database and user have been created correctly...';
$lng['install']['importing_data'] = 'Importing data...';
$lng['install']['changing_data'] = 'Adjusting settings...';
$lng['install']['creating_entries'] = 'Inserting new values...';
$lng['install']['adding_admin_user'] = 'Creating admin-account...';
$lng['install']['creating_configfile'] = 'Creating configfile...';
$lng['install']['creating_configfile_temp'] = 'File was saved in /tmp/userdata.inc.php, please move to lib/.';
$lng['install']['creating_configfile_failed'] = 'Could not create lib/userdata.inc.php, please create it manually with the following content:';
$lng['install']['froxlor_succ_installed'] = 'Froxlor was installed successfully.';
$lng['click_here_to_refresh'] = 'Click here to check again';
$lng['click_here_to_goback'] = 'Click here to go back';
$lng['click_here_to_continue'] = 'Click here to continue';
$lng['click_here_to_login'] = 'Click here to login.';

View File

@@ -1,88 +0,0 @@
<?php
/**
* This file is part of the Froxlor project.
* Copyright (c) 2003-2009 the SysCP Team (see authors).
* Copyright (c) 2010 the Froxlor Team (see authors).
*
* For the full copyright and license information, please view the COPYING
* file that was distributed with this source code. You can also view the
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
*
* @copyright (c) the authors
* @author Florian Lippert <flo@syscp.org> (2003-2009)
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Language
*
*/
$lng['requirements']['title'] = 'Prüfe Systemvoraussetzungen...';
$lng['requirements']['installed'] = 'installiert';
$lng['requirements']['not_true'] = 'nein';
$lng['requirements']['notfound'] = 'nicht gefunden';
$lng['requirements']['notinstalled'] = 'nicht installiert';
$lng['requirements']['activated'] = 'ist aktiviert.';
$lng['requirements']['phpversion'] = 'PHP Version >= 5.3';
$lng['requirements']['phpmagic_quotes_runtime'] = 'magic_quotes_runtime';
$lng['requirements']['phpmagic_quotes_runtime_description'] = 'Die PHP Einstellung "magic_quotes_runtime" muss deaktiviert sein ("Off"). Die Einstellung wurde temporär deaktiviert, bitte ändern Sie diese in der entsprechenden php.ini.';
$lng['requirements']['phppdo'] = 'PHP PDO Erweiterung und PDO-MySQL Treiber...';
$lng['requirements']['phpxml'] = 'PHP XML-Erweiterung...';
$lng['requirements']['phpfilter'] = 'PHP filter-Erweiterung...';
$lng['requirements']['phpposix'] = 'PHP posix-Erweiterung...';
$lng['requirements']['phpbcmath'] = 'PHP bcmath-Erweiterung...';
$lng['requirements']['phpcurl'] = 'PHP curl-Erweiterung...';
$lng['requirements']['bcmathdescription'] = 'Traffic-Berechnungs bezogene Funktionen stehen nicht vollständig zur Verfügung!';
$lng['requirements']['curldescription'] = 'Versions-Prüfung und News-Feed stehen nicht vollständig zur Verfügung!';
$lng['requirements']['openbasedir'] = 'open_basedir genutzt wird...';
$lng['requirements']['openbasedirenabled'] = 'Froxlor wird mit aktiviertem open_basedir nicht vollständig funktionieren. Bitte deaktivieren Sie open_basedir für Froxlor in der entsprechenden php.ini';
$lng['requirements']['diedbecauseofrequirements'] = 'Kann Froxlor ohne diese Voraussetzungen nicht installieren! Beheben Sie die angezeigten Probleme und versuchen Sie es erneut.';
$lng['requirements']['froxlor_succ_checks'] = 'Alle Vorraussetzungen sind erfüllt';
$lng['install']['lngtitle'] = 'Froxlor Installation - Sprache auswählen';
$lng['install']['language'] = 'Sprache für die Installation';
$lng['install']['lngbtn_go'] = 'Sprache ändern';
$lng['install']['title'] = 'Froxlor Installation - Einrichtung';
$lng['install']['welcometext'] = 'Vielen Dank dass Sie sich für Froxlor entschieden haben. Um die Installation von Froxlor zu starten, füllen Sie bitte alle Felder mit den geforderten Angaben aus.<br /><b>Achtung:</b> Eine eventuell existierende Datenbank, die den selben Namen hat wie den Gewählten, wird mit allen enthaltenen Daten gelöscht!';
$lng['install']['database'] = 'Datenbankverbindung';
$lng['install']['mysql_host'] = 'MySQL-Hostname';
$lng['install']['mysql_database'] = 'Datenbank Name';
$lng['install']['mysql_unpriv_user'] = 'Benutzername für den unprivilegierten MySQL-Account';
$lng['install']['mysql_unpriv_pass'] = 'Passwort für den unprivilegierten MySQL-Account';
$lng['install']['mysql_root_user'] = 'Benutzername für den MySQL-Root-Account';
$lng['install']['mysql_root_pass'] = 'Passwort für den MySQL-Root-Account';
$lng['install']['admin_account'] = 'Admin-Zugang';
$lng['install']['admin_user'] = 'Administrator-Benutzername';
$lng['install']['admin_pass1'] = 'Administrator-Passwort';
$lng['install']['admin_pass2'] = 'Administrator-Passwort (Bestätigung)';
$lng['install']['serversettings'] = 'Servereinstellungen';
$lng['install']['servername'] = 'Servername (FQDN, keine IP-Adresse)';
$lng['install']['serverip'] = 'Server-IP';
$lng['install']['webserver'] = 'Webserver';
$lng['install']['apache2'] = 'Apache 2';
$lng['install']['lighttpd'] = 'LigHTTPd';
$lng['install']['nginx'] = 'NGINX';
$lng['install']['httpuser'] = 'HTTP Username';
$lng['install']['httpgroup'] = 'HTTP Gruppenname';
$lng['install']['testing_mysql'] = 'Teste MySQL-Root Zugang...';
$lng['install']['testing_mysql_fail'] = 'Bei der Verwendung der Datenbank gibt es scheinbar Probleme. Installation kann nicht fortgesetzt werden. Bitte Zugangsdaten prüfen und erneut versuchen.';
$lng['install']['backup_old_db'] = 'Sicherung vorheriger Datenbank...';
$lng['install']['backup_binary_missing'] = 'Konnte mysqldump nicht finden';
$lng['install']['backup_failed'] = 'Sicherung fehlgeschlagen';
$lng['install']['prepare_db'] = 'Datenbank wird vorbereitet...';
$lng['install']['create_mysqluser_and_db'] = 'Erstelle Datenbank und Benutzer...';
$lng['install']['testing_new_db'] = 'Teste, ob Datenbank und Benutzer korrekt angelegt wurden...';
$lng['install']['importing_data'] = 'Importiere Daten...';
$lng['install']['changing_data'] = 'Einstellungen anpassen...';
$lng['install']['creating_entries'] = 'Trage neue Werte ein...';
$lng['install']['adding_admin_user'] = 'Erstelle Admin-Benutzer...';
$lng['install']['creating_configfile'] = 'Erstelle Konfigurationsdatei...';
$lng['install']['creating_configfile_temp'] = 'Datei wurde in /tmp/userdata.inc.php gespeichert, bitte nach lib/ verschieben.';
$lng['install']['creating_configfile_failed'] = 'Konnte lib/userdata.inc.php nicht erstellen, bitte manuell mit folgendem Inhalt anlegen:';
$lng['install']['froxlor_succ_installed'] = 'Froxlor wurde erfolgreich installiert.';
$lng['click_here_to_refresh'] = 'Hier klicken, um erneut zu prüfen';
$lng['click_here_to_goback'] = 'Einen Schritt zurück';
$lng['click_here_to_continue'] = 'Installation fortführen';
$lng['click_here_to_login'] = 'Hier geht es weiter zum Login-Fenster.';

View File

@@ -1,155 +0,0 @@
<?php
/**
* This file is part of the SysCP project.
* Copyright (c) 2003-2007 the SysCP Team (see authors).
*
* For the full copyright and license information, please view the COPYING
* file that was distributed with this source code. You can also view the
* COPYING file online at http://files.syscp.org/misc/COPYING.txt
*
* @copyright (c) the authors
* @author Martin Burchert <eremit@syscp.org>
* @license GPLv2 http://files.syscp.org/misc/COPYING.txt
* @package System
*
*/
// some configs
$baseLanguage = 'english.lng.php';
// Check if we're in the CLI
if(@php_sapi_name() != 'cli'
&& @php_sapi_name() != 'cgi'
&& @php_sapi_name() != 'cgi-fcgi'
) {
die('This script will only work in the shell.');
}
// Check argument count
if (sizeof($argv) != 2) {
print_help($argv);
exit;
}
// Load the contents of the given path
$path = $argv[1];
$files = array();
if ($dh = opendir($path)) {
while (false !== ($file = readdir($dh))) {
if ($file != "."
&& $file != ".."
&& !is_dir($file)
&& preg_match('/(.+)\.lng\.php/i', $file)
) {
$files[$file] = str_replace('//', '/', $path . '/' . $file);
}
}
closedir($dh);
} else {
print "ERROR: The path you requested cannot be read! \n ";
print "\n";
print_help();
exit;
}
// check if there is the default language defined
if (!isset($files[$baseLanguage])) {
print "ERROR: The baselanguage cannot be found! \n";
print "\n";
print_help();
exit;
}
// import the baselanguage
$base = import($files[$baseLanguage]);
// and unset it in the files, because we don't need to compare base to base
unset($files[$baseLanguage]);
// compare each language with the baselanguage
foreach ($files as $key => $file) {
$comp = import($file);
print "\n\nComparing " . $baseLanguage . " to " . $key . "\n";
$result = compare($base, $comp);
if (is_array($result)
&& sizeof($result) > 0
) {
print " found missing strings: \n";
foreach ($result as $value) {
print " " . $value . "\n";
}
} else {
print " no missing strings found! \n ";
}
print "\nReverse Checking " . $key . " to " . $baseLanguage . "\n";
$result = compare($comp, $base);
if (is_array($result)
&& sizeof($result) > 0
) {
print " found strings not in basefile: \n";
foreach ($result as $key => $value) {
print " " . $value . "\n";
}
} else {
print " There are no strings which are not in the basefile! \n ";
}
}
//-----------------------------------------------------------------------------------------
// FUNCTIONS
//-----------------------------------------------------------------------------------------
/**
* prints the help screen
*
* @param array $argv
*/
function print_help($argv) {
print "Usage: php " . $argv[0] . " /PATH/TO/LNG \n";
print " \n ";
}
function import($file) {
$input = file($file);
$return = array();
foreach ($input as $key => $value) {
if (!preg_match('/^\$/', $value)) {
unset($input[$key]);
} else {
// generate the key
$key = preg_replace('/^\$lng\[\'(.*)=(.*)$/U', '\\1', $value);
$key = str_replace('[\'', '/', $key);
$key = trim(str_replace('\']', '', $key));
//generate the value
$value = trim($value);
// set the result
$return[$key] = $value;
}
}
return $return;
}
function compare($array1, $array2) {
$result = array();
foreach ($array1 as $key => $value) {
if (!isset($array2[$key])) {
$result[$key] = $value;
}
}
return $result;
}

View File

@@ -1,559 +0,0 @@
@charset "UTF-8";
/* RESET */
html,body,div,ul,ol,li,dl,dt,dd,h1,h2,h3,h4,h5,h6,pre,form,p,blockquote,fieldset,input { margin:0; padding:0; }
h1,h2,h3,h4,h5,h6,pre,code,address,caption,cite,code,em,strong,th { font-size:1em; font-weight:400; font-style:normal; }
ul,ol { list-style:none; }
fieldset,img { border:none; }
caption,th { text-align:left; }
table { border-collapse:collapse; border-spacing:0; }
article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section { display:block; }
/* TYPE */
html,body {
font:12px/18px Helvetica,Arial,Verdana,sans-serif;
background-color:#f2f2f2;
color:#333;
-webkit-font-smoothing: antialiased;
}
body {
margin:0;
padding:0;
}
.dark {
background-color: #e9edf0;
border-bottom:1px solid #d1d5d8;
}
header img {
padding:10px 0 10px 10px;
}
h1 {
display:none;
}
h2, h3 {
margin: 0 0 1em 0;
padding: 0;
font-weight: bold;
}
h2 {
font-size:17px;
}
h3 {
font-size: 15px;
}
img {
border:0;
vertical-align:middle;
}
td a {
text-decoration:none;
}
.bradius {
border-radius: 5px 5px 5px 5px;
box-shadow: rgba(0, 0, 0, 0.34902) 0px 1px 3px 0px;
}
/* FOOTER */
footer {
clear:both;
text-align:center;
color: #888;
font-size:10px !important;
margin: 10px 0;
}
footer a,footer a:active,footer a:visited {
color: #888;
}
.install {
background-color:#fff;
margin: 20px;
margin-left: auto;
margin-right: auto;
margin-bottom: 12px;
width: 800px;
}
p {
margin: 0 10px !important;
}
.installsec {
margin-top:10px;
padding:0;
text-align:left;
}
.installsec table {
width:100%;
padding:0 10px;
margin: 15px 0 15px 0;
}
.installsec h2 {
display: block;
border-bottom: 1px solid #d1d5d8;
margin: 0;
padding: 5px 15px 15px 15px;
}
.installsec form {
width:800px;
margin:0 auto;
padding:10px 0 0;
text-align:left;
}
.installsec fieldset {
border:0;
float:left;
clear:left;
width:600px;
margin:0 100px 10px;
padding:0;
}
.installsec legend {
display:none;
}
.installsec label {
float:left;
margin-right:0;
margin-top:8px;
text-align:left;
}
p.submit {
text-align:right;
padding-right:46px;
}
.installsec aside {
border-top:1px solid #d1d5d8;
clear:both;
float:none;
width:auto;
text-align: right;
padding: 10px;
}
.line {
border: 0;
width: 800px;
border-bottom:1px solid #d1d5d8;
}
.messagewrapper {
width:650px;
margin:0 auto;
padding:120px 0 0;
overflow:hidden;
}
.messagewrapperfull {
width:100%;
margin:0 auto;
padding:0;
overflow:hidden;
}
.overviewsearch {
position:absolute;
top:155px;
right:36px;
font-size:80%;
}
.overviewadd {
padding:10px;
font-weight:700;
}
/*
* error message display
*/
.errorcontainer {
background:url(../img/icons/error_big.png) 10px center no-repeat #ffedef;
border:1px solid #ffc2ca;
padding:10px 10px 10px 68px!important;
margin: 10px 0 10px 0 !important;
text-align:left!important;
overflow:hidden;
box-shadow: 0px 0px 0px black;
}
.errortitle {
font-weight:700;
color:#c00!important;
}
.error {
font-weight:400!important;
color:#c00!important;
}
/*
* warning message display
*/
.warningcontainer,.ui-dialog {
background:url(../img/icons/warning_big.png) 10px center no-repeat #fffecc;
border:1px solid #f3c37e;
padding:10px 10px 10px 68px !important;
margin: 10px 0 10px 0 !important;
text-align:left!important;
overflow:hidden;
box-shadow: 0px 0px 0px black;
}
.ui-dialog {
padding: 10px !important;
}
.warningtitle,.ui-dialog-titlebar {
font-weight:700;
color:#D57D00;
}
.warning,.ui-dialog-content {
color:#D57D00!important;
}
/*
* success message display
*/
.successcontainer {
background:url(../img/icons/ok_big.png) 10px center no-repeat #E2F9E3;
border:1px solid #9C9;
padding:10px 10px 10px 68px!important;
margin: 10px 0 10px 0 !important;
text-align:left!important;
overflow:hidden;
box-shadow: 0px 0px 0px black;
}
.successtitle {
font-weight:700;
color:#060!important;
}
.success {
font-weight:400!important;
}
/*
* neutral/info message display
*/
.neutralcontainer {
background:url(../img/icons/info_big.png) 10px center no-repeat #d2eaf6;
border:1px solid #b7d8ed;
padding:10px 10px 10px 68px!important;
margin: 10px 0 10px 0 !important;
text-align:left!important;
overflow:hidden;
box-shadow: 0px 0px 0px black;
}
.neutraltitle {
font-weight:700;
color:#3188c1!important;
}
.neutral {
font-weight:400!important;
color:#3188c1!important;
}
/* std hyperlink */
a,a:active,a:visited {
color:#176fa1;
text-decoration:none;
}
a:hover {
text-decoration:underline;
}
.infotext {
font-size:11px;
}
/*
* main container
*/
.main {
margin-left:240px;
margin-right:10px;
margin-top:105px;
margin-bottom:0;
background-color:#fff;
padding: 30px 30px 30px 30px;
min-height:400px;
}
.noborder {
width:100%;
border-spacing:0;
border-collapse:separate;
border: 0;
}
.noborder td {
border:0;
}
table {
width:100%;
border-spacing:0;
border:1px solid #d1d5d8;
border-collapse:separate;
box-shadow:0px 0px 0px black !important;
}
table thead th, table th {
border-top: 1px solid #d1d5d8;
border-bottom: 1px solid #d1d5d8;
height: 25px !important;
padding: 5px 0px 5px 8px;
background-color: #e9edf0;
font-weight: bold;
}
table thead:first-child th, table:first-child th {
border-top: none !important;
}
table th {
border-top: 0;
}
th a:hover {
text-decoration: none;
}
th a img {
}
th a:nth-child(odd) img {
position: relative;
top: -5px;
left: 4px;
}
th a:nth-child(even) img {
position: relative;
top: 3px;
left: -7px;
}
table thead:first-child th {
border-top: 0;
}
.disabled td, .disabled td a {
color: #cfcfcf;
}
table tbody td {
border-bottom:1px dotted #ccc;
}
table tbody tr:last-child td {
border-bottom: 0;
}
.formtable {
width: 100%;
border-spacing:0;
border:0;
border-collapse:separate;
margin:0 0 0;
}
.formtable tbody td {
border:0;
border-bottom:1px dotted #ccc;
min-height: 20px;
}
.formtable label {
float:none;
display:block;
padding:0;
margin:0;
width:100%;
text-align:left;
}
td {
padding-top:5px;
padding-left:10px;
padding-right: 10px;
padding-bottom:5px;
min-height: 20px;
}
table tfoot td {
height:25px;
border-top: 1px solid #d1d5d8;
background-color: #f2f8fa;
}
.tfootleft {
text-align:left;
}
.maintitle {
padding-top:20px;
}
/* input elements */
input {
background: #fff url(../img/text_align_left.png) no-repeat 5px 4px;
color: #333;
padding:2px 4px 2px 24px;
height:22px;
border: 1px solid #d9d9d9;
margin-bottom: 5px;
border-radius: 3px;
}
textarea {
background:#fff url(../img/text_align_left.png) no-repeat 5px 4px;
color: #333;
padding:4px 4px 2px 24px;
border:1px solid #d9d9d9;
margin-bottom: 5px;
border-radius: 3px;
}
input[type="password"] {
background:#fff url(../img/password.png) no-repeat 5px 4px;
}
/*
* BUTTONS
*/
input[type="button"],input[type="submit"],input[type="reset"] {
margin: 0 5px;
padding: 5px 14px;
outline: 0;
border: 0;
background-color: #eee;
min-width: 80px;
height: 26px;
background-image: none;
border-width: 0px;
}
.loginsec input[type="button"], .loginsec input[type="submit"], .loginsec input[type="reset"] {
margin: 0 1px;
}
input[type="button"]:hover,input[type="submit"]:hover,input[type="reset"]:hover {
color: #333;
background-color: #dcdcdc;
}
input[type="button"]:active,input[type="submit"]:active,input[type="reset"]:active {
-webkit-box-shadow: inset 0 1px 8px rgba(0, 0, 0, 0.25);
-moz-box-shadow: inset 0 1px 8px rgba(0, 0, 0, 0.25);
box-shadow: inset 0 1px 8px rgba(0, 0, 0, 0.25);
color: white !important;
}
input[type="submit"],input[class="yesbutton"] {
color: white;
background-color: #35aa47;
}
input[type="submit"]:hover,input[class="yesbutton"]:hover {
color: white;
background-color: #1d943b;
}
input[class="submit"]:active,input[class="yesbutton"]:active {
background-color: #35aa47;
}
input[class="nobutton"],input[type="reset"] {
color: white;
background-color: #d84a38;
}
input[class="nobutton"]:hover,input[type="reset"]:hover {
color: white;
background-color: #c53727;
}
input[class="nobutton"]:active,input[type="reset"]:active {
background-color: #dd4b39;
}
input[type="checkbox"] {
background:#dae7ee;
padding: 0;
margin: 0 5px 0 0;
vertical-align: middle;
height: 26px;
}
input[type="radio"] {
margin: 0 10px 0 10px;
height:22px;
}
select {
background:#fff;
padding:4px;
color: #333;
border:1px solid #d9d9d9;
margin-bottom: 5px;
min-width: 100px;
}
select.dropdown {
padding: 2px 4px 2px 24px;
height: 26px;
border: 1px solid #d9d9d9;
margin-bottom: 5px;
border-radius: 3px;
background: url(../../../../templates/Sparkle/assets/img/icons/down.png) no-repeat 9px;
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
}
.maintable {
width:90%;
}
.update_progess {
padding:2em;
text-align:left;
}
.preconfig {
text-align:left;
margin-top:20px;
margin-bottom:5px;
margin-right:15px;
margin-left:15px;
}
.preconfigitem {
padding:.15em;
border-bottom:1px solid #ccc;
}
.preconfdesc {
display:block;
margin-bottom:.5em;
font-size:120%;
}
.installprogress {
width: 100%;
background-color:#e4e4e4;
height:5px;
border-bottom:1px solid #d1d5d8;
}
.installprogress .bar {
background-color: #35aa47;
height:5px;
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 198 B

View File

@@ -1,10 +0,0 @@
<p style="margin: 20px 20px 0 !important">{$this->_lng['install']['title']}</p>
<form action="{$formaction}" method="get">
<fieldset>
{$formdata}
<p class="submit">
<input type="hidden" name="check" value="1" />
<input type="submit" name="chooselang" value="{$this->_lng['install']['btn_go']}" />
</p>
</fieldset>
</form>

View File

@@ -1,13 +0,0 @@
<p style="margin: 20px 20px 0 !important">{$this->_lng['install']['welcometext']}</p>
<form action="{$formaction}" method="post">
<hr class="line">
<fieldset>
{$formdata}
</fieldset>
<aside>
<input type="hidden" name="check" value="1" />
<input type="hidden" name="language" value="{$language}" />
<input type="hidden" name="installstep" value="1" />
<input class="bottom" type="submit" name="submitbutton" value="{$this->_lng['click_here_to_continue']}" />
</aside>
</form>

View File

@@ -1,4 +0,0 @@
<p>
<label for="{$fieldname}" style="width:65%;{$style}">{$fieldlabel}:</label>&nbsp;
<input type="{$type}" name="{$fieldname}" id="{$fieldname}" value="{$fieldvalue}" {$required} />
</p>

View File

@@ -1,4 +0,0 @@
<p>
<label for="{$fieldname}" style="width:65%;{$style}">{$this->_lng['install']['webserver']} {$fieldlabel}:</label>
<input type="radio" name="webserver" id="{$fieldname}" value="{$fieldname}" {$checked} /><span>{$fieldlabel}<span>
</p>

Some files were not shown because too many files have changed in this diff Show More