Implement LBP1 tags, stricter resource checking, and more (#463)

* Add LBP1 tags, more strict resource checking, and more.

* Fix unit tests

* Add more length checking to dependency parser

* Online editor problems

* Fix tests pt 2

* Self code review and fixed digest bugs

* Don't add content length if it was already set

* Fix status endpoint

* Fix review bug and simplify review serialization

* Fix a typo in review serialization

* Remove duplicated code and fix search

* Remove duplicate database call
This commit is contained in:
Josh 2022-08-31 20:38:58 -05:00 committed by GitHub
parent 58c340aff8
commit d640c000aa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
32 changed files with 735 additions and 209 deletions

View file

@ -85,6 +85,12 @@ public class ResourcesController : ControllerBase
return this.Conflict();
}
if (!FileHelper.AreDependenciesSafe(file))
{
Logger.Warn($"File has unsafe dependencies (hash: {hash}, type: {file.FileType}", LogArea.Resources);
return this.Conflict();
}
string calculatedHash = file.Hash;
if (calculatedHash != hash)
{