jschan - Anonymous imageboard software. Classic look, modern features and feel. Works without JavaScript and supports Tor, I2P, Lokinet, etc.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

61 lines
1.7 KiB

5 years ago
{
"name": "jschan",
"version": "0.1.3",
3 years ago
"migrateVersion": "0.1.3",
5 years ago
"description": "",
"main": "server.js",
"dependencies": {
"@fatchan/gulp-pug": "^4.0.1",
"bcrypt": "^5.0.1",
"bull": "^3.22.0",
4 years ago
"cache-pug-templates": "^2.0.3",
"connect-redis": "^5.1.0",
4 years ago
"cookie-parser": "^1.4.5",
"csurf": "^1.11.0",
4 years ago
"del": "^6.0.0",
4 years ago
"dnsbl": "^3.2.0",
5 years ago
"express": "^4.17.1",
3 years ago
"express-fileupload": "git+https://gitgud.io/fatchan/express-fileupload.git#b2c0d9c0868fed3b4bbd5c0318cb162ee81146b4",
"express-session": "^1.17.0",
4 years ago
"file-type": "^15.0.1",
"fluent-ffmpeg": "^2.1.2",
5 years ago
"fs": "0.0.1-security",
3 years ago
"fs-extra": "^9.1.0",
"gm": "git+https://gitgud.io/fatchan/gm.git",
"gulp": "^4.0.2",
4 years ago
"gulp-clean-css": "^4.3.0",
"gulp-concat": "^2.6.1",
"gulp-less": "^4.0.1",
"gulp-replace": "^1.0.0",
"gulp-uglify-es": "^2.0.0",
"highlight.js": "^10.7.2",
"i18n-iso-countries": "^6.6.0",
"iconv-lite": "^0.6.2",
"imghash": "0.0.8",
"ioredis": "^4.25.0",
normalize IP addresses Currently jschan takes the IP address as a string from the `X-Real-Ip` header, which based on the frontend proxy configuration, OS settings, etc. can take various forms: IPv4 addresses can be given in normal IPv4 dotted notation (e.g. `1.2.3.4`) or as an IPv4-mapped IPv6 address (e.g. `::ffff:1.2.3.4`). The problem is, that in the latter case, node's `isIP` will report 6, so the code will try to split it along colons, breaking hrange and qrange. With IPv6 addresses, it's possible to elide runs of zeroes, so `::1` and `0:0:0:0:0:0:0:1` (and also `0000:0000:0000:0000:0000:0000:0000:0001`) represents the same address. Since it's pretty easy to get a /64 IPv6 block, a spammer can abuse it, by spamming from `a:b:c:d::1` (`qrange=a:b:c:d`, `hrange=a:b:c`), then from `a:b:c:d::1:1` (`qrange=a:b:c:d:`, `hrange=a:b:c`), `a:b:c:d::1:1:1` (`qrange=a:b:c:d::1`, `hrange=a:b:c:d`) and `a:b:c:d:1:1:1:1` (`qrange=a:b:c:d:1:1`, `hrange=a:b:c:d`). He practically got two hranges and qrange is pretty much pointless for IPv6 addresses. This change uses the `ip6addr` package to parse IP addresses and convert it to some canonical form. This means: * IPv4 and IPv4-mapped IPv6 addresses are converted to normal IPv4 notation. * Zero are not elided in IPv6 (so you'll never see `::`). * IPv6 addresses are not zero padded (so `..:1` instead of `..:0001`). * Even though it's not documented, it seems like `ip6addr` always generates lower-case letters. This will unfortunately mean that some IP hashes may change after the update. Normal IPv4 hashes will most probably remain the same though.
4 years ago
"ip6addr": "^0.2.3",
"mongodb": "^3.6.5",
"node-fetch": "^2.6.1",
"node-image-hash": "^1.0.7",
5 years ago
"path": "^0.12.7",
"pm2": "^4.5.6",
"pug": "^3.0.2",
"redlock": "^4.1.0",
"sanitize-html": "^2.3.3",
"saslprep": "^1.0.3",
"semver": "^7.3.5",
"socket.io": "^4.0.1",
"socket.io-redis": "^6.1.0",
"socks-proxy-agent": "^5.0.0",
"unix-crypt-td-js": "^1.1.4"
5 years ago
},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"setup": "npm i -g pm2 gulp && gulp",
"start": "pm2 start ecosystem.config.js --env production",
"start-dev": "pm2 start ecosystem.config.js --env development"
5 years ago
},
"author": "fatchan",
"license": "AGPL-3.0-only"
5 years ago
}