Chocobozzz/PeerTube

View on GitHub

Showing 3,313 of 3,313 total issues

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

              Avoid too many return statements within this function.
              Open

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

                Avoid too many return statements within this function.
                Open

                        return res.fail({
                          status: HttpStatusCode.CONFLICT_409,
                          message: `Channel with name ${req.body.channelName} already exists.`
                        })
                Severity: Major
                Found in server/core/middlewares/validators/users/users.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 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.FORBIDDEN_403,
                                message: 'Cannot create this live because the max instance lives limit is reached.',
                                type: ServerErrorCode.MAX_INSTANCE_LIVES_LIMIT_REACHED
                              })
                      Severity: Major
                      Found in server/core/middlewares/validators/videos/video-live.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-captions.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/users/user-registrations.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/users/user-exports.ts - About 30 mins to fix

                              Avoid too many return statements within this function.
                              Open

                                  if (result.allowed !== true) return
                              Severity: Major
                              Found in server/core/middlewares/validators/static.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-imports.ts - About 30 mins to fix

                                  Avoid too many return statements within this function.
                                  Open

                                        return res.fail({
                                          message: 'User video quota is exceeded with this import',
                                          status: HttpStatusCode.PAYLOAD_TOO_LARGE_413,
                                          type: ServerErrorCode.QUOTA_REACHED
                                        })
                                  Severity: Major
                                  Found in server/core/middlewares/validators/users/user-import.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
                                    Severity: Major
                                    Found in server/core/middlewares/validators/videos/video-captions.ts - About 30 mins to fix

                                      Avoid too many return statements within this function.
                                      Open

                                              return res.fail({
                                                status: HttpStatusCode.FORBIDDEN_403,
                                                message: 'Only admins can force transcription'
                                              })
                                      Severity: Major
                                      Found in server/core/middlewares/validators/videos/video-captions.ts - About 30 mins to fix

                                        Avoid too many return statements within this function.
                                        Open

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