Chocobozzz/PeerTube

View on GitHub

Showing 1,292 of 3,313 total issues

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-playlists.ts - About 30 mins to fix

      Avoid too many return statements within this function.
      Open

            return res.fail({
              status: HttpStatusCode.CONFLICT_409,
              type: ServerErrorCode.VIDEO_ALREADY_BEING_TRANSCRIBED,
              message: 'This video is already being transcribed'
            })
      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.NOT_FOUND_404,
                message: 'This HLS playlist does not have this file id'
              })
        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

              if (!await isImportAccepted(req, res)) return cleanUpReqFiles(req)
          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 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/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/videos.ts - About 30 mins to fix

                  Avoid too many return statements within this function.
                  Open

                        return res.fail({ message: 'Cannot update a watch later playlist.' })
                  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 (body.videoChannelId && !await doesVideoChannelIdExist(body.videoChannelId, res)) return cleanUpReqFiles(req)
                    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 isLiveVideoAccepted(req, 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 true
                        Severity: Major
                        Found in server/core/middlewares/validators/videos/video-source.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-files.ts - About 30 mins to fix

                            Avoid too many return statements within this function.
                            Open

                                    return res.fail({
                                      status: HttpStatusCode.FORBIDDEN_403,
                                      message: 'Cannot use non unicast IP as targetUrl.'
                                    })
                            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({
                                      status: HttpStatusCode.CONFLICT_409,
                                      message: 'This video is already duplicated by your instance.'
                                    })
                              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 next()
                                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 res.fail({ message: 'Invalid video or playlist id.' })
                                  Severity: Major
                                  Found in server/core/middlewares/validators/oembed.ts - About 30 mins to fix

                                    Avoid too many return statements within this function.
                                    Open

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

                                      Avoid too many return statements within this function.
                                      Open

                                          return res.fail({
                                            status: HttpStatusCode.FORBIDDEN_403,
                                            message: 'Playlist is not public'
                                          })
                                      Severity: Major
                                      Found in server/core/middlewares/validators/oembed.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 ${body.channel.name} already exists.`
                                                  })
                                        Severity: Major
                                        Found in server/core/middlewares/validators/users/user-registrations.ts - About 30 mins to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language