Skip to content

Oathkeeper 26.2 strips trailing slash #1266

Description

@xqqp

Preflight checklist

Ory Network Project

No response

Describe the bug

After upgrading to Oathkeeper 26.2 from 25.4, upstream requests lose their trailing slash.

Reproducing the bug

  1. Run Oathkeeper 26.2
  2. Do a request to http://host/some/path/, with strip_path: "/some"
  3. Oathkeeper does a request to http://host/path (notice no trailing slash)

Relevant log output

Relevant configuration

Version

26.2.0

On which operating system are you observing this issue?

Linux

In which environment are you deploying?

Docker

Additional Context

This is likely due to this commit: 8e00021
In the commit path.Join is introduced, which does not leave a trailing slash

Example:

package main

import (
	"fmt"
	"path"
)

func main() {
	a := "/a"
	b := "b/"
	fmt.Println(path.Join(a,b)) // prints /a/b (no trailing slash!)
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething is not working.

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions