Uploaded image for project: 'Red Hat build of Keycloak'
  1. Red Hat build of Keycloak
  2. RHBK-3920

Admin Client creates malformed paths for requests [GHI#44269]

XMLWordPrintable

    • False
    • Hide

      None

      Show
      None
    • False

      Before reporting an issue

      [x] I have read and understood the above terms for submitting issues, and I understand that my issue may be closed without action if I do not follow them.

      Area

      admin/client-js

      Describe the bug

      When the admin client is constructed with a URL that contains a trailing slash, paths are joined with multiple slashes, causing failures. This is compounded by recent changes that enforce URLs do not contain multiple slashes (see #43765)

      Version

      main

      Regression

      [ ] The issue is a regression

      Expected behavior

      The admin client does not add double slashes to base URLs that already end in a slash.

      Actual behavior

      The admin client adds double slashes to base URLs that already end in a slash.

      How to Reproduce?

      const adminClient = new KeycloakAdminClient({
        baseUrl: "http://localhost:8080/"
      });
      

      Anything else?

      No response

              Unassigned Unassigned
              pvlha Pavel Vlha
              Keycloak Core Clients
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: