Commit graph

88 commits

Author SHA1 Message Date
tadhgboyle
145c8bc1c2
Remove internal deprecations (#3630)
* Remove internal deprecations

* add convert profile posts task + remove dead lang_charset references

* guard og_image usages

* fix

* add note about mailhog

* revert group sync manager for time being

* review amendments

* fox
2025-05-04 14:08:21 -07:00
Sam
c1610d11c8
Add uninstall option to modules (#3449)
* Add uninstall option to modules

* style: styleci fixes

* feat: allow removing files from uploads directory

* fix: uninstall module amendments
2024-06-07 23:12:58 +01:00
tadhgboyle
0c80570609
Enable StyleCI (#3475)
* Create StyleCI config file

* Disable `phpdoc_separation`

* Apply fixes from StyleCI (#3476)

Co-authored-by: StyleCI Bot <bot@styleci.io>

* style: styleci fixes

---------

Co-authored-by: StyleCI Bot <bot@styleci.io>
Co-authored-by: Sam <samerton@users.noreply.github.com>
2024-03-09 11:19:55 +00:00
Tadhg Boyle
d0fba0cbe9
Replace Util::getSetting/Util::setSetting usages (#3387) 2023-06-12 10:30:49 -06:00
Robin
691a722320
Setting constants (#3232)
* Setting constants

* Tidy following merge

* Fix indentation

---------

Co-authored-by: samerton <samerton@users.noreply.github.com>
2023-04-22 09:48:06 +01:00
Tadhg Boyle
9cecbe2301
Create Members module with member list page (#3106) 2023-03-07 08:26:53 -08:00
Robin
382c2e33d2
Remove code scheduled for removal in 2.1.0 (#3165)
* Remove code scheduled for removal in 2.1.0

* bring back the party function

* Use urlencode

* Remove `Queries.php` from backtrace check

---------

Co-authored-by: Tadhg Boyle <tadhgsmboyle@gmail.com>
2023-02-21 15:43:09 +01:00
Tadhg Boyle
e87ad5de86
Fix Util::setSetting cache not being updated (#3221)
* Fix `setSetting` cache not being updated

* Use reference

* Fix minecraft panel page using outdated constant

Co-authored-by: Robin <robin+git@rkslot.nl>
2023-01-24 11:39:53 +01:00
Robin
66432c2f2a
Remove group sync info from user info endpoint (#3194)
* Remove group sync info from user info endpoint

* Also remove sync info from groupinfoendpoint
2023-01-17 14:27:55 +01:00
Tadhg Boyle
cdd7d85686
Better module/template version check (#2994) 2022-08-07 10:33:44 -07:00
Tadhg Boyle
3726a17ab9
Make update check more resilient to API being down (#2987) 2022-08-07 10:33:26 -07:00
samerton
4dffdeb3fa Fix issues with setSetting for core module 2022-08-06 11:15:31 +01:00
samerton
dc251191f2 Return empty string from Util::readFileEnd if file is empty 2022-08-05 17:54:43 +01:00
Robin
e2da55c359 Update doc 2022-07-26 09:04:09 +02:00
Robin
ec8af98a60 non-nullable $module, use 'core' string instead of null 2022-07-26 08:58:20 +02:00
Robin
b07ecb2188 Fix indentation 2022-06-25 14:16:42 +02:00
Robin
14a0fb37c1 Add module column to settings table 2022-06-20 21:00:10 +02:00
Tadhg Boyle
5e07ac2d70 Create and utilize Text class, add deprecation warnings 2022-06-13 22:44:01 -06:00
Tadhg Boyle
307096fb54 Create and utilize HttpUtils class 2022-06-13 22:24:43 -06:00
Tadhg Boyle
a839f78b05 Misc 2022-06-12 20:39:39 -06:00
Tadhg Boyle
3df85ce05a Swap Config class to prefer paths seperated by . 2022-06-12 20:35:45 -06:00
Robin
7f6fc69c3e Bring back trusted proxies, somewhat securly
Ideal situation: Completely deny ALL requests with a proxy header if no trusted proxies are configured. Force proper configuration.

After Samerton's change just before pr13: If not configured (there is no warning), anyone can bypass IP checks, like for IP bans. Just to be clear: this affects EVERYONE, not just people with or without a proxy.

Situation now: If not configured, only the actual client address is trusted, not any header. This means users are not able to bypass IP bans, but if an admin bans a user, if that site uses a proxy, and if trusted proxies is not configured, they wil ban the proxy, meaning all users will be ip-banned. A warning is displayed in StaffCP if trusted proxies is not configured.
2022-06-12 23:15:54 +02:00
Robin
95dd115e17 Workaround for broken determineOrder() for empty arrays 2022-06-11 20:58:44 +02:00
Robin
c3173ee26f Fix syntax error 2022-06-11 13:08:17 +02:00
Robin
a30c3f829e Never return null protocol, fix #2846 2022-06-11 13:05:02 +02:00
Robin
1e007bebe8 Don't check trusted proxy for protocol and port
Spoofing these values is not a security issue and the config is not available when getProtocol() is called during the installer
2022-06-08 09:43:44 +02:00
Robin
67090bdeb4 fix return type 2022-06-05 23:49:33 +02:00
Robin
e278348c87 Fix CLI install error, there may not be any address/proto/port
this happened when a curl error occured during minecraft uuid request, resulting it getting the IP for logging
2022-06-05 23:47:37 +02:00
Robin
6b6da8e398 Remove unused isConnectionSSL
getProtocol() should be (and is) used instead
2022-06-05 23:19:12 +02:00
samerton
03e33cb819 Log warning instead of stopping script if no proxies configured 2022-06-02 21:50:53 +01:00
Tadhg Boyle
e332a3f88d
Support new update api (#2808)
* Support new update api

* Fix announcement editing

* PR suggestions

Co-authored-by: samerton <samerton@users.noreply.github.com>
2022-06-02 20:17:48 +01:00
samerton
eba881731a Add support for determining load before/after for assets 2022-06-02 17:58:22 +01:00
Robin
f9f62fd14b add defaults 2022-06-01 19:28:10 +02:00
Robin
6f5501e2d5 Allow modules to use getSetting and setSetting 2022-06-01 19:26:15 +02:00
Robin
8b343720a0 Fix issues reported by phpstan 2022-06-01 10:13:40 +02:00
Robin
ccfceae349 fix query 2022-06-01 00:13:03 +02:00
Robin
475ab83e6d Retrieve all settings in one go, then read from cache 2022-05-31 23:35:11 +02:00
Robin
0126159a6e Remove all manual settings usage 2022-05-31 23:23:26 +02:00
Robin
a36579c64d Remove redundant db instance param 2022-05-31 23:01:59 +02:00
Robin
77f89bed7f Fix port if statement 2022-05-31 21:54:47 +02:00
Robin
55204bc716 Replace queries usage 2022-05-31 21:11:21 +02:00
Robin
4db66bc750 explode will always return least one element 2022-05-27 21:06:32 +02:00
Robin
1865332a78 Also include trusted proxies from environment in debug info 2022-05-27 20:37:21 +02:00
Robin
74ae70c40e Proper parsing of Forwarded/X-Forwarded-For headers 2022-05-27 18:13:54 +02:00
Robin
2862ed6407 Support 'CF-Connecting-IP' and 'Forwarded' headers 2022-05-27 17:21:22 +02:00
Robin
61a147f2c6
Use proxy headers, properly, securely (#2688)
Co-authored-by: Tadhg Boyle <tadhgsmboyle@gmail.com>
2022-05-26 22:40:11 -06:00
Robin
2045e699c9
Merge pull request #2729 from NamelessMC/db-update
`InteractsWithDatabase` trait cleanup
2022-05-15 12:38:32 +00:00
Tadhg Boyle
7b5b91bebc Better docs for Util::bold(...) 2022-05-11 22:01:11 -06:00
Robin
36b83c3beb Merge branch 'v2' into db-update 2022-05-11 11:45:20 +02:00
Tadhg Boyle
c176f1fbf6 Display MariaDB/MySQL server version in StaffCP & send to stats 2022-05-10 22:01:23 -06:00