ActivityPub-federated video streaming platform using P2P directly in your web browser
Do not leak video UUID
Chocobozzz8791793e9fc8
diff --git a/server/core/middlewares/validators/videos/video-view.ts b/server/core/middlewares/validators/videos/video-view.tsindex 41bcb40969..77637108a5 100644--- a/server/core/middlewares/validators/videos/video-view.ts+++ b/server/core/middlewares/validators/videos/video-view.ts@@ -11,6 +11,7 @@ import express from 'express'import { body, param } from 'express-validator'import { isIdValid, toIntOrNull } from '../../../helpers/custom-validators/misc.js'import { areValidationErrors, doesVideoExist, isValidVideoIdParam } from '../shared/index.js'+import { logger } from '@server/helpers/logger.js'const tags = [ 'views' ]@@ -70,11 +71,12 @@ export const videoViewValidator = [const currentTime = req.body.currentTimeif (!isVideoTimeValid(currentTime, duration)) {+ logger.warn(`Current time ${currentTime} is invalid (video ${video.uuid} duration: ${duration})`, { tags: [ ...tags, video.uuid ] })+return res.fail({status: HttpStatusCode.BAD_REQUEST_400,- message: `Current time ${currentTime} is invalid (video ${video.uuid} duration: ${duration})`,- logLevel: 'warn',- tags+ message: `Current time ${currentTime} is invalid for this video`,+ tags: [ ...tags, video.uuid ]})}