proxy-addr icon indicating copy to clipboard operation
proxy-addr copied to clipboard

invalid range on address: 0.0.0.0/0

Open ledlamp opened this issue 8 months ago • 0 comments

streaming-1  | /opt/mastodon/node_modules/proxy-addr/index.js:192
streaming-1  |     throw new TypeError('invalid range on address: ' + note)
streaming-1  |           ^
streaming-1  |
streaming-1  | TypeError: invalid range on address: 0.0.0.0/0
streaming-1  |     at parseipNotation (/opt/mastodon/node_modules/proxy-addr/index.js:192:11)
streaming-1  |     at compileRangeSubnets (/opt/mastodon/node_modules/proxy-addr/index.js:126:23)
streaming-1  |     at Function.compile (/opt/mastodon/node_modules/proxy-addr/index.js:112:23)
streaming-1  |     at exports.compileTrust (/opt/mastodon/node_modules/express/lib/utils.js:234:20)
streaming-1  |     at Function.set (/opt/mastodon/node_modules/express/lib/application.js:389:34)
streaming-1  |     at startServer (file:///opt/mastodon/streaming/index.js:149:7)
streaming-1  |     at file:///opt/mastodon/streaming/index.js:1401:1
streaming-1  |     at ModuleJob.run (node:internal/modules/esm/module_job:234:25)
streaming-1  |     at async ModuleLoader.import (node:internal/modules/esm/loader:473:24)
streaming-1  |     at async asyncRunEntryPointWithESMLoader (node:internal/modules/run_main:122:5)
streaming-1  |
streaming-1  | Node.js v20.18.1

This should not be invalid. I want to trust any IP because reverse proxy already does it and there is huge list of IPs.

The application does not let me unset trust:

https://github.com/mastodon/mastodon/blob/1cf30717dbe7a0038a645c62f19deef7efc42207/streaming/index.js#L150

ledlamp avatar Feb 10 '25 04:02 ledlamp