Commit 5d12a0af authored by valenting's avatar valenting Committed by Pier Angelo Vendrame
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 3225daac
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -400,6 +400,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();