1
0
Fork 0
mirror of https://github.com/Eggbertx/gochan.git synced 2025-08-26 14:46:24 -07:00
Commit graph

192 commits

Author SHA1 Message Date
Eggbertx
80f2b98147 Improve performance on gcutil.ParseIPRange for IPv6 2024-03-08 12:44:53 -08:00
Eggbertx
d74479298c Update plugin API documentation 2024-03-05 21:54:15 -08:00
Eggbertx
852dc8dc09 Remove unnecessary fingerprint fmt.Println call, 2024-03-05 21:17:48 -08:00
Eggbertx
6211b66403 Fix impossible condition 2024-03-04 13:55:03 -08:00
Eggbertx
5f449e11f6 Remove unused canFingerprint function 2024-02-28 10:37:51 -08:00
deepsource-autofix[bot]
1fa89846fc
refactor: unused parameter should be replaced by underscore
Unused parameters in functions or methods should be replaced with `_`
(underscore) or removed.
2024-02-28 17:45:52 +00:00
Eggbertx
8404e3834e Add image and video thumbnail fingerprint checking on post attempt 2024-02-27 20:47:12 -08:00
Eggbertx
54901cc6a3 Remove .bmp extension from ImageExtensions, since it isn't used 2024-02-23 13:50:15 -08:00
Eggbertx
7a37003be2 Move fingerprinting/SQL work to uploads package 2024-02-19 16:58:40 -08:00
Eggbertx
6be85e960a Remove Println from FingerprintFile 2024-02-19 15:58:11 -08:00
Eggbertx
96c2c2bffe Add on-demand fingerprinting function available to mods 2024-02-19 15:55:12 -08:00
Eggbertx
c5e44eb915 Make post info use a struct for safer typing, add staff-specific options JSON 2024-02-18 14:48:06 -08:00
Eggbertx
0795a0a8a8 Merge fingerprinting package into uploads package 2024-02-14 15:18:11 -08:00
Eggbertx
5e7a648e37 Start adding ahash fingerprinting support 2024-02-12 15:22:58 -08:00
Eggbertx
12ce2a71be Audit security issues pointed out by Deepsource 2024-02-07 15:01:19 -08:00
Eggbertx
e61d1e50c6 Handle SetupGeoIP if not set 2024-02-06 22:03:31 -08:00
Eggbertx
d892e77b3b Avoid deferring calls to Close() if it may return an error 2024-02-06 12:30:18 -08:00
deepsource-autofix[bot]
b457db6aa7
refactor: replace empty slice literal with var
An empty slice can be represented by `nil` or an empty slice literal. They are
functionally equivalent — their `len` and `cap` are both zero — but the `nil`
slice is the preferred style. For more information about empty slices,
see [Declaring Empty Slices](https://github.com/golang/go/wiki/CodeReviewComments#declaring-empty-slices).
2024-02-06 19:45:51 +00:00
Eggbertx
39908d74c6 Set up lua GeoIP handler registration and Cloudflare GeoIP header example plugin 2024-01-22 16:48:20 -08:00
Eggbertx
f78bcd3704 Add custom flag usage during post processing 2024-01-21 17:16:27 -08:00
Eggbertx
51c884ae6b Add custom flag validation, as well as custom flag validation 2024-01-21 16:02:53 -08:00
Eggbertx
2007b90556 Add basic geoip detection to posts, add image to post flag template 2024-01-20 22:41:40 -08:00
Eggbertx
24ff232c59 Add flag and country to post queries 2024-01-17 15:55:41 -08:00
Eggbertx
b3e7af65f7 Add configurable ISO code to MMDB, optionally get IP from env for debugging 2024-01-12 15:00:32 -08:00
Eggbertx
44ec667544 Add geoip package, make geoip config more flexible 2024-01-12 13:54:05 -08:00
Eggbertx
d294462968 Fix SQL string replacer messing with prepared statements in Postgres 2024-01-02 17:02:42 -08:00
Eggbertx
204ae9506f Update ban page and ban submission to accomodate ranges 2023-12-31 18:02:42 -08:00
Eggbertx
57693ba549 Replace IP field of IPBan with RangeStart and RangeEnd 2023-12-28 23:06:44 -08:00
Eggbertx
a8436c5ee4 Fix some issues reported by DeepSource 2023-12-19 14:33:40 -08:00
Eggbertx
b252e65ba7 Make templates private, accessible via template filename 2023-12-19 13:32:25 -08:00
Eggbertx
5980283218 Add MaxMind GeoIP loading 2023-12-06 14:54:51 -08:00
Eggbertx
9688082339 Move Lua plugin loaders to their respective gochan packages 2023-10-24 16:27:27 -07:00
Eggbertx
9a8cd64d2d Move Akismet checking to plugin 2023-10-20 16:49:46 -07:00
Eggbertx
53d5c877ed Print stack trace in MakePost to stdout if recover returns non-nil 2023-07-14 16:45:51 -07:00
Eggbertx
fb2e68c767 Remove no longer used request and writer args from file ban functions 2023-07-14 16:43:44 -07:00
Eggbertx
a0c0466725 Make thumbnail extension determining more dynamic, move to uploads pkg 2023-07-14 11:04:46 -07:00
Eggbertx
b0e81aac99 Don't depend on each file handler function to get file size 2023-07-14 08:38:21 -07:00
Eggbertx
cfbe7a8ffb Make upload extensions registerable by plugins 2023-07-13 09:01:28 -07:00
Eggbertx
4078197b8d Move upload handling to subpackage 2023-07-12 14:20:41 -07:00
Eggbertx
c573e26399 Add fixthumbnails manage function 2023-07-12 10:56:03 -07:00
Eggbertx
4264b8eeec Set Content-Type header to application/json when a post is submitted 2023-06-22 10:46:04 -07:00
Eggbertx
7c116dafc6 Backend: Return JSON when post is submitted via QR
Frontend: request thread and trigger update from returned JSON
2023-06-16 12:06:26 -07:00
Eggbertx
8014aaf4fb Prevent post from still being inserted if an error was encountered during upload 2023-06-15 13:45:32 -07:00
Eggbertx
20ba75cd5d Use ServeError instead of ServeErrorPage when handling captcha request errors 2023-06-15 13:28:05 -07:00
Eggbertx
d62520591a Use ServeError instead of ServeErrorPage when handling upload errors 2023-06-15 12:15:12 -07:00
Eggbertx
b1d182b4eb Treat recover data as string in MakePost log 2023-06-15 11:41:19 -07:00
Eggbertx
1276b3524a Add TLD checking plugin 2023-06-14 13:31:29 -07:00
Eggbertx
8b42d4102e Don't double-log if an event recovered from a panic 2023-06-12 08:50:45 -07:00
Eggbertx
6d22c86df1 Add message-pre-format event trigger 2023-06-09 15:16:34 -07:00
Eggbertx
381dd42a28 Prevent applying link to the argument of a url bbcode tag 2023-06-09 13:44:33 -07:00