Verified Commit a484dcdd authored by valenting's avatar valenting Committed by ma1
Browse files

Bug 2022726 - Do not allow trrServer in DNS request issued by content process...

Bug 2022726 - Do not allow trrServer in DNS request issued by content process r=necko-reviewers,kershaw

Differential Revision: https://phabricator.services.mozilla.com/D288150
parent 7da4069a
Loading
Loading
Loading
Loading
+4 −0
Changes for netwerk/ipc/NeckoParent.cpp: 4 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -436,6 +436,10 @@ mozilla::ipc::IPCResult NeckoParent::RecvPDNSRequestConstructor(
    const nsACString& aTrrServer, const int32_t& aPort, const uint16_t& aType,
    const OriginAttributes& aOriginAttributes,
    const nsIDNSService::DNSFlags& aFlags) {
  if (!aTrrServer.IsEmpty()) {
    return IPC_FAIL(this, "Content process should not specify TRR server");
  }

  RefPtr<DNSRequestParent> actor = static_cast<DNSRequestParent*>(aActor);
  RefPtr<DNSRequestHandler> handler =
      actor->GetDNSRequest()->AsDNSRequestHandler();