forgejo/modules
Lunny Xiao dd30d9d5c0
Remove GetByBean method because sometimes it's danger when query condition parameter is zero and also introduce new generic methods (#28220)
The function `GetByBean` has an obvious defect that when the fields are
empty values, it will be ignored. Then users will get a wrong result
which is possibly used to make a security problem.

To avoid the possibility, this PR removed function `GetByBean` and all
references.
And some new generic functions have been introduced to be used.

The recommand usage like below.

```go
// if query an object according id
obj, err := db.GetByID[Object](ctx, id)
// query with other conditions
obj, err := db.Get[Object](ctx, builder.Eq{"a": a, "b":b})
```
2023-12-07 15:27:36 +08:00
..
actions
activitypub Upgrade to golangci-lint@v1.55.0 (#27756) 2023-10-24 02:54:59 +00:00
analyze
assetfs
auth
avatar
base
cache
charset
container
context Add guide page to actions when there's no workflows (#28145) 2023-11-21 08:27:33 +00:00
contexttest
csv
doctor Fix delete-orphaned-repos (#28200) 2023-11-24 14:46:19 +00:00
emoji
eventsource
generate
git Convert git commit summary to valid UTF8. (#28356) 2023-12-05 14:34:24 +08:00
gitgraph
graceful Refactor graceful manager to use shared code (#28073) 2023-11-24 14:21:46 +00:00
hcaptcha
highlight
hostmatcher Support allowed hosts for webhook to work with proxy (#27655) 2023-10-18 09:44:36 +00:00
html
httpcache
httplib
indexer Include public repos in doer's dashboard for issue search (#28304) 2023-12-07 13:26:18 +08:00
issue/template
json
label
lfs Upgrade to golangci-lint@v1.55.0 (#27756) 2023-10-24 02:54:59 +00:00
log
markup Use restricted sanitizer for repository description (#28141) 2023-11-23 16:34:25 +00:00
mcaptcha
metrics
migration
nosql
options
packages Close all hashed buffers (#27787) 2023-10-25 21:24:24 +02:00
paginator
pprof
private
process
proxy
proxyprotocol
public
queue
recaptcha
references
regexplru
repository Remove GetByBean method because sometimes it's danger when query condition parameter is zero and also introduce new generic methods (#28220) 2023-12-07 15:27:36 +08:00
secret
session
setting Use filepath instead of path to create SQLite3 database file (#28374) 2023-12-06 16:57:52 +00:00
sitemap
ssh Remove SSH workaround (#27893) 2023-11-03 15:21:05 +00:00
storage
structs Fix package webhook (#27839) 2023-10-31 04:43:38 +00:00
svg
sync
system Replace more db.DefaultContext (#27628) 2023-10-15 17:46:06 +02:00
templates Render PyPi long description as document (#28272) 2023-12-05 15:02:01 +00:00
test
testlogger
timeutil
translation
turnstile
typesniffer
updatechecker Replace more db.DefaultContext (#27628) 2023-10-15 17:46:06 +02:00
upload
uri
user
util Upgrade to golangci-lint@v1.55.0 (#27756) 2023-10-24 02:54:59 +00:00
validation
web Make CORS work for oauth2 handlers (#28184) 2023-11-23 21:19:26 +08:00
webhook