Chocobozzz/PeerTube

View on GitHub

Showing 1,292 of 3,313 total issues

Avoid too many return statements within this function.
Open

    return next()
Severity: Major
Found in server/core/middlewares/validators/videos/video-files.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-stats.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-passwords.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/feeds.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/videos.ts - About 30 mins to fix

            Avoid too many return statements within this function.
            Open

                    return res.fail({
                      message: 'User video quota exceeds the maximum limit set by the admin to create a user archive containing videos',
                      type: ServerErrorCode.MAX_USER_VIDEO_QUOTA_EXCEEDED_FOR_USER_EXPORT,
                      status: HttpStatusCode.FORBIDDEN_403
                    })
            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 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

                    return next()
                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 res.sendStatus(HttpStatusCode.FORBIDDEN_403)
                  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 res.fail({ message: 'Cannot update privacy of a live that has already started' })
                    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 res.fail({
                                status: HttpStatusCode.FORBIDDEN_403,
                                message: 'Cannot create this live because the max user lives limit is reached.',
                                type: ServerErrorCode.MAX_USER_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-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 res.fail({
                                    status: HttpStatusCode.BAD_REQUEST_400,
                                    message: 'Cannot delete HLS playlist since this video does not have Web Video files'
                                  })
                            Severity: Major
                            Found in server/core/middlewares/validators/videos/video-files.ts - About 30 mins to fix

                              Avoid too many return statements within this function.
                              Open

                                    return res.fail({ message: 'Should have a magnetUri or a targetUrl or a torrent file.' })
                              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

                                    if (!await isVideoPasswordDeletable(res)) return
                                Severity: Major
                                Found in server/core/middlewares/validators/videos/video-passwords.ts - About 30 mins to fix

                                  Avoid too many return statements within this function.
                                  Open

                                        return
                                  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

                                        if (!await doesVideoChannelOfAccountExist(body.channelId, user, res)) return cleanUpReqFiles(req)
                                    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 res.fail({
                                              status: HttpStatusCode.BAD_REQUEST_400,
                                              type: ServerErrorCode.VIDEO_ALREADY_HAS_CAPTIONS,
                                              message: 'This video already has captions'
                                            })
                                      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.BAD_REQUEST_400,
                                                message: 'Cannot delete last HLS playlist file since this video does not have Web Video files'
                                              })
                                        Severity: Major
                                        Found in server/core/middlewares/validators/videos/video-files.ts - About 30 mins to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language