1
0
mirror of https://github.com/MailHops/mailhops-plugin.git synced 2025-05-17 14:50:08 -07:00

Added check for received header id mismatch for IP address closes #6 and closes #9

This commit is contained in:
Andrew Van Tassel 2017-01-07 12:51:57 -07:00
parent a8cc84b2f3
commit b0ef68a9c3

View File

@ -268,6 +268,7 @@ mailHops.testIP = function(ip,header){
|| lastchar.match(/\.|\d|\-/) || lastchar.match(/\.|\d|\-/)
|| ( firstchar == '?' && lastchar == '?' ) || ( firstchar == '?' && lastchar == '?' )
|| lastchar == ';' || lastchar == ';'
|| header.toLowerCase().indexOf('id '+ip) !== -1
|| parseInt(ip.substring(0,ip.indexOf('.'))) >= 240 //IANA-RESERVED || parseInt(ip.substring(0,ip.indexOf('.'))) >= 240 //IANA-RESERVED
){ ){
//only if there is one instance of this IP //only if there is one instance of this IP