Commit Graph

2048 Commits

Author SHA1 Message Date
Aurora Lahtela
776fa3327f Fixed issues with peak player count query optimization 2023-02-13 18:23:38 +02:00
Aurora Lahtela
226bc20e3f Speed up /v1/network/servers by 66%
Benchmark: endpoint (fetchPeakPlayerCount is the highest contributor)
- Before: 10 seconds (1s * server count)
- Before: 3 seconds (332ms * server count)
2023-02-12 10:37:52 +02:00
dependabot[bot]
8c7b0d86ae
Bump selenium-java from 4.7.2 to 4.8.0 in /Plan (#2843)
Bumps [selenium-java](https://github.com/SeleniumHQ/selenium) from 4.7.2 to 4.8.0.
- [Release notes](https://github.com/SeleniumHQ/selenium/releases)
- [Commits](https://github.com/SeleniumHQ/selenium/commits/selenium-4.8.0)

---
updated-dependencies:
- dependency-name: org.seleniumhq.selenium:selenium-java
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-05 15:42:18 +02:00
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
5b6efa0438 Fix ERR_NETWORK_CHANGED on CI 2023-02-03 17:07:35 +02:00
Aurora Lahtela
b1a63d57b6 Don't accept redirect in https test 2023-01-25 21:50:03 +02:00
Aurora Lahtela
8dccb060c0 Skip javascript translation on React bundle files
Affects issues:
- Fixed #2799
2023-01-22 14:50:42 +02:00
Aurora Lahtela
63350a4fea Fix PlayerTableRowPatch is applied check 2023-01-22 14:31:10 +02:00
Aurora Lahtela
acf9d92b1d Refactor duplicate code: command confirmation 2023-01-22 13:45:47 +02:00
Aurora Lahtela
e0d80cb3b4 Filter out fonts.gstatic.com from test logs
This should sort out ERR_NETWORK_CHANGED error that appears from time to time
2023-01-22 13:12:52 +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
0ddda27384 Implement a date formatter for Last-Modified header
https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Last-Modified
2023-01-21 15:22:04 +02:00
Aurora Lahtela
0bce7880cd Add support for getting last modified date to Resource
- Use AssetVersions.yml for jar files
- Use File#lastModified for regular files
2023-01-21 15:03:29 +02:00
Aurora Lahtela
d3be0e9f89 Optimized server latest join addresses query
Original benchmark: 19 seconds
Improved benchmark: 150 milliseconds
-> 120x faster
2023-01-21 12:47:13 +02:00
Aurora Lahtela
987fb7b56a Optimized server player list table query
Original benchmark: 4 seconds
Improved benchmark: 500 milliseconds
-> 8x faster
2023-01-21 12:17:46 +02:00
Aurora Lahtela
1b0942c988 Unit test Benchmark utility 2023-01-21 12:04:58 +02:00
Aurora Lahtela
dda7199a1a Fix more sonar smells 2023-01-20 22:54:54 +02:00
Aurora Lahtela
2eba115f6f Wrote tests for some commands 2023-01-20 21:03:15 +02:00
dependabot[bot]
5f66370ec9
Bump io.swagger.core.v3.swagger-gradle-plugin in /Plan (#2824)
Bumps io.swagger.core.v3.swagger-gradle-plugin from 2.2.7 to 2.2.8.

---
updated-dependencies:
- dependency-name: io.swagger.core.v3.swagger-gradle-plugin
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-01-20 18:31:21 +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
f20a04809c Test against and identify path traversal vulnerability in other methods 2023-01-15 09:30:30 +02:00
Aurora Lahtela
b0a1bc1fb1 Prevent malicious join address packet from breaking session serialization 2023-01-15 09:01:28 +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
82274ae658 Fix issue due to 'None' translation in FI language 2023-01-14 12:12:45 +02:00
Aurora Lahtela
bd85f10c55 Fix customized resource lookup Path Traversal vulnerability
Affects issues:
- Fixed #2830
2023-01-13 23:23:12 +02:00
Aurora Lahtela
205692af65 Updated Finnish Locale 2023-01-08 14:47:25 +02:00
Aurora Lahtela
4580666426 Update locale files with new language 2023-01-08 14:09:45 +02:00
Aurora Lahtela
5ba6e0dc9f Fix concurrency issues with json cache and database 2023-01-07 11:45:58 +02:00
Aurora Lahtela
9622f6a614
Disable BadAFKThresholdValuePatch 2023-01-06 23:06:17 +02:00
Aurora Lahtela
97b9a18cea Catch session deserialization errors during enable 2023-01-06 19:40:04 +02:00
Aurora Lahtela
e660655136 Disable ReverseProxyRegressionTest 2023-01-06 14:41:50 +02:00
Aurora Lahtela
aa897fe8de Implemented support for reverse-proxy subdirectory addresses
Reverse proxied version of React website now works
when subdirectory address is used (eg. /plan/...)

The functionality was unit tested to ensure things work
2023-01-06 14:24:18 +02:00
Aurora Lahtela
5082f80030 Implemented support for subdirectory addresses
Export of React version of frontend now supports exporting to a subdirectory
So now you can access exported site at /plan/... if it is hosted there.

This might impact reverse proxy setups positively, but that has not yet been tested.
The hypothetical positive impact is the inclusion of subdirectory in the React-router
configuration, since now it can handle the reverse-proxy subdirectory in URL.
2023-01-06 12:12:45 +02:00
dependabot[bot]
d941e7f858
Bump com.github.node-gradle.node from 3.5.0 to 3.5.1 in /Plan (#2811)
Bumps com.github.node-gradle.node from 3.5.0 to 3.5.1.

---
updated-dependencies:
- dependency-name: com.github.node-gradle.node
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-01-03 11:35:34 +02:00
AuroraLS3
8e88b3a9a6 Make undefined join address id guesstimate based on existing data 2022-12-30 13:26:53 +02:00
AuroraLS3
a8dbc3288e Fix checkstyle 2022-12-29 21:06:52 +02:00
AuroraLS3
bf63b29f72 Set bad join address ids as unknown 2022-12-29 20:54:23 +02:00
AuroraLS3
d0030fc6e3 Fix BadJoinAddressDataCorrectionPatch 2022-12-29 20:31:23 +02:00
Aurora Lahtela
626d63a87d Optimized BadJoinAddressDataCorrectionPatch using INSTR 2022-12-20 19:32:09 +02:00
dependabot[bot]
32b1548326
Bump selenium-java from 4.7.1 to 4.7.2 in /Plan (#2794)
Bumps [selenium-java](https://github.com/SeleniumHQ/selenium) from 4.7.1 to 4.7.2.
- [Release notes](https://github.com/SeleniumHQ/selenium/releases)
- [Commits](https://github.com/SeleniumHQ/selenium/commits)

---
updated-dependencies:
- dependency-name: org.seleniumhq.selenium:selenium-java
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-12-20 18:00:22 +02:00
Aurora Lahtela
0fdd12e61f Patch bad join address data if it is in database 2022-12-18 21:32:08 +02:00
Aurora Lahtela
9e44000d21 Fix setting boolean parameters dynamically
Affects issues:
- Fixed #2784
2022-12-14 19:33:44 +02:00
Aurora Lahtela
a773c4c46e Wrote a test for exported react pages
Affects issues:
- Close #2767
2022-12-13 19:33:00 +02:00
Aurora Lahtela
155910554f Fixed exported page constantly updating data in the background 2022-12-11 21:35:31 +02:00
Aurora Lahtela
34318be5c3 Add missing timezone offset to line graphs
Affects issues:
- Fixed #2780
2022-12-10 10:16:27 +02:00
dependabot[bot]
e4310384c7
Bump selenium-java from 4.7.0 to 4.7.1 in /Plan (#2773)
Bumps [selenium-java](https://github.com/SeleniumHQ/selenium) from 4.7.0 to 4.7.1.
- [Release notes](https://github.com/SeleniumHQ/selenium/releases)
- [Commits](https://github.com/SeleniumHQ/selenium/commits)

---
updated-dependencies:
- dependency-name: org.seleniumhq.selenium:selenium-java
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-12-08 19:18:20 +02:00
Aurora Lahtela
d4798f1303 Fix React export when static directory doesn't exist yet 2022-12-06 12:41:50 +02:00
Aurora Lahtela
8fadcc3afb Delete old static bundle files with React export 2022-12-06 11:52:10 +02:00
Aurora Lahtela
f7176b3d47 Export redirection index.html files in case someone refreshes browser 2022-12-05 17:10:51 +02:00
dependabot[bot]
d4d40aa68a
Bump adventure-api from 4.9.3 to 4.12.0 in /Plan (#2763)
Bumps [adventure-api](https://github.com/KyoriPowered/adventure) from 4.9.3 to 4.12.0.
- [Release notes](https://github.com/KyoriPowered/adventure/releases)
- [Commits](https://github.com/KyoriPowered/adventure/compare/v4.9.3...v4.12.0)

---
updated-dependencies:
- dependency-name: net.kyori:adventure-api
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-12-04 12:34:03 +02:00