Commit Graph

221 Commits

Author SHA1 Message Date
Aurora Lahtela
12d22f945f Unregister placeholder api extension synchronously
Affects issues:
- Fixed #2841
2023-02-03 17:16:49 +02:00
Aurora Lahtela
88b4191f6b
Implement http caching (#2840)
* Implement first response parts of http caching
* Implement cached response for static resources
* Implement HTTP caching for json responses
* Fix last seen value for online players
* Implement http caching for pages (.html)
* Use placeholder cache even with async requests.

Affects issues:
- Close #2813
2023-01-22 10:18:14 +02:00
Aurora Lahtela
1f1a8e0de2 Unregister placeholder extension when Plan disables
Affects issues:
- Fixed #2833
2023-01-17 17:52:12 +02:00
Aurora Lahtela
38785a9505 Added Untrusted-annotation to be more careful around user given data
- Fixed SQL-injection vulnerability in an endpoint
- Fixed XSS on Whitelist deny 403 page
- Fixed XSS on Internal Error 500 page if untrusted data ends up in exception message
2023-01-14 23:25:35 +02:00
Aurora Lahtela
e3bea9ee77 Add online player names to player tab completion
Affects issues:
- Close #2216
2022-11-22 13:25:12 +02:00
Aurora Lahtela
a4a1001a8d Display new player name as light green in kills tables
Affects issues:
- Close #1262
2022-11-13 15:49:32 +02:00
Aurora Lahtela
5d2cbbd9cb Remove fml from join addresses 2022-11-11 21:21:09 +02:00
Aurora Lahtela
fd625b5002 Remove extra bits after \u0000 in join addresses
Affects issues:
- Fixed #2710
2022-11-08 16:38:09 +02:00
Aurora Lahtela
cbc880c1d3 Improve database error messages
- Don't log "database is closed" when query tries to execute after database close
- Log better error help when mysql fails to connect

Affects issues:
- Fixed #2499
2022-09-02 18:49:36 +03:00
Aurora Lahtela
3eff46523d Test and fix user move and combination transactions 2022-08-27 15:20:23 +03:00
Aurora Lahtela
b646e18c68
Fix fabric join address gathering (#2546)
- Refactored player online listeners to move common. often changed logic to common package
- Changed method fabric uses to get join address to use the client handshake packet which has the address
- Added command `/plan db removejoinaddresses {server}` to allow removing invalid join address data
- Changed build pipeline to always build jars even if tests fail
- Disabled one flaky test

Affects issues:
- Closed #817
- Fixed  #2526
2022-08-14 20:35:32 +03:00
Aurora Lahtela
37f11e3269 Remove PlanSystem#getErrorLogger
This code was improper use of dagger for dependency injection,
and could be fixed by introducing new method to Component classes
that gives the initialized ErrorLogger directly.
2022-07-15 08:34:18 +03:00
Aurora Lahtela
b0be4f296d Use plugin classloader for thread context when initializing system
This allows ServiceLoader to find slf4j-nop provider for Jetty
preventing SLF4J "No provider" error

Affects issues:
- Fixed #2438
2022-07-15 08:21:23 +03:00
Aurora Lahtela
8f239b010c
Add Swagger & Swagger UI (#2470)
* Adds swagger dependencies and annotations for json endpoints for documentation
* Add swagger ui to react project
* Access control to swagger endpoints
* Include swagger.json in jars using custom configuration

Also:
* Reworked project shadow configurations to avoid shadowing shadow versions of modules

Why: Extra dependencies were being included when using shadow scope

What:
- modules no longer depend on shadow configurations,
  which speeds up IDEA indexing after build considerably
  (No need to index *-all.jars)
- 'shadow' scope is now used for artifacts that need to be included
- 'shadow' scope is also 'api' so that modules that depend on common
  can import the libraries. This may cause issues in projects
  depending on Plan so this may need to be reconsidered
- Relocations and exclusions were moved to plugin module
  org.slf4j is now included in 2 locations which may cause issues.
  Needs testing with servers
- Found out that all Extension dependencies include junit as compile
  scope which caused it to be included.

Affects issues:
- Close #1890
2022-07-13 21:21:20 +03:00
Rsl1122
aa67794881 Remove unnecessary files from jar and relocate Jetty 2022-07-03 10:54:01 +03:00
Aurora Lahtela
92910d647a Revert API jar to Java 8 and update to Java 11 APIs 2022-06-18 11:31:53 +03:00
Aurora Lahtela
d34172412c Fix join address gathering
Affects issues:
- Fixed #2413
2022-06-11 19:02:36 +03:00
Aurora Lahtela
368f1e5002 Various fixes to transactions
- Hopefully fix user_id relation error once and for all.
- Set timezone to 00:00 properly when MySQL initializes connection

Affects issues:
- Close #1239
2022-05-26 21:51:22 +03:00
Aurora Lahtela
52b8afe6cb Store join addresses separately and link to plan_sessions table for time data.
Affects issues:
- #2362
2022-05-20 19:32:00 +03:00
Aurora Lahtela
69c54fb5cb Fix some issues with data registering for new users 2022-04-11 19:08:05 +03:00
Aurora Lahtela
47e74f5ad5 Use ConcurrentHashMap for ignore afk permission checks
Affects issues:
- Fixed #2289
2022-02-28 19:23:59 +02:00
Risto Lahtela
2ad3b20f36 Teardown session cache after use in AFKTracker tests 2022-02-05 09:47:43 +02:00
Risto Lahtela
2af2bfe2f5 Fix checkstyle issues 2022-02-03 18:37:29 +02:00
Risto Lahtela
ba24a2f2d9 Refresh placeholders set in the Plan config more often
Affects issue:
- Fixed #2225
2022-02-02 20:03:38 +02:00
Risto Lahtela
954ef59c0b Fix afk tracker tests 2022-01-31 21:05:47 +02:00
Risto Lahtela
036ec23c08 Disable Litebans Extension on game servers if installed on proxy
Affects issues:
- Close #2178
2022-01-30 20:28:17 +02:00
Risto Lahtela
a7478645bd Reduce the amount of tasks used for upkeep
- Ping gathering now uses a map of timestamps
  - Removes a task that waited for ping data to be reliable (one task / join)
- Cookie expiration now uses a map of timestamps
  - Removes a task that waited for cookie to expire (one task / login cookie)

Affects issues:
- Possibly fixed #1984
2022-01-06 15:43:48 +02:00
Risto Lahtela
6c0da9e167 Added some data pipelines, not in use yet 2021-11-21 20:10:27 +02:00
Aurora Lahtela
8fbf4bb161
Update PlayerOnlineListener.java 2021-11-20 10:09:20 +02:00
Aurora Lahtela
f1de7ad85e
Update PlayerOnlineListener.java 2021-11-19 17:12:50 +02:00
Aurora Lahtela
2f78f5528e
Fix NPE when gamemode is null on Mohist 2021-11-19 17:10:47 +02:00
Henri S
efd3b75a29
Database Driver downloading (#2144)
Affects issues:
- Fixed #1944
2021-10-31 13:16:47 +02:00
Aurora Lahtela
ebb1108969
Comment out slimjar related configuration (#2138) 2021-10-27 18:43:14 +03:00
Risto Lahtela
fd84341a77 Fixed 1.7 bukkit command support
Affects issues:
- Fixed #2105
2021-10-09 13:04:51 +03:00
Risto Lahtela
e762b8013f Prevent Arrays#asList#remove call
Affects issues:
- Fixed #2096
2021-09-22 19:22:19 +03:00
Risto Lahtela
a5c9a25444 Implemented server name support to server placeholders
Now all server placeholders (Pretty much 75% of all placeholders) can have :server name at the end

Example:
- %server_tps_day:Skyblock%
  or %server_tps_day:97cf2530-dc2f-4443-a245-90708b1deedb%
  or %server_tps_day:1%

Affects issues:
- Close #1323
2021-09-18 22:26:11 +03:00
Risto Lahtela
5dc3b39741 Catch NullPointerException thrown by some server class loaders
Affects issues:
- Fixed #2074
2021-09-18 21:30:29 +03:00
dependabot[bot]
e066ff7215
Bump io.github.slimjar from 1.2.1 to 1.2.2 in /Plan (#2043)
* Bump io.github.slimjar from 1.2.1 to 1.2.2 in /Plan

Bumps io.github.slimjar from 1.2.1 to 1.2.2.

---
updated-dependencies:
- dependency-name: io.github.slimjar
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

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

* Added vshnv.tech repository for including the slimjar library jar

* use papermc.io/repo for downloading slimjar dependencies

Affects issues:
- Resolved https://github.com/slimjar/slimjar/issues/52
- Resolved https://github.com/slimjar/slimjar/issues/53

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Risto Lahtela <24460436+AuroraLS3@users.noreply.github.com>
2021-08-08 09:21:44 +03:00
Antti Koponen
d29a94e6a4
Implement SlimJar as a runtime dependency downloader (#1990)
MySQL & SQLite are dynamically (down)loaded to the classpath instead of being shaded.

Affects issues:
- Close #1944
2021-08-07 15:29:54 +03:00
Emilia Dreamer
a90f003462
Notify about old versions of html customized files (#2014)
Affects issues:
- Close #1995
2021-07-23 17:17:35 +03:00
Risto Lahtela
6c26fc529e
Add server name to kill lists (#2013)
* Added server name to kill objects (and changed them a lot)
* Added server name to kill tables

Affects issues:
- Close #1437
2021-07-18 18:07:45 +03:00
Risto Lahtela
cd2d0fcb0f Write new html customized Plan web files when Plan enables (no overwrite)
Affects issues:
- Close #1745
2021-07-17 16:28:18 +03:00
Risto Lahtela
78209e99a6
Sonar cleanup for new smells (#1996)
* Rename "byKey" which hides the field declared at line 36.
* Define a constant instead of duplicating this literal "isStopped" 3 times.
* Remove this assignment of "pingMethodAvailable".
* Invoke method(s) only conditionally. Use the built-in formatting to construct this argument.
* Rename "getHandleMethod" which hides the field declared at line 36.

Make the enclosing method "static" or remove this set.
* Refactored some ping method things
* Rename "files" which hides the field declared at line 41.
* Add at least one assertion to this test case.
2021-07-10 14:52:24 +03:00
Risto Lahtela
28d35e0fed Remove debug exception logging calls 2021-07-09 08:07:05 +03:00
Risto Lahtela
f32cf95fc1 Fixed bukkit shutdown detection
Affects issues:
- Fixed #1970
2021-07-04 11:00:52 +03:00
Risto Lahtela
826b6da133 Put latency where it's supposed to be 2021-07-03 10:08:34 +03:00
Risto Lahtela
db0d3ff6ac Implemented more ways to get Ping on bukkit
Affects issues:
- Close #1962
2021-07-03 10:05:34 +03:00
Hasan Demirtaş
41e844cca1
Fix two sonarcloud issues. (#1936)
- Field can be static
- Unused import
2021-06-14 08:42:10 +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
fa4a2e6595
Gradle 7 Update by Kopo (#1931)
Updates gradle to version 7 and sorts out all the deprecated stuff

Affects issues:
- Clsoe #1871

Co-authored-by: Antti Koponen <koponen942@outlook.com>
2021-06-12 08:24:24 +03:00