Add scans with gosec

This commit is contained in:
eikendev 2022-02-13 15:06:54 +01:00
parent 56f39cf64c
commit 5cd3627dc6
No known key found for this signature in database
GPG key ID: A1BDB1B28C8EF694
8 changed files with 47 additions and 12 deletions

View file

@ -44,6 +44,8 @@ func (h *UserHandler) deleteApplications(ctx *gin.Context, u *model.User) error
}
for _, application := range applications {
application := application // See https://stackoverflow.com/a/68247837
if err := h.AH.deleteApplication(ctx, &application, u); err != nil {
return err
}
@ -59,6 +61,8 @@ func (h *UserHandler) updateChannels(ctx *gin.Context, u *model.User, matrixID s
}
for _, application := range applications {
application := application // See https://stackoverflow.com/a/68247837
err := h.DP.DeregisterApplication(&application, u)
if success := successOrAbort(ctx, http.StatusInternalServerError, err); !success {
return err
@ -68,6 +72,8 @@ func (h *UserHandler) updateChannels(ctx *gin.Context, u *model.User, matrixID s
u.MatrixID = matrixID
for _, application := range applications {
application := application // See https://stackoverflow.com/a/68247837
err := h.AH.registerApplication(ctx, &application, u)
if err != nil {
return err