Better checking for api sort param to prevent sql injection

And moved filters out and cached object reflection
This commit is contained in:
Jamie Curnow committed 2023-07-24 11:49:08 +10:00
1 parent 9b32329f41
commit a0e17f9678
12 files changed
+312 -223

No files matched your search

+1 -1
View File
@@ -9,7 +9,7 @@ import (
)
// Expansion will determine whether the request should have objects expanded
// with ?expand=1 or ?expand=true
// with ?expand=item,item
func Expansion(next http.Handler) http.Handler {
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
expandStr := r.URL.Query().Get("expand")