مراية لـ
https://github.com/postalserver/postal.git
تم المزامنة 2025-12-01 05:43:04 +00:00
don't bother looking up local IPs
هذا الالتزام موجود في:
@@ -117,7 +117,7 @@ module Postal
|
|||||||
# We know this IP isn't valid. We don't need to do anything
|
# We know this IP isn't valid. We don't need to do anything
|
||||||
else
|
else
|
||||||
# We need to look this up
|
# We need to look this up
|
||||||
if ip_address = IPAddress.where("ipv4 = ? OR ipv6 = ?", ip, ip).first
|
if !self.class.local_ip?(ip) && ip_address = IPAddress.where("ipv4 = ? OR ipv6 = ?", ip, ip).first
|
||||||
@pairs[ip_address.ipv4] = ip_address.ipv6
|
@pairs[ip_address.ipv4] = ip_address.ipv6
|
||||||
@ip_to_id_mapping[ip] = ip_address.id
|
@ip_to_id_mapping[ip] = ip_address.id
|
||||||
need = id
|
need = id
|
||||||
@@ -178,5 +178,9 @@ module Postal
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def self.local_ip?(ip)
|
||||||
|
!!(ip =~ /\A(127\.|fe80:|::)/)
|
||||||
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
المرجع في مشكلة جديدة
حظر مستخدم