Skip to content

pac4j: preserve absolute URLs in URL resolver - #4020

Open
2748109647 wants to merge 1 commit into
jooby-project:mainfrom
2748109647:fix/4010-preserve-absolute-pac4j-urls
Open

2748109647 wants to merge 1 commit into
jooby-project:mainfrom
2748109647:fix/4010-preserve-absolute-pac4j-urls

Conversation

@2748109647

Copy link
Copy Markdown

Closes #4010

UrlResolverImpl is used for callback and authentication-server URLs. With a request context, it currently treats every absolute URL as an application path, replacing its authority and dropping its query string. For CAS, this sends the login redirect back to the application instead of the CAS server.

Return absolute URLs unchanged and keep context-based resolution for relative URLs. This preserves configured absolute callback and external login URLs while retaining trusted-proxy-aware resolution for relative callback paths. It also keeps absolute callback URLs valid for the case fixed by #3637.

Verification

  • Targeted reactor test UrlResolverImplTest: 2 tests passed with Maven 3.9.9 and JDK 21.
  • git diff --check: passed.
  • The full module suite was not run. The focused test ran in an isolated copy where the unrelated jooby-stork entry was temporarily omitted from modules/pom.xml because this local root-reactor scan reported Unknown packaging: tile; no build-file change is included in this PR.

@codecov

codecov Bot commented Oct 21, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.16%. Comparing base (7605c08) to head (84b1413).

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #4020      +/-   ##
============================================
- Coverage     94.18%   94.16%   -0.03%     
+ Complexity     6653     6652       -1     
============================================
  Files           432      432              
  Lines         20893    20894       +1     
  Branches       2096     2096              
============================================
- Hits          19678    19674       -4     
- Misses          757      764       +7     
+ Partials        458      456       -2     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

pac4j: UrlResolverImpl rewrites absolute URLs of external servers (CAS login URL) with the local host

1 participant