Chocobozzz/PeerTube

View on GitHub

Showing 1,292 of 3,313 total issues

Avoid too many return statements within this function.
Open

  if (end && !validator.default.isInt(end + '', CONSTRAINTS_FIELDS.VIDEO_STUDIO.CUT_TIME)) return false
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 true
    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 (!isVideoDurationValid(video.duration.replace(/[^0-9]+/g, ''))) return fail('duration')
      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.language) && !isRemoteStringIdentifierValid(video.language)) return fail('language')
        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.send(feed.rss2()).end()
          Severity: Major
          Found in server/core/controllers/feeds/shared/common-feed-utils.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/abuse.ts - About 30 mins to fix

              Avoid too many return statements within this function.
              Open

                  return parseInt(match[1], 10) * 1024 * 1024 * 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

                  if (!setValidLicence(video)) return fail('licence')
                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({
                        status: HttpStatusCode.FORBIDDEN_403,
                        message: 'ActivityPub signature could not be checked'
                      })
                  Severity: Major
                  Found in server/core/middlewares/activitypub.ts - About 30 mins to fix

                    Avoid too many return statements within this function.
                    Open

                          return
                    Severity: Major
                    Found in server/core/middlewares/validators/abuse.ts - About 30 mins to fix

                      Avoid too many return statements within this function.
                      Open

                          return parseInt(match[1], 10) * 1024 * 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 parseInt(value, 10)
                        Severity: Major
                        Found in server/core/helpers/core-utils.ts - About 30 mins to fix

                          Avoid too many return statements within this function.
                          Open

                            if (!isDateValid(video.published)) return fail('published')
                          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 (!setValidRemoteCaptions(video)) return fail('captions')
                            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 (!isVideoNameValid(video.name)) return fail('name')
                              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.category) && !isRemoteNumberIdentifierValid(video.category)) return fail('category')
                                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.content) && !isRemoteVideoContentValid(video.mediaType, video.content)) return fail('mediaType/content')
                                  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({
                                            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 * 1024 * 1024 * 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 undefined
                                        Severity: Major
                                        Found in server/core/helpers/youtube-dl/youtube-dl-info-builder.ts - About 30 mins to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language