Chocobozzz/PeerTube

View on GitHub

Showing 1,292 of 3,313 total issues

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

                              Avoid too many return statements within this function.
                              Open

                                  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

                                    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 true
                                    Severity: Major
                                    Found in server/core/lib/video-blacklist.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 next()
                                        Severity: Major
                                        Found in server/core/middlewares/validators/videos/video-comments.ts - About 30 mins to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language