Commit Graph

8 Commits

Author SHA1 Message Date
Aurora Lahtela bc4aef8b2b Add some missing javadocs to not generate warnings 2024-01-06 18:01:50 +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
Risto Lahtela ea2ae5d3e1 Linked web users to players or console
PageExtension API:
- Added WebUser#getUsername
- Changed WebUser#getName to return player's name or 'console'
- API version 5.1-R0.4
2020-05-03 23:26:01 +03:00
Rsl1122 4547272783 Replaced usages of String#split with StringUtils#split 2019-09-03 09:32:27 +03:00
Risto Lahtela 0650f3e338 Interface redesign package restructuring (#1146)
* command.commands -> command.subcommands

* command -> commands

* commands -> system.commands

* system.locale -> system.settings.locale

* system.settings.changes -> system.settings.config.changes

* system.settings.paths -> system.settings.config.paths

* system.database -> system.storage.database

* db -> system.storage.database

* system.storage.database.access.queries -> system.storage.database.queries

* system.storage.database.access.transactions -> system.storage.database.transactions

* system.storage.database.access -> system.storage.database.operation

* Moved Query classes to system.storage.database.queries

* Moved Executable classes to system.storage.database.transactions

* system.storage.database.patches -> system.storage.database.transactions.patches

* system.file -> system.storage.file

* system.settings.upkeep

* system.storage.upkeep

* system.server.info -> system.identification

* system.importing -> system.gathering.importing

* system.listeners -> system.gathering.listeners

* system.gathering.timed

* Removed duplicate class

* data.container -> system.gathering.domain

* data.plugin.PluginsConfigSection -> system.settings.config.ExtensionSettings

* data.time -> system.gathering.domain

* system.afk -> system.gathering.afk

* system.cache -> system.gathering.cache

* system.status -> system.gathering.listeners

* system.export -> system.delivery.export

* system.webserver -> system.delivery.webserver

* system.json -> system.delivery.rendering.json

* utilities.html -> system.delivery.rendering.html

* system.delivery.rendering.html.graphs -> system.delivery.rendering.json.graphs

* system.delivery.rendering.html.pages -> system.delivery.rendering.pages

* system.delivery.upkeep

* utilities.file -> system.settings.upkeep

* data.store -> system.delivery.domain

* system.update -> system.version

* api.exceptions -> exceptions

* ShutdownHook -> system.gathering

* system.HtmlUtilities - > system.delivery.DeliveryUtilities

* PeriodicAnalysisTask -> PeriodicServerExportTask

* Deprecated APIv4 classes

* Removed ServerTaskSystem (Reduces headache)

* Moved & Fixed some tests
2019-09-03 09:32:26 +03:00
Rsl1122 3629a62fcf Removed `@since` labels
These labels have not been kept up to date and some might contain
out of date information (Packages have changed etc.)
It is better to not include them than include bad information.
2018-12-16 14:49:43 +02:00
miclebrick adb57c0179 Removed dependency on javax.xml.bind.Datatypeconverter for Base64
javax.xml was removed in recent Java versions, so depending on it breaks
compatibility with servers running on them. The Base64 class is the way
to use Base64 serialization.
2018-12-03 07:43:03 -05:00
Risto Lahtela ebaffcab5e
[Merge] Module split (#786)
* Moved project files to 'common'-module

This is done so that refactoring into multiple smaller modules is easier
as the IDE will not attempt to move tests incorrectly when moving things
between different modules

* Created 'bukkit' module

Following classes were removed during the operation:
- BukkitServerInfo (Renamed to ServerServerInfo)
- SpongeServerInfo (could use ServerServerInfo)
- Hastebin (not viable on every platform, unused)
- HastebinTest
- MockPlayers (unused, bukkit specific)

Changes to classes:
- Renamed Importer to BukkitImporter (contained bukkit related impl.)
- Extracted Importer interface from BukkitImporter
- Turned BukkitPlanModule and BukkitClassBindingModule to interfaces by
  using @Binds annotation
- Added Status class since PlayersOnlineListener had a boolean,
  that stated if kicks were counted.

This commit completes split partially and was not pushed on commit.

* Created 'sponge' module

Changes to classes:
- Turned ServerSuperClassBindingModule, SuperClassBindingModule,
  SpongePlanModule and SpongeClassBindingModule to interfaces by
  using @Binds annotation
- Renamed SystemObjectBindingModule to SystemObjectProvidingModule
- Removed sponge related calls in ServerProperties
- Made EmptyImportSystem injectable

This commit completes split partially and was not pushed on commit.

* Changed shade configuration

Further tweaks required.

* Created 'bungeecord' module

Changes to classes:
- Removed use of BungeePingTimerTask in VelocityTaskSystem
- Removed use of RedisBungee in VelocityServerProperties
- Fixed bukkit command.commands.RegisterCommandFilter package

Changes to project structure:
- Dependency versions now in main pom via dependencyManagement
- Repositories now defined in main pom

* Created 'velocity' module

Changes to classes:
- Made RawDataResponse use Gson via reflection since it is no longer
  available in dependencies of 'common' module

* Created 'plugin' module

This module is for creating a single deployment artifact and testing of
system interactions.

Fixes to tests:
- Reflection no longer fails to initialize if Bukkit.getServer() is null
- PingCountTimerBukkit no longer fails to be created if Reflection fails
- Removed unnecessary @AfterClass from H2Test
- Jar resource path fixes to Mocker

* Shading configuration

org.slf4j classes are relocated in 'common', 'bukkit' & 'bungeecord'.
In 'sponge' & 'velocity' they are not relocated, allowing injection
as plugin logger, while using slf4j-nop for HikariCP logging.

This allows single release artifact.

* Removed 'Icon' from .gitignore

* Attempt to fix test resources

Because all jar resources are located in 'common', an attempt to fetch
them is made to common/target/Plan-common.jar, which for some reason
is a bad path.

This attempts to remedy that by creating a temporary file from an
InputStream, read with Class#getResourceAsStream

Ignored HTTPSWebServerAuthTest as the certificate path was invalid for
some reason.
2018-11-11 12:55:09 +02:00