Commit Graph

18 Commits

Author SHA1 Message Date
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 9e11d9f484 Removed untrusted data from exception messages in case they end up on the webpage 2023-01-15 10:04:10 +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 253cfd251b Add support for :player at the end of player_ placeholders.
- Supports UUID
- Supports player name
- Will use issuing player if not found due to implementation limitations

Affects issues:
- Close #2130
2022-05-28 08:52:55 +03:00
Aurora Lahtela 6fa552ca5e Register plan_user row if missing when required
- PingStoreTransaction
- GeoInfoStoreTransaction
- SessionEndTransaction

Affects issues:
- Fixed #2361
- Fixed #2343
2022-05-07 10:40:50 +03:00
Risto Lahtela 13823c044a
Network performance tab (#2009)
* Fixed disk medium threshold not showing color
* Added 'serverName' and 'serverUUID' to optimizedPerformance endpoint
* Added /v1/network/listServers endpoint
* Added /v1/network/performanceOverview?servers endpoint
* Hide negative values from performance graphs
* Allow json cache bypass by not providing timestamp parameter in URIQuery
* Ignore negative values in low tps spike count
* Added (Unavailable with Export) to exported network html performance tab title

Affects issues:
- Close #1693
2021-07-17 12:19:33 +03:00
Risto Lahtela 8f85c23c2f Refactoring: ActiveSession, FinishedSession and ServerUUID
- Split Session into ActiveSession and FinishedSession, replaced their usage
- Replaced UUID with ServerUUID when the data type

Affects issues:
- Close #1746
2021-03-12 18:03:12 +02:00
Risto Lahtela 7fc7488e16 Stopped throwing error when system clock is out of sync
Causes a different kind of issue where the page attempts to load
for a longer time.

Affects issues:
- Fixed #1764
2021-02-19 11:21:49 +02:00
Rsl1122 94c9dd3f95 Username change Rsl1122 -> AuroraLS3 2021-02-13 15:16:03 +02:00
Risto Lahtela b5365d2321 Cache graph responses 2021-02-10 13:11:14 +02:00
Risto Lahtela 8544e5a904 Prevented a future accidental XSS vulnerability in Player UUID parsing
The server parameter was passed to an exception that is currently turned into
json, but in the future the way this exception is handled could have changed.
2021-01-24 11:15:37 +02:00
Risto Lahtela d64a967497 Prevented a future accidental XSS vulnerability in Server UUID parsing
The server parameter was passed to an exception that is currently turned into
json, but in the future the way this exception is handled could have changed.
2021-01-24 11:15:37 +02:00
Risto Lahtela 03bfe28762 unfinished work commit 2020-10-06 10:59:23 +03:00
Risto Lahtela 68be3117b1 Moved BadRequestException to API
Changed Bad Request response to JSON:
{
    "status": 400,
    "error": "message",
    "target": "/requested/target"
}
2020-03-14 12:40:21 +02:00
Risto Lahtela c204ce9b1b Fixed some code smells & bugs 2020-03-14 12:40:19 +02:00
Rsl1122 1ab5f3473d Refactored JSONResolvers to use the new API 2020-03-14 12:39:53 +02:00
Rsl1122 83293804a5 Fixed UUID parsing from String for JSON requests
Due to the way Optional#orElse works, the part inside orElse was run
even when the UUID could be parsed from the given String, leading to
unnecessary work as well as errors in the player UUID query
(That uses names and doesn't look at uuids like the server query)

Fixed by splitting the two execution branches

Affects issues:
- Fixed #1200 (Manually tested)
2019-10-25 15:12:01 +03:00
Risto Lahtela 66a19d7de1 Removed system. from packages (#1147)
* system.commands -> commands

* system.delivery -> delivery

* system.gathering -> gathering

* system.identification -> identification

* system.processing -> processing

* system.settings -> settings

* system.storage -> storage

* system.version -> version

* system -> com.djrapitops.plan
2019-09-03 09:32:30 +03:00