discourse/discourse

View on GitHub

Showing 1,782 of 2,040 total issues

Avoid too many return statements within this method.
Open

      return url if WHITELISTED_REDIRECT_HOSTNAMES.include?(uri.hostname) || is_cdn_link
Severity: Major
Found in app/models/topic_link_click.rb - About 30 mins to fix

    Avoid too many return statements within this method.
    Open

          return nil
    Severity: Major
    Found in app/models/topic_link_click.rb - About 30 mins to fix

      Avoid too many return statements within this method.
      Open

          return url if args[:user_id] && link.user_id == args[:user_id]
      Severity: Major
      Found in app/models/topic_link_click.rb - About 30 mins to fix

        Avoid too many return statements within this method.
        Open

            return true if ip_address.nil?
        Severity: Major
        Found in app/models/screened_ip_address.rb - About 30 mins to fix

          Avoid too many return statements within this method.
          Open

                return thumbnail if thumbnail
          Severity: Major
          Found in app/models/optimized_image.rb - About 30 mins to fix

            Avoid too many return statements within this method.
            Open

                      return
            Severity: Major
            Found in app/controllers/session_controller.rb - About 30 mins to fix

              Avoid too many return statements within this method.
              Open

                        return nil
              Severity: Major
              Found in app/models/optimized_image.rb - About 30 mins to fix

                Avoid too many return statements within this method.
                Open

                      return render(json: @second_factor_failure_payload)
                Severity: Major
                Found in app/controllers/session_controller.rb - About 30 mins to fix

                  Avoid too many return statements within this method.
                  Open

                            redirect_to(users_account_created_path) && (return)
                  Severity: Major
                  Found in app/controllers/session_controller.rb - About 30 mins to fix

                    Avoid too many return statements within this method.
                    Open

                          return render json: payload
                    Severity: Major
                    Found in app/controllers/session_controller.rb - About 30 mins to fix

                      Avoid too many return statements within this method.
                      Open

                            return render body: nil, status: :forbidden
                      Severity: Major
                      Found in app/controllers/users_controller.rb - About 30 mins to fix

                        Avoid too many return statements within this method.
                        Open

                              return
                        Severity: Major
                        Found in app/controllers/application_controller.rb - About 30 mins to fix

                          Avoid too many return statements within this method.
                          Open

                                return fail_with('login.incorrect_username_email_or_password')
                          Severity: Major
                          Found in app/controllers/users_controller.rb - About 30 mins to fix

                            Avoid too many return statements within this method.
                            Open

                                  return
                            Severity: Major
                            Found in app/controllers/static_controller.rb - About 30 mins to fix

                              Avoid too many return statements within this method.
                              Open

                                  return if !should_enforce_2fa?
                              Severity: Major
                              Found in app/controllers/application_controller.rb - About 30 mins to fix

                                Avoid too many return statements within this method.
                                Open

                                      return
                                Severity: Major
                                Found in app/controllers/topics_controller.rb - About 30 mins to fix

                                  Avoid too many return statements within this method.
                                  Open

                                        return
                                  Severity: Major
                                  Found in app/controllers/static_controller.rb - About 30 mins to fix

                                    Avoid too many return statements within this method.
                                    Open

                                          return render json: failed_json, status: 422
                                    Severity: Major
                                    Found in app/controllers/users_controller.rb - About 30 mins to fix

                                      Avoid too many return statements within this method.
                                      Open

                                            return
                                      Severity: Major
                                      Found in app/controllers/static_controller.rb - About 30 mins to fix

                                        Avoid too many return statements within this method.
                                        Open

                                                  return fail_with("login.missing_user_field") if f.required?
                                        Severity: Major
                                        Found in app/controllers/users_controller.rb - About 30 mins to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language