diff --git a/server/src/lib/score-import/import-types/common/api-cg/parsers.ts b/server/src/lib/score-import/import-types/common/api-cg/parsers.ts index 5849991cb..ca5c00e50 100644 --- a/server/src/lib/score-import/import-types/common/api-cg/parsers.ts +++ b/server/src/lib/score-import/import-types/common/api-cg/parsers.ts @@ -77,7 +77,11 @@ const PR_CG_POPN = { difficulty: p.isPositiveInteger, version: p.isPositiveInteger, clearFlag: p.isPositiveInteger, - score: p.isBoundedInteger(0, 100_000), + + // edge case. Score can go above 100k in battle mode. + // although we don't support battle mode, + // we cannot reject this in the parser - as it will cancel the entire import. + score: p.isPositiveInteger, coolCount: p.isPositiveInteger, greatCount: p.isPositiveInteger, diff --git a/server/src/lib/score-import/import-types/common/api-cg/popn/converter.ts b/server/src/lib/score-import/import-types/common/api-cg/popn/converter.ts index 0480ea22c..7626eb353 100644 --- a/server/src/lib/score-import/import-types/common/api-cg/popn/converter.ts +++ b/server/src/lib/score-import/import-types/common/api-cg/popn/converter.ts @@ -23,6 +23,10 @@ export const ConverterAPICGPopn: ConverterFunction = asy const difficulty = ConvertDifficulty(data.difficulty); const version = ConvertVersion(data.version); + if (data.score > 100_000) { + throw new InvalidScoreFailure(`Score is > 100_000 (got ${data.score})`); + } + const chart = await FindChartOnInGameIDVersion( "popn", data.internalId,