Commit Graph

4787 Commits

Author SHA1 Message Date
Risto Lahtela
bde57a0bdf Removed unnecessary parenthesis 2021-03-22 07:18:09 +02:00
Risto Lahtela
03782f18d5 Wrote an access control test for bypass checks
One bypass was discovered for detecting who has played on a server, where
403 is given for level 2 when user has played and 400 when they have not.
This was fixed.

One 500 error was discovered when the network has no proxy server, /v1/network/servers
ran into NullPointerException in a query.
2021-03-22 07:13:27 +02:00
Risto Lahtela
111affaa50 Implemented EnderCrystal kill detection for Sponge
Affects issues:
- #1571
2021-03-21 15:37:34 +02:00
Risto Lahtela
1f76e4a7c7 Implemented EnderCrystal kill detection for Nukkit
Affects issues:
- #1571
2021-03-21 14:58:05 +02:00
Risto Lahtela
89a3d63d8b Implemented EnderCrystal kill detection for Bukkit
Marks player EnderCrystal kills for a player and
also counts mobs killed with EnderCrystal explosions as mob kills for a player.

Affects issues:
- Close #1571
2021-03-21 14:49:14 +02:00
Risto Lahtela
8e0d833f3f Made filters more error-resilient for the future 2021-03-21 13:43:41 +02:00
Risto Lahtela
ac9ca5949e Fixed JSONStorage sometimes fetching the wrong thing 2021-03-21 12:10:27 +02:00
Risto Lahtela
19b64455b4 Catch UnsatisfiedLinkError when getting CPU usage
Affects issues:
- Fixed #1807
2021-03-21 11:12:24 +02:00
Risto Lahtela
624ed50054 Fixed order by related exception with some mysql versions 2021-03-21 11:09:53 +02:00
Creeperface01
0dd5d41955
Update nukkit module to support new PlaceholderAPI version (#1806) 2021-03-21 10:36:15 +02:00
Risto Lahtela
3e042c47b5
Update versions.txt 2021-03-21 09:23:01 +02:00
Risto Lahtela
15aca9aafa Sorted out loaders for graphs 2021-03-21 08:41:57 +02:00
Risto Lahtela
cbb2d328a1 Removed some unused code 2021-03-21 08:26:25 +02:00
Risto Lahtela
8624d86793 Added a Join Address filter to query page 2021-03-20 21:05:05 +02:00
Risto Lahtela
9ee2a15008 Wrote tests for ElementOrder serialization 2021-03-20 17:34:58 +02:00
Risto Lahtela
7f153efcfa Fixed AFK Tracker counting afk time for those with ignore permission when they use afk command 2021-03-20 17:26:34 +02:00
Risto Lahtela
0851055d22 Wrote a test for AveragePing class 2021-03-20 17:25:54 +02:00
Risto Lahtela
91aa9e7ca6 Added missing command name for logout command 2021-03-20 13:44:20 +02:00
Risto Lahtela
080d3697ff Clear previous test's cookies during test 2021-03-20 12:56:19 +02:00
Risto Lahtela
8fa4af5a61 Fixed tests running to NPE with runnable factory 2021-03-20 12:44:32 +02:00
Risto Lahtela
07cca1f008 Added a logout command
Permission: plan.logout.other
Usage: /plan logout * or /plan logout <username>

Used for forcing a logout for users.
2021-03-20 12:33:09 +02: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
a71d2f730f Unregister mysql driver after use
Affects issues:
- Fixed #1804
2021-03-19 17:45:52 +02:00
Risto Lahtela
b956a8f2ba Added warning when extension data can not be cleaned 2021-03-19 16:49:03 +02:00
Risto Lahtela
ebd6330ec1 Sort out weird time in DB clean task 2021-03-19 16:38:57 +02:00
Antti Koponen
aa1a35f794
Add a list of servers to the navbar (#1805)
Affects issues:
- Close #1790
2021-03-19 12:25:55 +02:00
Antti Koponen
428331de5b
Fixed URL hash handling with graph tabs (#1803)
Affects issues:
- Fixed 1736
2021-03-19 09:48:42 +02:00
Risto Lahtela
3ca98bb634 Enabled ExtensionsDatabaseTest again
Might hang in Github Actions, but remains to be seen if changes to
testing environment have fixed the test hanging
2021-03-18 11:27:45 +02:00
Risto Lahtela
7906126b5e Made fetchUserInformationOfUser return a Set instead of List
Fixes tests where there was some order-dependent stuff.
2021-03-18 10:15:39 +02:00
Antti Koponen
477c547c51
Fix page loader centering (#1802)
Affects issues:
- Fixed #1783
2021-03-18 09:25:50 +02:00
Risto Lahtela
aa25f2ff07 Fix issues caused by lowercasing of the join addresses 2021-03-17 16:19:26 +02:00
Risto Lahtela
ff679d626d Lowercase join addresses in the pie 2021-03-17 16:15:00 +02:00
Risto Lahtela
36bb989d7c Fixed network join address pie having duplicated address numbers
This would happen if player joined two game servers on a network
2021-03-17 16:11:15 +02:00
Risto Lahtela
7f2b23e711
Update versions.txt 2021-03-17 13:26:58 +02:00
Risto Lahtela
2f240bd7d9 Moved join address pie further down on server page 2021-03-17 11:42:26 +02:00
Risto Lahtela
0e8b8315a2 Use last index of : instead of first to remove port 2021-03-17 11:31:57 +02:00
Risto Lahtela
2bc15db6d0 Sort out player join address things
Applied some thought to how this stuff should work.
- nulls now possible in the column when value is not available
- Called "Join addresses" instead of hostnames
- Remove bogus data with a patch

- Proper hostname method for spigot
- Removed method calls from nukkit since there was nothing that sounded
  proper

Affects:
- Close #1798 (Copied all code over)
2021-03-17 11:31:27 +02:00
Risto Lahtela
443cb65274
Update versions.txt 2021-03-16 19:06:12 +02:00
Risto Lahtela
3711f0ca60 Fixed stackoverflow error 2021-03-16 18:30:12 +02:00
Risto Lahtela
62da72e6f1 Use paper method when available for hostname 2021-03-16 17:47:26 +02:00
Risto Lahtela
0ba6ff3d70 Update Host name every time player logs in 2021-03-16 17:40:48 +02:00
Risto Lahtela
316c973114
Fix html updating 2021-03-16 13:23:12 +02:00
Risto Lahtela
df50c10758
Update versions.txt 2021-03-16 13:19:52 +02:00
Risto Lahtela
2e753516e2 Revert changes to URIPathTest.java 2021-03-16 11:36:45 +02:00
Risto Lahtela
1c8fa4c18e Removed parameterized test names 2021-03-16 11:29:55 +02:00
Risto Lahtela
ebffd886fe Fixed parameterized test errors 2021-03-16 10:51:46 +02:00
Risto Lahtela
baab6e5f88 Fixing sonarcloud bugs and smells
Bugs fixed:
- LinkCommands: The return value of "orElseThrow" must be used.
- RegistrationCommands: Optional isPresent not same instance as Optional get

Smells fixed:
- Plan: "logger" is the name of a field in "JavaPlugin"
- PlayersTableJSONCreator: Reduce the total number of break and continue statements in this loop to use at most one.
- BukkitAFKListener, SpongeAFKListener, NukkitAFKListener, PlanAPI, CapabilityService: match the regular expression '^[a-z][a-zA-Z0-9]*$'
- TaskSystem: Reorder the modifiers to comply with the Java Language Specification.
- EntityNameFormatter: StringUtils.removeAll moved to RegExUtils.removeAll
- FiltersJSONResolver: fulfill compareTo contract
- ExportTask: Removed duplicate string literal
- FinishedSession.Id: Rename field "id"
2021-03-16 10:41:17 +02:00
Risto Lahtela
c54c3ce88b Fixed test compilation 2021-03-16 09:42:50 +02:00
Risto Lahtela
2e01758fd6 Fixed lag from host name lookup 2021-03-16 09:02:30 +02:00
Risto Lahtela
cf3fe26b8a
Update versions.txt 2021-03-15 18:34:39 +02:00