Open Bug 1717885 Opened 3 years ago Updated 3 years ago

Fix host string matching in HasRootDomain

Categories

(Core :: Networking, defect, P3)

defect

Tracking

()

People

(Reporter: pbz, Unassigned)

References

(Regression)

Details

(Keywords: regression, Whiteboard: [necko-triaged])

We check if the host is part of the input here with Find(): https://searchfox.org/mozilla-central/rev/9975889f5c0d5c59bd22121a454beba774cbae71/netwerk/dns/nsEffectiveTLDService.cpp#479

Valentin suggested that this is wrong and we should rather directly pass aHost into Find or wrap it in an nsAutoCString:

At worst it should be nsAutoCString(aInput).Find(aHost) or nsAutoCString(aInput).Find(nsAutoCString(aHost))

See comment here: https://phabricator.services.mozilla.com/D113128#inline-655805

Note that Bug 1705030 will move the HasRootDomain implementation to NetUtil.cpp

Severity: -- → S4
Priority: -- → P3
Whiteboard: [necko-triaged]
Has Regression Range: --- → yes
You need to log in before you can comment on or make changes to this bug.