Commit graph

1778 commits

Author SHA1 Message Date
Slendy
c34b7f3e79
Revert website Forbid and Unauthorized method usage to StatusCode
This is because by default ASP.NET expects an authentication scheme to be registered when using these methods.
2023-03-30 19:23:11 -05:00
Josh
50d1d9c7e5
Fix doubly sanitized strings (#727)
* Add migration to de-sanitize database strings

* Remove SanitizationHelper functions related to XML sanitization

* Remove sanitization usage from website

* Implement suggested changes
2023-03-30 23:03:08 +00:00
dependabot[bot]
f5c8f53437
Bump Discord.Net.Webhook from 3.9.0 to 3.10.0 (#723)
Bumps [Discord.Net.Webhook](https://github.com/Discord-Net/Discord.Net) from 3.9.0 to 3.10.0.
- [Release notes](https://github.com/Discord-Net/Discord.Net/releases)
- [Changelog](https://github.com/discord-net/Discord.Net/blob/dev/CHANGELOG.md)
- [Commits](https://github.com/Discord-Net/Discord.Net/compare/3.9.0...3.10.0)

---
updated-dependencies:
- dependency-name: Discord.Net.Webhook
  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-03-30 06:21:25 +00:00
koko
89877d359f
Add comment form max char limit validation (#722)
* Add comment form max char limit validation, minor visual nitpick

* Italicize banned/disabled/etc messages within comments
2023-03-30 06:03:12 +00:00
dependabot[bot]
81580c6afd
Bump SixLabors.ImageSharp from 3.0.0 to 3.0.1 (#724)
Bumps [SixLabors.ImageSharp](https://github.com/SixLabors/ImageSharp) from 3.0.0 to 3.0.1.
- [Release notes](https://github.com/SixLabors/ImageSharp/releases)
- [Commits](https://github.com/SixLabors/ImageSharp/compare/v3.0.0...v3.0.1)

---
updated-dependencies:
- dependency-name: SixLabors.ImageSharp
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-30 06:02:31 +00:00
Slendy
ecc1b844b1
Add logging for empty request body bug 2023-03-30 00:16:20 -05:00
Slendy
ff470bcb34
Fix certain scores not being uploaded 2023-03-29 23:36:47 -05:00
Slendy
3713c4d20c
Update lucky dip description 2023-03-29 21:47:08 -05:00
Slendy
a603cdb002
Use Unauthorized instead of Forbid on Website & Api 2023-03-29 21:44:16 -05:00
Slendy
b0858448c8
Fix LBP3 playlist editing 2023-03-29 19:34:16 -05:00
Slendy
8376928a6c
Fix score uploading on story levels 2023-03-29 13:32:48 -05:00
Slendy
86e07fdd9d
Handle null previewSlot in category system 2023-03-29 13:19:01 -05:00
Slendy
6fcc51fca3
Make BackgroundHash not nullable 2023-03-29 13:06:01 -05:00
Slendy
d41b518fc2
Fix heart count on users in-game 2023-03-28 20:25:26 -05:00
Slendy
2924597c7b
Fix published level count in lbp1 2023-03-28 20:20:42 -05:00
Slendy
7ac0a6785d
Fix level missing resource response 2023-03-28 15:33:09 -05:00
Slendy
3ebdc03951
Properly serialize slot resources 2023-03-28 15:19:25 -05:00
Slendy
795a6b9b6e
Set playcount when serializing 2023-03-28 15:02:30 -05:00
Slendy
e3843cb8c4
Fix content-type for planetStats 2023-03-28 14:40:05 -05:00
Slendy
9451babb76
Add null handling to SlotBase 2023-03-28 14:32:49 -05:00
Slendy
7c1d109157
Fix level thumbs up and thumbs down being switched 2023-03-28 14:28:11 -05:00
Slendy
90f79d67c4
Fix level publishing 2023-03-28 14:26:09 -05:00
Slendy
deac39ef97
Fix ScoreboardResponse returning points as count 2023-03-28 14:03:35 -05:00
Slendy
65e1ffc993
Fix photo dates in-game 2023-03-28 11:18:24 -05:00
Slendy
1e8ef8c679
Serialization refactor hotfixes
Fixes user heart count
Fixes searches not working
Fixes text/plain content not outputting
2023-03-28 10:33:03 -05:00
Josh
329ab66043
Refactor serialization system (#702)
* Initial work for serialization refactor

* Experiment with new naming conventions

* Mostly implement user and slot serialization.
Still needs to be fine tuned to match original implementation
Many things are left in a broken state like website features/api endpoints/lbp3 categories

* Fix release building

* Migrate scores, reviews, and more to new serialization system.
Many things are still broken but progress is steadily being made

* Fix Api responses and migrate serialization for most types

* Make serialization better and fix bugs
Fix recursive PrepareSerialization when recursive item is set during root item's PrepareSerialization, items, should be properly indexed in order but it's only tested to 1 level of recursion

* Fix review serialization

* Fix user serialization producing malformed SQL query

* Remove DefaultIfEmpty query

* MariaDB doesn't like double nested queries

* Fix LBP1 tag counter

* Implement lbp3 categories and add better deserialization handling

* Implement expression tree caching to speed up reflection and write new serializer tests

* Remove Game column from UserEntity and rename DatabaseContextModelSnapshot.cs back to DatabaseModelSnapshot.cs

* Make UserEntity username not required

* Fix recursive serialization of lists and add relevant unit tests

* Actually commit the migration

* Fix LocationTests to use new deserialization class

* Fix comments not serializing the right author username

* Replace all occurrences of StatusCode with their respective ASP.NET named result
instead of StatusCode(403) everything is now in the form of Forbid()

* Fix SlotBase.ConvertToEntity and LocationTests

* Fix compilation error

* Give Location a default value in GameUserSlot and GameUser

* Reimplement stubbed website functions

* Convert grief reports to new serialization system

* Update DatabaseModelSnapshot and bump dotnet tool version

* Remove unused directives

* Fix broken type reference

* Fix rated comments on website

* Don't include banned users in website comments

* Optimize score submission

* Fix slot id calculating in in-game comment posting

* Move serialization interfaces to types folder and add more documentation

* Allow uploading of versus scores
2023-03-28 00:39:54 +00:00
Dagg
307b2135a3
Potentially fix score sorting issue (#721)
Update SlotPage.cshtml.cs

lel
2023-03-27 23:34:12 +00:00
dependabot[bot]
2738d04dbb
Bump Selenium.WebDriver from 4.8.1 to 4.8.2 (#718)
Bumps Selenium.WebDriver from 4.8.1 to 4.8.2.

---
updated-dependencies:
- dependency-name: Selenium.WebDriver
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-24 23:22:45 +00:00
Josh
b2a1d3958f
Allow head requests to status endpoints (#717) 2023-03-24 00:31:56 +00:00
Josh
fa5ff0b490
Add a discord webhook for when users join for the first time. (#698)
* Add a discord webhook for when users join for the first time.

* Fix compilation error related to embed colors

* Make config migration backup use the version of the stored file

* Make DiscordConfiguration not halt startup

* Allow the registration message to be configured

* Clean up registration announcement and add userId variable

* Fix userid resolution and convert newline string to actual character
Also make WebhookHelper not fail if all destinations aren't configured
2023-03-23 00:57:28 +00:00
Josh
b87c16ab7c
Make in-game email system not lock after one attempt (#712) 2023-03-18 20:33:37 -05:00
W0lf4llo
9b014fa01c
StasticsHelper + Community Tab Performance Fix (#713)
* Player count shows per game

* Fixed LBP3 categories lagigng & StatisticsHelper

Co-authored-by: koko <sudokoko@users.noreply.github.com>

* Fixed "planetStats" mmPicksCount

* Hopefully the final update to this PR!
(Bug fixes)

* Update ProjectLighthouse/Types/Entities/Level/Slot.cs

Co-authored-by: koko <68549366+sudokoko@users.noreply.github.com>

* Update ProjectLighthouse.Servers.GameServer/Controllers/Slots/SlotsController.cs

I'm trusting you that nothing breaks here lol

Co-authored-by: Josh <josh@slendy.pw>

* Update ProjectLighthouse.Servers.GameServer/Controllers/Slots/SlotsController.cs

bad slendy >:(

Co-authored-by: koko <68549366+sudokoko@users.noreply.github.com>

---------

Co-authored-by: koko <sudokoko@users.noreply.github.com>
Co-authored-by: koko <68549366+sudokoko@users.noreply.github.com>
Co-authored-by: Josh <josh@slendy.pw>
2023-03-17 03:51:55 +00:00
dependabot[bot]
14e40de18f
Bump Microsoft.EntityFrameworkCore.Design from 7.0.3 to 7.0.4 (#711)
Bumps [Microsoft.EntityFrameworkCore.Design](https://github.com/dotnet/efcore) from 7.0.3 to 7.0.4.
- [Release notes](https://github.com/dotnet/efcore/releases)
- [Commits](https://github.com/dotnet/efcore/compare/v7.0.3...v7.0.4)

---
updated-dependencies:
- dependency-name: Microsoft.EntityFrameworkCore.Design
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-16 20:31:30 +00:00
dependabot[bot]
740439bb82
Bump Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore from 7.0.3 to 7.0.4 (#706)
Bump Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore

Bumps [Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore](https://github.com/dotnet/aspnetcore) from 7.0.3 to 7.0.4.
- [Release notes](https://github.com/dotnet/aspnetcore/releases)
- [Changelog](https://github.com/dotnet/aspnetcore/blob/main/docs/ReleasePlanning.md)
- [Commits](https://github.com/dotnet/aspnetcore/compare/v7.0.3...v7.0.4)

---
updated-dependencies:
- dependency-name: Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-16 20:28:14 +00:00
dependabot[bot]
408bdc85e7
Bump Microsoft.AspNetCore.Mvc.Testing from 7.0.3 to 7.0.4 (#710)
Bumps [Microsoft.AspNetCore.Mvc.Testing](https://github.com/dotnet/aspnetcore) from 7.0.3 to 7.0.4.
- [Release notes](https://github.com/dotnet/aspnetcore/releases)
- [Changelog](https://github.com/dotnet/aspnetcore/blob/main/docs/ReleasePlanning.md)
- [Commits](https://github.com/dotnet/aspnetcore/compare/v7.0.3...v7.0.4)

---
updated-dependencies:
- dependency-name: Microsoft.AspNetCore.Mvc.Testing
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-16 19:56:45 +00:00
dependabot[bot]
1f45195040
Bump Microsoft.EntityFrameworkCore from 7.0.3 to 7.0.4 (#709)
Bumps [Microsoft.EntityFrameworkCore](https://github.com/dotnet/efcore) from 7.0.3 to 7.0.4.
- [Release notes](https://github.com/dotnet/efcore/releases)
- [Commits](https://github.com/dotnet/efcore/compare/v7.0.3...v7.0.4)

---
updated-dependencies:
- dependency-name: Microsoft.EntityFrameworkCore
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-16 19:46:21 +00:00
dependabot[bot]
6198521356
Bump Selenium.WebDriver.ChromeDriver from 109.0.5414.7400 to 111.0.5563.6400 (#700)
Bump Selenium.WebDriver.ChromeDriver

Bumps [Selenium.WebDriver.ChromeDriver](https://github.com/jsakamoto/nupkg-selenium-webdriver-chromedriver) from 109.0.5414.7400 to 111.0.5563.6400.
- [Release notes](https://github.com/jsakamoto/nupkg-selenium-webdriver-chromedriver/releases)
- [Changelog](https://github.com/jsakamoto/nupkg-selenium-webdriver-chromedriver/blob/master/RELEASE-NOTES.txt)
- [Commits](https://github.com/jsakamoto/nupkg-selenium-webdriver-chromedriver/compare/v.109.0.5414.7400...v.111.0.5563.6400)

---
updated-dependencies:
- dependency-name: Selenium.WebDriver.ChromeDriver
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-16 14:46:11 -05:00
dependabot[bot]
9dc889d192
Bump Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation from 7.0.3 to 7.0.4 (#707)
Bump Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation

Bumps [Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation](https://github.com/dotnet/aspnetcore) from 7.0.3 to 7.0.4.
- [Release notes](https://github.com/dotnet/aspnetcore/releases)
- [Changelog](https://github.com/dotnet/aspnetcore/blob/main/docs/ReleasePlanning.md)
- [Commits](https://github.com/dotnet/aspnetcore/compare/v7.0.3...v7.0.4)

---
updated-dependencies:
- dependency-name: Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-15 06:39:40 +00:00
dependabot[bot]
c0298d9148
Bump Redis.OM from 0.4.1 to 0.4.2 (#705)
Bumps [Redis.OM](https://github.com/redis/redis-om-dotnet) from 0.4.1 to 0.4.2.
- [Release notes](https://github.com/redis/redis-om-dotnet/releases)
- [Commits](https://github.com/redis/redis-om-dotnet/compare/v0.4.1...v0.4.2)

---
updated-dependencies:
- dependency-name: Redis.OM
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-15 06:39:23 +00:00
dependabot[bot]
e53b91870d
Bump YamlDotNet from 13.0.1 to 13.0.2 (#704)
Bumps [YamlDotNet](https://github.com/aaubry/YamlDotNet) from 13.0.1 to 13.0.2.
- [Release notes](https://github.com/aaubry/YamlDotNet/releases)
- [Commits](https://github.com/aaubry/YamlDotNet/compare/v13.0.1...v13.0.2)

---
updated-dependencies:
- dependency-name: YamlDotNet
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-15 06:39:11 +00:00
koko
05b71b0d22
Add admin/mod badges on UserCardPartial (#697)
* Add admin/mod badges to UserCardPartial

* Correct vertical alignment of badges

* Move most of styling to stylesheet, lazy but it works

* Implement more modular role coloring for UserLinkPartial and UserCardPartial

---------

Co-authored-by: Slendy <josh@slendy.pw>
2023-03-10 21:17:44 +00:00
Slendy
223cc0c883
Add default values for dive in slot 2023-03-08 15:26:21 -06:00
dependabot[bot]
e47ac3d06a
Bump SixLabors.ImageSharp from 2.1.3 to 3.0.0 (#693)
Bumps [SixLabors.ImageSharp](https://github.com/SixLabors/ImageSharp) from 2.1.3 to 3.0.0.
- [Release notes](https://github.com/SixLabors/ImageSharp/releases)
- [Commits](https://github.com/SixLabors/ImageSharp/compare/v2.1.3...v3.0.0)

---
updated-dependencies:
- dependency-name: SixLabors.ImageSharp
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Josh <josh@slendy.pw>
2023-03-05 07:28:22 +00:00
Slendy
9d25f56e64
Fix hearted and queued levels on LBP Vita 2023-03-04 21:41:49 -06:00
Josh
e3dcbe75e1
Allow environment variable expansion in config files (#689)
* Allow environment variable expansion in config files

* Remove extra newline
2023-02-26 10:45:57 +00:00
Slendy
d18bad9f05
Fix RoomHelper duplicate key errors 2023-02-26 03:58:49 -06:00
Slendy
a2d2337dc3
Fix photo uploading and add more detailed logging to deserialization 2023-02-24 20:17:44 -06:00
Slendy
c48da8ccd7
Fix ownership check in docker entrypoint script 2023-02-24 00:45:05 -06:00
Slendy
78dd5b6489
Add KnownProxies in appsettings for load balancers/docker 2023-02-24 00:28:36 -06:00
Josh
017dcd6888
Make PhotoSubjects use a one to many relationship (#687)
* Attempt to remodel PhotoSubject and Photo relationship

* Fix migration name

* Use exactName for migration lock

* Revert "Use exactName for migration lock"

This reverts commit 76cee6a3ff.

* Set command timeout to 5 minutes for database migrations

* Delete unused PhotoSubjects in migration

* Clean up website queries and finalize subject refactor

* Add migration to remove PhotoSubjectCollection

* Add grace period for container startup and optimize startup

* Make config backup copy original file

* Allow docker entrypoint to fix data permissions
2023-02-24 04:20:55 +00:00