Chocobozzz/PeerTube

View on GitHub

Showing 3,313 of 3,313 total issues

Avoid too many return statements within this function.
Open

    if (req.body.channelId && !await doesVideoChannelOfAccountExist(req.body.channelId, user, res)) return cleanUpReqFiles(req)
Severity: Major
Found in server/core/middlewares/validators/videos/videos.ts - About 30 mins to fix

    Avoid too many return statements within this function.
    Open

          return next()
    Severity: Major
    Found in server/core/middlewares/validators/videos/videos.ts - About 30 mins to fix

      Avoid too many return statements within this function.
      Open

              return next()
      Severity: Major
      Found in server/core/middlewares/validators/videos/video-playlists.ts - About 30 mins to fix

        Avoid too many return statements within this function.
        Open

              return res.fail({
                status: HttpStatusCode.BAD_REQUEST_400,
                message: 'Cannot delete Web Video files since this video does not have HLS playlist'
              })
        Severity: Major
        Found in server/core/middlewares/validators/videos/video-files.ts - About 30 mins to fix

          Avoid too many return statements within this function.
          Open

              return next()
          Severity: Major
          Found in server/core/middlewares/validators/videos/video-comments.ts - About 30 mins to fix

            Avoid too many return statements within this function.
            Open

                if (!await doesVideoExist(req.params.videoId, res)) return cleanUpReqFiles(req)
            Severity: Major
            Found in server/core/middlewares/validators/videos/video-studio.ts - About 30 mins to fix

              Avoid too many return statements within this function.
              Open

                  if (channel && !checkUserCanManageAccount({ account: channel.Account, user, res, specialRight: UserRight.SEE_ALL_COMMENTS })) return
              Severity: Major
              Found in server/core/middlewares/validators/videos/video-comments.ts - About 30 mins to fix

                Avoid too many return statements within this function.
                Open

                    if (!checkUserCanManageVideo(user, video, UserRight.UPDATE_ANY_VIDEO, res)) return cleanUpReqFiles(req)
                Severity: Major
                Found in server/core/middlewares/validators/videos/video-studio.ts - About 30 mins to fix

                  Avoid too many return statements within this function.
                  Open

                      return next()
                  Severity: Major
                  Found in server/core/middlewares/validators/videos/video-studio.ts - About 30 mins to fix

                    Avoid too many return statements within this function.
                    Open

                        if (!await isVideoCommentAccepted(req, res, res.locals.videoAll, true)) return
                    Severity: Major
                    Found in server/core/middlewares/validators/videos/video-comments.ts - About 30 mins to fix

                      Avoid too many return statements within this function.
                      Open

                          return next()
                      Severity: Major
                      Found in server/core/middlewares/validators/videos/video-comments.ts - About 30 mins to fix

                        Avoid too many return statements within this function.
                        Open

                              return this.abortSession(sessionId)
                        Severity: Major
                        Found in server/core/lib/live/live-manager.ts - About 30 mins to fix

                          Avoid too many return statements within this function.
                          Open

                            return replaceLiveByReplay({
                              video,
                              liveSession,
                              live,
                              permanentLive,
                          Severity: Major
                          Found in server/core/lib/job-queue/handlers/video-live-ending.ts - About 30 mins to fix

                            Avoid too many return statements within this function.
                            Open

                                if (body.forceTranscoding === true) return next()
                            Severity: Major
                            Found in server/core/middlewares/validators/videos/video-transcoding.ts - About 30 mins to fix

                              Avoid too many return statements within this function.
                              Open

                                if (result.adminFlags && !isUserAdminFlagsValid(result.adminFlags)) return returnError('adminFlags')
                              Severity: Major
                              Found in server/core/lib/auth/external-auth.ts - About 30 mins to fix

                                Avoid too many return statements within this function.
                                Open

                                    if (await checkUserQuota(user, additionalBytes, res) === false) return cleanUpReqFiles(req)
                                Severity: Major
                                Found in server/core/middlewares/validators/videos/video-studio.ts - About 30 mins to fix

                                  Avoid too many return statements within this function.
                                  Open

                                    if (result.videoQuota && !isUserVideoQuotaValid(result.videoQuota + '')) return returnError('videoQuota')
                                  Severity: Major
                                  Found in server/core/lib/auth/external-auth.ts - About 30 mins to fix

                                    Avoid too many return statements within this function.
                                    Open

                                        return next()
                                    Severity: Major
                                    Found in server/core/middlewares/validators/videos/video-ownership-changes.ts - About 30 mins to fix

                                      Avoid too many return statements within this function.
                                      Open

                                          return this.runMuxingSession({
                                            sessionId,
                                            videoLive,
                                      
                                            user,
                                      Severity: Major
                                      Found in server/core/lib/live/live-manager.ts - About 30 mins to fix

                                        Avoid too many return statements within this function.
                                        Open

                                          return user
                                        Severity: Major
                                        Found in server/core/lib/auth/oauth-model.ts - About 30 mins to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language