Commit Graph

41 Commits

Author SHA1 Message Date
Aurora Lahtela 09279cbb66
React html customization / public_html folder (#2862)
* Add public_html folder, configuration and access methods to it
* Make Frontend BETA static resource resolution prefer public_html
* Add resolver for getting any file in public_html from webserver
* Test customized bundle loading from public_html
* Update gradle wrapper to 7.6
* Wrote scripts to React build or run dev server through gradle
* Disable cyclomatic-complexity check on PublicHtmlResolver
* Throw bad request exception on IllegalPathException
* Throw bad request exception on bad chars in URI query
2023-02-05 12:08:29 +02:00
Aurora Lahtela 813abd040a Add 'Data_gathering.Preserve_join_address_case' setting (default false)
- Allows preserving case information of gathered join addresses
- Only affects future data
2022-09-03 12:15:54 +03:00
Aurora Lahtela 72ff23176c Increase default inactive player removal threshold to 10 years
Affects issues:
- #2553
2022-08-16 19:19:30 +03:00
Rsl1122 2b478e58c0 Turn config to valid yaml
- Moved all config settings with values in non leaf-nodes to leaf-nodes
  - Time units (Now .Time and .Unit)
  - Feature toggles (Now .Enabled)
- Wrote tests to ensure non-leaf node values are not used

Affects issues:
- Fixed #1363
2022-07-09 19:07:29 +03:00
Aurora Lahtela 6aae823850 Implement Access log functionality to Plan
- Store access log in database, clean logs after 30 days by default
- Add Webserver.Security.Access_log.Print_to_console setting
- Add Webserver.Security.Access_log.Remove_logs_after_days setting

Affects issues:
- Close #2328
2022-06-24 11:09:14 +03:00
Aurora Lahtela 3822155b40
Frontend BETA: Rewrite Player page with React (#2312)
* Add extension data to /v1/player endpoint
* Use node gradle plugin for building with yarn
* Add /v1/whoami endpoint
* Add back button to sidebar
* Selenium Tests for locale related js errors
* Convert locale system to use YAML-based storage
* Added a conversion process that runs on startup
* Replace cravatar.eu with crafatar.com for skins (more reliable)
* Add the Header made by Kopo to React

Co-authored-by: Antti Koponen <koponen942@outlook.com>

Affected issues:
- Resolve #1733
- Fixed #1092
- Resolve #1895
- Resolve #1965
- Partial #2260 
- Partial #2099
2022-04-06 17:37:23 +03:00
Risto Lahtela 7dd2dff8cf Change player head image url to use UUID by default 2022-02-02 14:10:53 +02:00
Risto Lahtela be18734186 Add a config setting for player head img url
- Added config setting Display_options.Player_head_img_url

Affects issues:
- Close #2243
2022-02-02 11:14:15 +02:00
Risto Lahtela 5c618099af Added web-dev related settings
- Customized_files.Path can now be used to choose where Html Customized files are placed
  (Change this to `"<absolute path to git repo>/Plan/common/src/main/resources/assets/plan/web"`
   for easy time developing)
- Customized_files.Enable_web_dev_mode can be used to enable modifications of all files
  as well as bypass resource caching for instant updates on browser refresh.

Adding new files still needs recompiling the plugin, but this should speed up
modifications to existing parts of the website considerably.

- #2098
2021-09-26 14:50:14 +03:00
Risto Lahtela 13cbca6639 Added World Alias Regex setting
This allows grouping worlds together by matching a regex and avoiding thousands of lines if
some plugin generates worlds automatically.

Affects issues:
- Close #1656
2021-07-24 11:39:28 +03:00
untuned ad935d7381
Update secret key link for Buycraft (#1998) 2021-07-11 18:01:38 +03:00
Risto Lahtela e90606b68a
5.4: Java 16 support, remove H2 (#1932)
* Stop downloading dependencies at startup, include them instead
* 5.4: Removed H2
* Platform Abstraction Layer 5.0.0, delete dependency downloading
* Removed some unnecessary native sqlite drivers
* Serve jquery via CDN

Affects issues:
- Fixes #1886
- Close #1908 (No longer relevant, library no longer included)
2021-06-12 10:21:38 +03:00
Risto Lahtela fb4b272844 Implemented persistent cookies
Fixed security vulnerability with cookies not being invalidated properly
  Request headers were not properly set for the Request object,
  leading to the Cookie header missing when logging out, which then left
  the cookie in memory. Rogue actor who gained access to the cookie could then
  use the cookie to access the panel.

Made cookie expiry configurable with 'Webserver.Security.Cookie_expires_after'

Due to cookie persistence there is no way to log everyone out of the panel.
  This will be addressed in a future commit with addition of a command.

Affects issues:
- Close #1740
2021-03-20 12:02:02 +02:00
Risto Lahtela e1bffbcc1f
Swap Abstract Plugin Framework for Platform Abstraction Layer library (#1787)
Replaced Abstract Plugin Framework with Platform Abstraction Layer

Large amount of changes due to removal of features from the library,
and change of the way the abstraction is achieved.
Removes features from Plan:

    Removed debug logging (Considered useless when debugging issues)
    Removed /debug page (Considered useless when debugging issues)
    Removed enable timing (Benchmarking utility was removed from the library)
2021-03-09 11:36:07 +02:00
Risto Lahtela 576ea45462 Added a setting to limit max MySQL connections
Affects issues:
- Close #1754
2021-02-12 11:50:39 +02:00
Risto Lahtela f5a9d03da9 Reduced refresh barrier down to 15 seconds 2021-02-10 13:11:13 +02:00
Risto Lahtela aca573e353 Removed file cache setting 2021-02-10 13:11:02 +02:00
Risto Lahtela 3619ff814a JSON File storage clean task
- Cleans query files
- Cleans other json files that are old
2021-02-10 13:11:01 +02:00
Risto Lahtela 49f6b7708f Made update threshold configurable 2021-02-10 13:11:00 +02:00
Risto Lahtela 76fe304dbd Replaced old links to repository with new one 2021-01-29 09:51:44 +02:00
Risto Lahtela f14dfe7a7c Added a setting to allow X-Forwarded-For to be used for IP security
Affects following features:
- IP Whitelist
- Password bruteforce guard

Affects issues:
- Close #1716
2021-01-24 15:59:50 +02:00
Risto Lahtela ca9a5cee93 Implemented IP Whitelist
Whitelist allows limiting which IP addresses can view the page.

Affects issues:
- Close #1405
2020-06-19 17:25:02 +03:00
Risto Lahtela c5ecc4fbbd Added serverTimezone to default MySQL Launch Options
Affects issues:
- Close #1495
2020-06-19 16:31:42 +03:00
Risto Lahtela 9af7d689b2 H2 user and pass field. Deprecated warning.
- Fixes move from h2 to mysql

Affects issues:
- #1472
- Fixed #1111
2020-06-07 13:14:56 +03:00
Risto Lahtela d09a4016d3 Rewrote error logging code
- The new error logging only creates one log per error and has context
with the error if specified.
- Any duplicate lines in error stacktrace are not taken into account
when hashing to avoid recursive function errors being logged in different
files

Affects issues:
- Close #1246
2020-05-14 12:18:12 +03:00
Risto Lahtela 1159f67f28 Decreased default log-file cleanup threshold 2020-05-13 10:32:36 +03:00
Risto Lahtela 154cfc4a2b Added config setting to disable disk gathering
'Data_gathering.Disk_space' default 'true'

Also fixed all performance average calculations where -1
might be present

Affects issues:
- Close #1360
2020-03-13 10:28:47 +02:00
Rsl1122 380f848f62 Added 'Webserver.Security.Disable_authentication' setting.
This is a feature flag to not have authentication even when
https has been enabled.

Affects issues:
- Close #1264
2020-01-21 16:33:56 +02:00
Rsl1122 16a5b41db5 Implemented new GeoLite2 & IP2C geolocators
- GeoLite2 downloads the file using License key, only if EULA is accepted
- Fallback to IP2C if GeoLite2 is not available
- Remove GeoIP.dat after successfully downloading GeoLite2-Country.mmdb
- Added case where geolocation fails to enable and doesn't cause issues

- Adds Apache commons-compress to the dependencies because of a tar archive

Affects issues:
- Fixed #1273
2020-01-17 21:11:02 +02:00
Rsl1122 13e00543c2 Implemented Access-Control-Allow-Origin
- Added Config setting Webserver.Security.CORS.Allow_origin
- Webserver returns the header for all requests
- Added an HTTP 204 response for OPTIONS-method to speed up CORS requests.

Affects issues:
- Close #1251
2019-12-16 12:36:14 +02:00
Rsl1122 10411c0626 Implemented a TimeZone setting
TimeZone setting accepts 'GMT+2', 'GMT-05:30', 'UTC' and 'server'

Accidentally discovered a bug where first boot used UTC when default was
supposed to be server timezone. The bug was fixed by removing
PlanConfig#getTimeZone calls in different constructors.

Affects issues:
- Close #718
2019-12-07 13:00:07 +02:00
Risto Lahtela dcf47f1120
Removed comment from Webserver.Disable_Webserver (#1180) 2019-10-06 11:38:32 +03:00
Rsl1122 a567d87cdd Old extension data removed after configurable time
Affects issues:
- Close #1131
2019-09-26 18:24:40 +03:00
Rsl1122 f27aece88b Disabled Bukkit/Sponge webserver if Proxy in db 2019-09-21 12:17:04 +03:00
Rsl1122 3a3ba7e801 Scheduled Export of Server pages 2019-09-03 09:32:35 +03:00
Rsl1122 22a5348e33 Removed proxy<->server connections:
Removed InfoSystem
- Removed /plan m setup
- Removed /planbungee setup
- Removed /planbungee con
- Removed /plan m con
- Removed all InfoRequests
- Removed /info web endpoint
- Removed ConnectionLog

Removed two config settings:
- Display of session accordion as table
  (Accordion is table now)
- Display of most played world on sessions
  (Always displayed now)

Removed html generation java code for player page
tables

Deprecated PlayerDeath related things

Removed AnalysisContainer data, and
server HealthInformation

Affects issues:
- Close #840
2019-09-03 09:31:53 +03:00
Rsl1122 9a69463fa8 Changed default db back to SQLite 2019-07-25 11:13:22 +03:00
Rsl1122 d81a2932ec [#1034] Setting for ping gathering 2019-05-09 15:41:33 +03:00
Rsl1122 0b3dad1d40 Added settings for removal of TPS and Ping data. 2019-04-30 10:22:18 +03:00
Rsl1122 b642432b1c Default db on Bukkit/Sponge: SQLite -> H2
This will only affect new installs.

Affected issue: #996
2019-04-23 12:53:54 +03:00
Rsl1122 74bf3901bc Moved everything in /assets/ to /assets/plan 2019-04-03 23:30:41 +03:00