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

211 commits

Author SHA1 Message Date
Eggbertx
26dcb34edf Apply suggestions made by DeepSource 2024-08-30 23:08:01 -07:00
Eggbertx
ec63cf0ac9 Improve error handling during post formatting 2024-08-26 21:16:03 -07:00
Eggbertx
84c101e865 Clean up some no longer used code 2024-08-25 17:30:18 -07:00
Eggbertx
cea738adb1 Fix POST requests not working on manage pages, don't reject the post if filter action = log 2024-08-25 17:20:21 -07:00
Eggbertx
ce293d3e24 replace is_regex in filters with more string matching options (substring, regex, exact match) 2024-08-24 15:37:34 -07:00
Eggbertx
dbc9702b6d Fix DoPostFiltering using post ID instead of board ID 2024-08-23 17:17:46 -07:00
Eggbertx
35860a8a6d Implement file fingerprint, filename, and checksum banning via filter conditions 2024-08-17 16:26:11 -07:00
Eggbertx
d40e561287 Start migrating wordfilter struct and usage 2024-08-11 13:59:58 -07:00
Eggbertx
b85b91c04d Don't write file thumbnail if spoiler (otherwise it overwrites /spoiler.png)
Also add spoilering for videos and non-video non-image uploads
2024-07-29 21:05:03 -07:00
Eggbertx
3547b3117e Use proper "Go-like" names for file modes
Try to create log dir if it doesn't exist
2024-05-17 10:57:23 -07:00
Eggbertx
f4a3908aa7 Simplify generating zerolog info and error events for requests 2024-04-19 13:45:57 -07:00
Eggbertx
8464c2447c Fix template issues with pointer/non-pointer receivers 2024-03-27 11:13:31 -07:00
Eggbertx
4917fdf3da Separate template functions 2024-03-26 17:49:22 -07:00
Eggbertx
09dfa2c3da Move init functions that only use public functions to dedicated subdirectories 2024-03-26 17:10:33 -07:00
Eggbertx
67e4d9d263 Remove config.SetDefaults 2024-03-26 17:05:21 -07:00
Eggbertx
bd6992cb87 Make zerolog error Event usage more consistent (Caller on the same line as Err) 2024-03-18 12:41:03 -07:00
Eggbertx
90b98c76de Create event for reloading board and section arrays 2024-03-13 14:58:22 -07:00
Eggbertx
be3cd50c08 Move flag attaching to separate function 2024-03-13 13:58:36 -07:00
Eggbertx
4b5ea350eb Start moving template functions to their respective packages 2024-03-13 13:41:15 -07:00
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