Fix packet parsing for unknown zones, or zones that are not default
This commit is contained in:
parent
a897852072
commit
14f28c5263
@ -251,7 +251,7 @@ class Message extends FTNBase
|
|||||||
return $this->zone;
|
return $this->zone;
|
||||||
|
|
||||||
// If we have a domain, we'll use the zone from the domain
|
// If we have a domain, we'll use the zone from the domain
|
||||||
if ($x=$this->fdomain) {
|
if ($this->fdomain) {
|
||||||
if (($x=$this->fdomain->zones->search(function($item) { return $item->zone_id == $this->fz; })) !== FALSE)
|
if (($x=$this->fdomain->zones->search(function($item) { return $item->zone_id == $this->fz; })) !== FALSE)
|
||||||
return $this->fdomain->zones->get($x);
|
return $this->fdomain->zones->get($x);
|
||||||
}
|
}
|
||||||
@ -267,7 +267,7 @@ class Message extends FTNBase
|
|||||||
return $this->zone;
|
return $this->zone;
|
||||||
|
|
||||||
// If we have a domain, we'll use the zone from the domain
|
// If we have a domain, we'll use the zone from the domain
|
||||||
if ($x=$this->tdomain) {
|
if ($this->tdomain) {
|
||||||
if (($x=$this->tdomain->zones->search(function($item) { return $item->zone_id == $this->tz; })) !== FALSE)
|
if (($x=$this->tdomain->zones->search(function($item) { return $item->zone_id == $this->tz; })) !== FALSE)
|
||||||
return $this->tdomain->zones->get($x);
|
return $this->tdomain->zones->get($x);
|
||||||
}
|
}
|
||||||
|
@ -442,7 +442,7 @@ class Packet extends FTNBase implements \Iterator, \Countable
|
|||||||
Log::info(sprintf('%s:- Message [%s] has errors',self::LOGKEY,$msg->msgid));
|
Log::info(sprintf('%s:- Message [%s] has errors',self::LOGKEY,$msg->msgid));
|
||||||
|
|
||||||
// If the from address doenst exist, we'll create a new entry
|
// If the from address doenst exist, we'll create a new entry
|
||||||
if ($msg->errors->messages()->has('to')) {
|
if ($msg->errors->messages()->has('to') && $msg->tzone) {
|
||||||
$e = NULL;
|
$e = NULL;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
@ -484,7 +484,7 @@ class Packet extends FTNBase implements \Iterator, \Countable
|
|||||||
Log::alert(sprintf('%s: - To FTN is not defined, creating new entry for [%s] (%d)',self::LOGKEY,$msg->tboss,$ao->id));
|
Log::alert(sprintf('%s: - To FTN is not defined, creating new entry for [%s] (%d)',self::LOGKEY,$msg->tboss,$ao->id));
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($msg->errors->messages()->has('from')) {
|
if ($msg->errors->messages()->has('from') && $msg->tzone) {
|
||||||
$e = NULL;
|
$e = NULL;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
@ -59,6 +59,7 @@ class HomeController extends Controller
|
|||||||
foreach ($request->allFiles() as $key => $filegroup) {
|
foreach ($request->allFiles() as $key => $filegroup) {
|
||||||
if ($key !== 'file')
|
if ($key !== 'file')
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
foreach ($filegroup as $file) {
|
foreach ($filegroup as $file) {
|
||||||
try {
|
try {
|
||||||
$f = new File($file);
|
$f = new File($file);
|
||||||
|
Loading…
Reference in New Issue
Block a user