bosagora / agora

POC Node implementation for CoinNet
https://bosagora.io
MIT License
37 stars 23 forks source link

Registry: Prevent registering loopback addresses #3264

Closed mkykadir closed 2 years ago

mkykadir commented 2 years ago

to reduce the attack surface on nodes' host machines. Loopback address registry is still allowed when node.testing is set (i.e. Registry and network is in testing mode) to still support local testing networks.

Fixes #3261

codecov[bot] commented 2 years ago

Codecov Report

Merging #3264 (10c3eab) into v0.x.x (4a16c27) will increase coverage by 0.06%. The diff coverage is 33.33%.

@@            Coverage Diff             @@
##           v0.x.x    #3264      +/-   ##
==========================================
+ Coverage   87.80%   87.87%   +0.06%     
==========================================
  Files         164      164              
  Lines       16923    16929       +6     
==========================================
+ Hits        14860    14876      +16     
+ Misses       2063     2053      -10     
Flag Coverage Δ
integration 36.16% <ø> (?)
unittests 87.82% <33.33%> (+0.01%) :arrow_up:

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
source/agora/node/FullNode.d 73.37% <ø> (-0.31%) :arrow_down:
source/agora/node/Registry.d 77.13% <33.33%> (-0.56%) :arrow_down:
source/agora/network/Manager.d 79.01% <0.00%> (+0.65%) :arrow_up:
source/agora/consensus/state/Ledger.d 91.27% <0.00%> (+0.67%) :arrow_up:
source/agora/common/BanManager.d 87.39% <0.00%> (+0.84%) :arrow_up:
source/agora/node/Validator.d 92.42% <0.00%> (+1.01%) :arrow_up:
source/agora/utils/Log.d 62.26% <0.00%> (+5.03%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 4a16c27...10c3eab. Read the comment docs.