Chocobozzz/PeerTube

View on GitHub

Showing 3,313 of 3,313 total issues

Avoid too many return statements within this function.
Open

    if (newSize.height >= 500) return imageBytes <= 100 * kB
Severity: Major
Found in server/core/helpers/image-utils.ts - About 30 mins to fix

    Avoid too many return statements within this function.
    Open

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

      Avoid too many return statements within this function.
      Open

        if (!start || !end) return true
      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

          if (video.attributedTo.length === 0) 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 (!isActivityPubUrlValid(video.id)) return fail('id')
          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 cb(err)
            Severity: Major
            Found in server/core/controllers/tracker.ts - About 30 mins to fix

              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
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language