minilauta / miniboard

Minimalistic oldschool imageboard software
MIT License
7 stars 5 forks source link

prevent posting if ip address is banned #63

Closed Gaikanyymi closed 1 year ago

Gaikanyymi commented 1 year ago

Basic functionality to prevent posting if user's IP address is in the 'bans' table. Returns 403 Forbidden in case matching IP is found and ban expiry date has not yet been passed.

Very limited testing done from the performance perspective. I ran this locally in dev mode with approx. 0.9 million rows in the bans table, with no noticeable effects. Raw SQL query seems to take less than 20 milliseconds.

Anonyymi commented 1 year ago

It looks fine to me. Sorry for the delay, I've been away so it took a while to respond and merge this.