Commit 4619687
committed
fix(ci): Windows link mismatch + auth-context param leak (#22)
- mcp_authorization_policy.hpp forward-declared EndpointConfig as
`class` while it is actually a `struct`. MSVC mangles the
struct/class keyword into function symbol names, so the resulting
`MCPAuthorizationPolicy::authorize` symbol seen at mcp_tool_handler's
call site (struct, U-prefix) never matched the one emitted from
mcp_authorization_policy.cpp (class, V-prefix), producing LNK2019 on
Windows release while Itanium ABI builds linked cleanly. Fixed by
changing the forward decl to `struct`.
- RequestValidator::validateRequestFields now skips the reserved
`__auth_*` prefix used by APIServer to inject auth context. Before
this fix, write endpoints with validate_before_write enabled rejected
every authenticated request as containing 5 phantom unknown fields
(__auth_username/_email/_roles/_type/_authenticated), surfacing as
the test_write_operations integration regressions on main.
Unit-tested both the positive case (auth-prefix lets through) and the
negative case (a key merely containing __auth_ is still rejected).1 parent c09aaa0 commit 4619687
3 files changed
Lines changed: 37 additions & 2 deletions
File tree
- src
- include
- test/cpp
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
311 | 311 | | |
312 | 312 | | |
313 | 313 | | |
314 | | - | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
315 | 318 | | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
316 | 322 | | |
317 | 323 | | |
318 | 324 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
723 | 723 | | |
724 | 724 | | |
725 | 725 | | |
| 726 | + | |
| 727 | + | |
| 728 | + | |
| 729 | + | |
| 730 | + | |
| 731 | + | |
| 732 | + | |
| 733 | + | |
| 734 | + | |
| 735 | + | |
| 736 | + | |
| 737 | + | |
| 738 | + | |
| 739 | + | |
| 740 | + | |
| 741 | + | |
| 742 | + | |
| 743 | + | |
| 744 | + | |
| 745 | + | |
| 746 | + | |
| 747 | + | |
| 748 | + | |
| 749 | + | |
| 750 | + | |
| 751 | + | |
| 752 | + | |
| 753 | + | |
| 754 | + | |
726 | 755 | | |
0 commit comments