Closed phahulin closed 6 years ago
(Bug)
https://github.com/poanetwork/poa-popa/blob/e259cec1fcfcfdff30a52bffb395d845c774855b/web-dapp/server-lib/req_id.js#L17-L25
Current implementation may incorrectly extract ips from x-forwarded-for header, e.g. from 192.168.0.10:50000, 37.10.5.2.
192.168.0.10:50000, 37.10.5.2
The fix is probably to swap code block starting from line 19 with code block starting from line 22.
This seems like a very testable code. I think we should add tests for all these branches (specially a test that reproduces the bug that this PR fixes).
Sorry, that comment was meant to be in the PR.
(Bug)
report (i.e. something doesn't work as it should)https://github.com/poanetwork/poa-popa/blob/e259cec1fcfcfdff30a52bffb395d845c774855b/web-dapp/server-lib/req_id.js#L17-L25
Current implementation may incorrectly extract ips from x-forwarded-for header, e.g. from
192.168.0.10:50000, 37.10.5.2
.The fix is probably to swap code block starting from line 19 with code block starting from line 22.