Commit a2def12
Fixed null.split(':') crashes
Summary:
_extractHostFromHttpHost('') or _extractHostFromHttpHost(null) returns null (line 281-283), then _computeETLDPlus1ForHost calls _isIPAddress(null) → _isIPv6Address(null) → null.split(':') crashes.
The minimal fix is to bail out of _computeETLDPlus1ForHost when hostname is falsy. Downstream CookieSettings already accepts a null domain (cookie just won't have one), and processRequest resets etld_plus_1 = null at the top, so leaving it null is consistent.
My current fix (option A) — early-return in _computeETLDPlus1ForHost:
✅ Targeted, clear intent at the call site where the null actually originates
✅ Avoids a latent precedence bug at line 255 (more on this below)
❌ Doesn't protect other future callers of _isIPv6Address / _isIPAddress
___
overriding_review_checks_triggers_an_audit_and_retroactive_review
Oncall Short Name: advertiser_experience_foundations
Differential Revision: D104759549
fbshipit-source-id: 349b7edba71c1e082359e0530feec30fd73db1a91 parent 044e2a3 commit a2def12
1 file changed
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
246 | 246 | | |
247 | 247 | | |
248 | 248 | | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
249 | 254 | | |
250 | 255 | | |
251 | 256 | | |
| |||
0 commit comments