Commit 0f5513e5 authored by brizental's avatar brizental Committed by Pier Angelo Vendrame
Browse files

fixup! TB 8324: Prevent DNS proxy bypasses caused by Drag&Drop

parent 8e10fd98
Loading
Loading
Loading
Loading
+1 −5
Original line number Diff line number Diff line
@@ -97,11 +97,7 @@ export const DragDropFilter = {
        const links = aDataTransfer.mozGetDataAt(urlType, i);
        // Skip DNS-safe URLs (no hostname, e.g. RFC 3966 tel:)
        const mayLeakDNS = links.split("\n").some(link => {
          try {
            return new URL(link).hostname;
          } catch (e) {
            return false;
          }
          return URL.parse(link)?.hostname ?? false;
        });
        if (!mayLeakDNS) {
          continue;