Skip to content

DEFAULT_URI value without trailing slash results in invalid SAML AssertionConsumerServiceURL parameter #1118

@TerrorBite

Description

@TerrorBite

Describe the bug
DEFAULT_URI value without trailing slash results in invalid SAML AssertionConsumerServiceURL parameter

To Reproduce
Steps to reproduce the behavior:

  1. Configure Part-DB behind a reverse proxy with a DEFAULT_URI that does not have a trailing slash. For example, https://partdb.domain.invalid
  2. Validate that Part-DB functions as expected behind the reverse proxy.
  3. Configure Part-DB for SAML SSO with an identify provider such as Keycloak.
  4. Attempt Single Sign-On login in Part-DB.
  5. Observe that the identity provider rejects the request with an error such as "invalid redirect".
  6. Decode the SAML request, observe that the AssertionConsumerServiceURL parameter has a value like "https://partdb.domain.invalidsaml/acs" (missing slash after the domain component).

Expected behavior
SAML SSO should succeed even if the value of the DEFAULT_URI setting does not have a trailing slash.

Screenshots
N/A

Server Side

  • Part-DB Version: 2.2.1 (from docker image with hash sha256:a4f0a4396a8511598560be6186f9c9d4ec52697732b275c3e7c508e93803a247)
  • PHP Version: bundled with Docker image
  • Database Server: sqlite

Desktop (please complete the following information):

  • OS: Windows 11
  • Browser: Firefox 145.0

Smartphone (please complete the following information):
N/A (not tested on a smartphone)

Additional context
N/A

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions