Chocobozzz/PeerTube

View on GitHub

Showing 1,292 of 3,313 total issues

Avoid too many return statements within this function.
Open

    return undefined
Severity: Major
Found in server/core/helpers/express-utils.ts - About 30 mins to fix

    Avoid too many return statements within this function.
    Open

      return true
    Severity: Major
    Found in server/core/helpers/custom-validators/activitypub/watch-action.ts - About 30 mins to fix

      Avoid too many return statements within this function.
      Open

        if (mimeTypeRegex === null) return true
      Severity: Major
      Found in server/core/helpers/custom-validators/misc.ts - About 30 mins to fix

        Avoid too many return statements within this function.
        Open

          if (!setValidRemoteIcon(video)) return fail('icons')
        Severity: Major
        Found in server/core/helpers/custom-validators/activitypub/videos.ts - About 30 mins to fix

          Avoid too many return statements within this function.
          Open

            if (exists(video.originallyPublishedAt) && !isDateValid(video.originallyPublishedAt)) return fail('originallyPublishedAt')
          Severity: Major
          Found in server/core/helpers/custom-validators/activitypub/videos.ts - About 30 mins to fix

            Avoid too many return statements within this function.
            Open

              return forceNumber(start) < forceNumber(end)
            Severity: Major
            Found in server/core/helpers/custom-validators/video-studio.ts - About 30 mins to fix

              Avoid too many return statements within this function.
              Open

                    return res.fail({
                      status: HttpStatusCode.NOT_FOUND_404,
                      message: 'Video redundancy not found.'
                    })
              Severity: Major
              Found in server/core/middlewares/validators/redundancy.ts - About 30 mins to fix

                Avoid too many return statements within this function.
                Open

                    return parseInt(match[1], 10) * 1024
                Severity: Major
                Found in server/core/helpers/core-utils.ts - About 30 mins to fix

                  Avoid too many return statements within this function.
                  Open

                        return fail('Video password should be a string.')
                  Severity: Major
                  Found in server/core/helpers/custom-validators/videos.ts - About 30 mins to fix

                    Avoid too many return statements within this function.
                    Open

                      if (!isVideoViewsValid(video.views)) return fail('views')
                    Severity: Major
                    Found in server/core/helpers/custom-validators/activitypub/videos.ts - About 30 mins to fix

                      Avoid too many return statements within this function.
                      Open

                        if (!isDateValid(video.updated)) return fail('updated')
                      Severity: Major
                      Found in server/core/helpers/custom-validators/activitypub/videos.ts - About 30 mins to fix

                        Avoid too many return statements within this function.
                        Open

                              if (playlistExists === true) return cb()
                        Severity: Major
                        Found in server/core/controllers/tracker.ts - About 30 mins to fix

                          Avoid too many return statements within this function.
                          Open

                            if (CONFIG.INSTANCE.DEFAULT_NSFW_POLICY === 'do_not_list') return false
                          Severity: Major
                          Found in server/core/helpers/express-utils.ts - About 30 mins to fix

                            Avoid too many return statements within this function.
                            Open

                                  return fail('Invalid video password. Password length should be at least 2 characters and no more than 100 characters.')
                            Severity: Major
                            Found in server/core/helpers/custom-validators/videos.ts - About 30 mins to fix

                              Avoid too many return statements within this function.
                              Open

                                if (!setValidAttributedTo(video)) return fail('attributedTo')
                              Severity: Major
                              Found in server/core/helpers/custom-validators/activitypub/videos.ts - About 30 mins to fix

                                Avoid too many return statements within this function.
                                Open

                                  if (exists(video.uploadDate) && !isDateValid(video.uploadDate)) return fail('uploadDate')
                                Severity: Major
                                Found in server/core/helpers/custom-validators/activitypub/videos.ts - About 30 mins to fix

                                  Avoid too many return statements within this function.
                                  Open

                                    return true
                                  Severity: Major
                                  Found in server/core/helpers/custom-validators/activitypub/videos.ts - About 30 mins to fix

                                    Avoid too many return statements within this function.
                                    Open

                                          return res.fail({
                                            message: 'Cannot delete this user export because its state is not compatible with a deletion'
                                          })
                                    Severity: Major
                                    Found in server/core/middlewares/validators/users/user-exports.ts - About 30 mins to fix

                                      Avoid too many return statements within this function.
                                      Open

                                        return res.fail({
                                          status: HttpStatusCode.FORBIDDEN_403,
                                          message: 'Cannot get this video regarding follow constraints',
                                          type: ServerErrorCode.DOES_NOT_RESPECT_FOLLOW_CONSTRAINTS,
                                          data: {
                                      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
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language