Commit 15f11a5
committed
Drop iss slash-stripping workaround now that empty paths are preserved
With url_preserve_empty_path on the OAuth metadata models (#2925), the issuer
parsed from the wire keeps its empty path, so str(oauth_metadata.issuer) is
already the byte-exact value the authorization server transmitted. Remove
_strip_authority_trailing_slash / raw_issuer and compare directly.
This also fixes the false rejection the heuristic introduced for an issuer that
genuinely ends in a trailing slash (e.g. Auth0's https://tenant.auth0.com/):
its redirect iss now matches its advertised issuer instead of being stripped.1 parent 109c391 commit 15f11a5
4 files changed
Lines changed: 29 additions & 55 deletions
File tree
- src/mcp/client/auth
- tests
- client
- interaction/auth
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
211 | 211 | | |
212 | 212 | | |
213 | 213 | | |
214 | | - | |
215 | | - | |
216 | | - | |
217 | | - | |
218 | | - | |
219 | | - | |
220 | | - | |
221 | | - | |
222 | | - | |
223 | | - | |
224 | | - | |
225 | | - | |
226 | | - | |
227 | | - | |
228 | | - | |
229 | | - | |
230 | | - | |
231 | 214 | | |
232 | 215 | | |
233 | 216 | | |
| |||
241 | 224 | | |
242 | 225 | | |
243 | 226 | | |
244 | | - | |
| 227 | + | |
245 | 228 | | |
246 | 229 | | |
247 | 230 | | |
| |||
261 | 244 | | |
262 | 245 | | |
263 | 246 | | |
264 | | - | |
265 | | - | |
| 247 | + | |
266 | 248 | | |
267 | | - | |
| 249 | + | |
268 | 250 | | |
269 | 251 | | |
270 | 252 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
28 | 27 | | |
29 | 28 | | |
30 | 29 | | |
| |||
2642 | 2641 | | |
2643 | 2642 | | |
2644 | 2643 | | |
2645 | | - | |
2646 | | - | |
2647 | | - | |
| 2644 | + | |
2648 | 2645 | | |
2649 | 2646 | | |
2650 | 2647 | | |
2651 | | - | |
2652 | | - | |
2653 | | - | |
2654 | | - | |
2655 | | - | |
| 2648 | + | |
| 2649 | + | |
| 2650 | + | |
| 2651 | + | |
| 2652 | + | |
| 2653 | + | |
| 2654 | + | |
| 2655 | + | |
| 2656 | + | |
2656 | 2657 | | |
2657 | 2658 | | |
2658 | 2659 | | |
2659 | 2660 | | |
2660 | | - | |
| 2661 | + | |
2661 | 2662 | | |
2662 | | - | |
2663 | | - | |
2664 | | - | |
| 2663 | + | |
| 2664 | + | |
| 2665 | + | |
| 2666 | + | |
| 2667 | + | |
2665 | 2668 | | |
2666 | 2669 | | |
2667 | | - | |
| 2670 | + | |
2668 | 2671 | | |
2669 | | - | |
| 2672 | + | |
2670 | 2673 | | |
2671 | 2674 | | |
2672 | 2675 | | |
| |||
2692 | 2695 | | |
2693 | 2696 | | |
2694 | 2697 | | |
2695 | | - | |
| 2698 | + | |
2696 | 2699 | | |
2697 | 2700 | | |
2698 | 2701 | | |
2699 | 2702 | | |
2700 | | - | |
2701 | | - | |
2702 | | - | |
2703 | | - | |
2704 | | - | |
2705 | | - | |
2706 | | - | |
2707 | | - | |
2708 | | - | |
2709 | | - | |
2710 | | - | |
2711 | | - | |
| 2703 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
64 | 65 | | |
65 | 66 | | |
66 | 67 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
23 | 22 | | |
24 | 23 | | |
25 | 24 | | |
| |||
240 | 239 | | |
241 | 240 | | |
242 | 241 | | |
243 | | - | |
| 242 | + | |
244 | 243 | | |
245 | 244 | | |
246 | 245 | | |
| |||
0 commit comments