Commit bbda2a2
Drop brace-aware splitter; keep MSI extraction at parity with rest of parser
Reverts 825d902's _split_top_level_params helper and the
test_msi_braced_value_cannot_forge_uid test. The brace-aware fix
prevents a Database value containing ';uid=<guid>;' from spoofing
a top-level UID, but:
- The same naive split(';') exists in process_connection_string and
extract_auth_type for ALL Entra ID auth types (Default, DeviceCode,
Interactive, MSI). Hardening only the MSI helper is inconsistent.
- A Database name with embedded semicolons + a syntactically valid
GUID after ';uid=' is vanishingly unlikely in practice.
- The fix belongs in its own PR scoped to the connection-string
parser, not in the MSI feature PR.
What stays:
- H1 fix: persist _credential_kwargs on Connection so cursor.bulkcopy()
acquires its fresh token with the right user-assigned client_id
- Real cursor.bulkcopy() regression test (mocks mssql_py_core, captures
AADAuth.get_raw_token args)
- Connection.__init__ persistence tests
- Black formatting
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent 825d902 commit bbda2a2
2 files changed
Lines changed: 6 additions & 86 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
150 | 150 | | |
151 | 151 | | |
152 | 152 | | |
153 | | - | |
154 | | - | |
155 | | - | |
156 | | - | |
157 | | - | |
158 | | - | |
159 | | - | |
160 | | - | |
161 | | - | |
162 | | - | |
163 | | - | |
164 | | - | |
165 | | - | |
166 | | - | |
167 | | - | |
168 | | - | |
169 | | - | |
170 | | - | |
171 | | - | |
172 | | - | |
173 | | - | |
174 | | - | |
175 | | - | |
176 | | - | |
177 | | - | |
178 | | - | |
179 | | - | |
180 | | - | |
181 | | - | |
182 | | - | |
183 | | - | |
184 | | - | |
185 | | - | |
186 | | - | |
187 | | - | |
188 | | - | |
189 | | - | |
190 | | - | |
191 | | - | |
192 | | - | |
193 | | - | |
194 | | - | |
195 | | - | |
196 | | - | |
197 | | - | |
198 | | - | |
| 153 | + | |
| 154 | + | |
199 | 155 | | |
200 | 156 | | |
201 | | - | |
202 | | - | |
203 | | - | |
204 | | - | |
205 | | - | |
206 | | - | |
207 | | - | |
208 | | - | |
209 | | - | |
| 157 | + | |
210 | 158 | | |
211 | | - | |
| 159 | + | |
212 | 160 | | |
213 | 161 | | |
214 | 162 | | |
| |||
400 | 348 | | |
401 | 349 | | |
402 | 350 | | |
403 | | - | |
404 | | - | |
405 | | - | |
406 | | - | |
| 351 | + | |
407 | 352 | | |
408 | 353 | | |
409 | | - | |
| 354 | + | |
410 | 355 | | |
411 | 356 | | |
412 | 357 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
573 | 573 | | |
574 | 574 | | |
575 | 575 | | |
576 | | - | |
577 | | - | |
578 | | - | |
579 | | - | |
580 | | - | |
581 | | - | |
582 | | - | |
583 | | - | |
584 | | - | |
585 | | - | |
586 | | - | |
587 | | - | |
588 | | - | |
589 | | - | |
590 | | - | |
591 | | - | |
592 | | - | |
593 | | - | |
594 | | - | |
595 | | - | |
596 | | - | |
597 | | - | |
598 | | - | |
599 | | - | |
600 | | - | |
601 | 576 | | |
602 | 577 | | |
603 | 578 | | |
| |||
0 commit comments