Fix DOS attack perpetrated by CityInfoReligionManager on Json Serializer (#4870)

Fixes #4867
This commit is contained in:
SomeTroglodyte 2021-08-16 10:26:06 +02:00 committed by GitHub
parent c1acda6c6b
commit df31fb2f05
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View File

@ -19,6 +19,7 @@ class CityInfoReligionManager {
@Transient
private val followers: Counter<String> = Counter()
@delegate:Transient
private val pressureFromAdjacentCities: Int by lazy {
when (cityInfo.civInfo.gameInfo.gameParameters.gameSpeed) {
GameSpeed.Quick -> 9

View File

@ -62,7 +62,7 @@ class GameSettings {
}
fun addCompletedTutorialTask(tutorialTask: String) {
tutorialTasksCompleted.add(tutorialTask)
save()
if (tutorialTasksCompleted.add(tutorialTask))
save()
}
}