Eggbertx
a9de4c4abb
render all inner nodes to buffer instead of using regular expression to remove body tag
2024-03-27 22:57:35 -07:00
Eggbertx
36a5b2f5a3
add test for map template function
2024-03-27 22:31:24 -07:00
Eggbertx
71313947da
use table driven test for gcutil_test.go
2024-03-27 22:13:55 -07:00
Eggbertx
0cc4785ac9
Add tests for template functions, improve truncateHTMLMessage
2024-03-27 21:24:21 -07:00
Eggbertx
8464c2447c
Fix template issues with pointer/non-pointer receivers
2024-03-27 11:13:31 -07:00
Eggbertx
34e6887490
Start adding template function tests
2024-03-26 22:51:58 -07:00
Eggbertx
e5bbcc6493
Use subtests for IP range testing
2024-03-26 22:21:33 -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
c2d834c712
Remove nil dereference
2024-03-16 20:22:46 -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
f16fa39770
Use t.Setenv instead of os.Setenv
2024-03-13 10:37:15 -07:00
Eggbertx
b0a19402a8
Add some more tests to gcutil, remove some unused functions
2024-03-13 10:34:13 -07:00
Eggbertx
def421a176
Fix IP subnet range testing, properly check IP length
2024-03-12 13:17:57 -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
fd75f46f02
Update gcplugin test expected value
2024-02-27 21:04:46 -08: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
026537d549
Make post dropdown option for fingerprint ban work
2024-02-19 20:47:11 -08:00
Eggbertx
7580c965dc
Properly handle ban_ip for file bans
2024-02-19 17:36:00 -08:00
Eggbertx
f250a5a356
Add flag and country to base post query
2024-02-19 17:05:56 -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
4d187a27c8
Add fingerprinting stuff to file bans form
2024-02-18 16:42:27 -08:00
Eggbertx
d5db071447
Move staff options to staffinfo callback
2024-02-18 15:09:46 -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
2a49de7575
Audit potential bugs pointed out by Deepsource
2024-02-07 15:15:56 -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
deepsource-autofix[bot]
4b7f371574
refactor: unused parameter should be replaced by underscore
...
Unused parameters in functions or methods should be replaced with `_`
(underscore) or removed.
2024-02-07 05:54:09 +00:00
Eggbertx
033a28936b
Refactor manage function callbacks into their own separate functions
2024-02-06 21:46:42 -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
52eb3e2135
Move log closing to end of defer func
2024-01-24 10:37:28 -08:00
Eggbertx
39908d74c6
Set up lua GeoIP handler registration and Cloudflare GeoIP header example plugin
2024-01-22 16:48:20 -08:00
Eggbertx
c26b7e9e1d
Push gctemplates module table to the stack in preload function
2024-01-22 09:52:34 -08:00
Eggbertx
f78bcd3704
Add custom flag usage during post processing
2024-01-21 17:16:27 -08:00
Eggbertx
6085988889
Add flag selection to template
2024-01-21 16:42:01 -08:00