From 2b6494cfc9f69e89d41eb3549e62ec5d903dbb9e Mon Sep 17 00:00:00 2001 From: anthony Date: Tue, 26 Sep 2023 16:14:10 -0500 Subject: [PATCH 1/2] Added checks for undefined --- core/ftn_address.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/ftn_address.js b/core/ftn_address.js index 36ed34004..ec383c7e3 100644 --- a/core/ftn_address.js +++ b/core/ftn_address.js @@ -135,7 +135,7 @@ module.exports = class Address { static fromString(addrStr) { const m = FTN_ADDRESS_REGEXP.exec(addrStr); - if (m) { + if (m && m[2] && m[3]) { // start with a 2D let addr = { net: parseInt(m[2]), From d12b0789aa0ba2b3fea7467d9a7d9bb754f2c503 Mon Sep 17 00:00:00 2001 From: anthony Date: Tue, 26 Sep 2023 16:14:10 -0500 Subject: [PATCH 2/2] Added checks for undefined --- core/ftn_address.js | 2 +- core/system_view_validate.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/core/ftn_address.js b/core/ftn_address.js index 36ed34004..ec383c7e3 100644 --- a/core/ftn_address.js +++ b/core/ftn_address.js @@ -135,7 +135,7 @@ module.exports = class Address { static fromString(addrStr) { const m = FTN_ADDRESS_REGEXP.exec(addrStr); - if (m) { + if (m && m[2] && m[3]) { // start with a 2D let addr = { net: parseInt(m[2]), diff --git a/core/system_view_validate.js b/core/system_view_validate.js index 61c52a521..4c5521d18 100644 --- a/core/system_view_validate.js +++ b/core/system_view_validate.js @@ -91,7 +91,7 @@ function validateGeneralMailAddressedTo(data, cb) { // :TODO: remove hard-coded FTN check here. We need a decent way to register global supported flavors with modules. const addressedToInfo = getAddressedToInfo(data); - if (Message.AddressFlavor.FTN === addressedToInfo.flavor) { + if (Message.AddressFlavor.Local !== addressedToInfo.flavor) { return cb(null); }