Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[24.1] fix CILogon redirect #18974

Merged
merged 1 commit into from
Oct 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions client/src/utils/redirect.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ test("route prefix changes", async () => {
expect(withPrefix("http://")).toEqual("http://");
expect(withPrefix("/")).toEqual("/prefix/");
expect(withPrefix("/home")).toEqual("/prefix/home");
// keep protocols in query parameters intact
expect(withPrefix("/authz/cilogon/login?idphint=https://test.com")).toEqual(
"/prefix/authz/cilogon/login?idphint=https://test.com"
);
// ensure that it can only be called once
expect(withPrefix(withPrefix("/home"))).toEqual("/prefix/prefix/home");
// This doesn't do what it looks like it should do?
Expand Down
2 changes: 1 addition & 1 deletion client/src/utils/redirect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export function reloadPage() {
window.location.reload();
}

const slashCleanup = /(\/)+/g;
const slashCleanup = /(?<!:)(\/)+/g;
/**
* Prepends the configured app root to given url
* @param path
Expand Down
Loading