Commit a1a3f98
Handle invalid source control URLs in registry identity lookup
Add validation for source control URLs at multiple levels:
1. Add `isValid` property to `SourceControlURL` that checks:
- URL doesn't contain whitespace (indicates malformed URL)
- URL is parseable as a standard URL with a host, OR
- URL matches SSH-style git format (user@host:path)
2. Validate URLs early in `mapRegistryIdentity` before making
registry requests
3. Handle HTTP 400 responses from the registry server by throwing
`RegistryError.invalidSourceControlURL`
This handles cases where malformed URLs (e.g., containing git credential
error messages like "'URL': failed looking up identity...") are passed
to the registry.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <[email protected]>1 parent 5547e32 commit a1a3f98
File tree
5 files changed
+118
-1
lines changed- Sources
- Basics
- PackageRegistry
- Workspace
- Tests
- BasicsTests
- PackageRegistryTests
5 files changed
+118
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
41 | 67 | | |
42 | 68 | | |
43 | 69 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1066 | 1066 | | |
1067 | 1067 | | |
1068 | 1068 | | |
| 1069 | + | |
| 1070 | + | |
| 1071 | + | |
| 1072 | + | |
| 1073 | + | |
1069 | 1074 | | |
1070 | 1075 | | |
1071 | 1076 | | |
1072 | 1077 | | |
1073 | 1078 | | |
1074 | 1079 | | |
1075 | 1080 | | |
1076 | | - | |
| 1081 | + | |
1077 | 1082 | | |
1078 | 1083 | | |
1079 | 1084 | | |
| |||
1503 | 1508 | | |
1504 | 1509 | | |
1505 | 1510 | | |
| 1511 | + | |
1506 | 1512 | | |
1507 | 1513 | | |
1508 | 1514 | | |
| |||
1580 | 1586 | | |
1581 | 1587 | | |
1582 | 1588 | | |
| 1589 | + | |
| 1590 | + | |
1583 | 1591 | | |
1584 | 1592 | | |
1585 | 1593 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
22 | 23 | | |
23 | 24 | | |
24 | 25 | | |
| |||
332 | 333 | | |
333 | 334 | | |
334 | 335 | | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
335 | 341 | | |
336 | 342 | | |
337 | 343 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3148 | 3148 | | |
3149 | 3149 | | |
3150 | 3150 | | |
| 3151 | + | |
| 3152 | + | |
| 3153 | + | |
| 3154 | + | |
| 3155 | + | |
| 3156 | + | |
| 3157 | + | |
| 3158 | + | |
| 3159 | + | |
| 3160 | + | |
| 3161 | + | |
| 3162 | + | |
| 3163 | + | |
| 3164 | + | |
| 3165 | + | |
| 3166 | + | |
| 3167 | + | |
| 3168 | + | |
| 3169 | + | |
| 3170 | + | |
| 3171 | + | |
| 3172 | + | |
| 3173 | + | |
| 3174 | + | |
| 3175 | + | |
| 3176 | + | |
| 3177 | + | |
| 3178 | + | |
| 3179 | + | |
| 3180 | + | |
| 3181 | + | |
| 3182 | + | |
| 3183 | + | |
3151 | 3184 | | |
3152 | 3185 | | |
3153 | 3186 | | |
| |||
0 commit comments