• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

mendersoftware / mender-server / 1961830404

01 Aug 2025 06:29PM UTC coverage: 65.815% (+0.3%) from 65.555%
1961830404

Pull #849

gitlab-ci

web-flow
chore: bump the backend-docker-dependencies group across 10 directories with 2 updates

Bumps the backend-docker-dependencies group with 2 updates in the /backend/services/create-artifact-worker directory: golang and alpine.
Bumps the backend-docker-dependencies group with 1 update in the /backend/services/deployments directory: golang.
Bumps the backend-docker-dependencies group with 1 update in the /backend/services/deviceauth directory: golang.
Bumps the backend-docker-dependencies group with 1 update in the /backend/services/deviceconfig directory: golang.
Bumps the backend-docker-dependencies group with 1 update in the /backend/services/deviceconnect directory: golang.
Bumps the backend-docker-dependencies group with 1 update in the /backend/services/inventory directory: golang.
Bumps the backend-docker-dependencies group with 1 update in the /backend/services/iot-manager directory: golang.
Bumps the backend-docker-dependencies group with 1 update in the /backend/services/reporting directory: golang.
Bumps the backend-docker-dependencies group with 1 update in the /backend/services/useradm directory: golang.
Bumps the backend-docker-dependencies group with 1 update in the /backend/services/workflows directory: golang.


Updates `golang` from 1.24.4 to 1.24.5

Updates `alpine` from 3.22.0 to 3.22.1

Updates `golang` from 1.24.4 to 1.24.5

Updates `golang` from 1.24.4 to 1.24.5

Updates `golang` from 1.24.4 to 1.24.5

Updates `golang` from 1.24.4 to 1.24.5

Updates `golang` from 1.24.4 to 1.24.5

Updates `golang` from 1.24.4 to 1.24.5

Updates `golang` from 1.24.4 to 1.24.5

Updates `golang` from 1.24.4 to 1.24.5

Updates `golang` from 1.24.4 to 1.24.5

---
updated-dependencies:
- dependency-name: golang
  dependency-version: 1.24.5
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: backend-docker-dependencies
- dependency-name: alpine
  dependency-version: 3.22.1
  dependency-type: direct:production... (continued)
Pull Request #849: chore: bump the backend-docker-dependencies group across 10 directories with 2 updates

29335 of 44572 relevant lines covered (65.81%)

1.44 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

70.59
/backend/pkg/requestsize/middleware.go
1
package requestsize
2

3
import (
4
        "net/http"
5

6
        "github.com/gin-gonic/gin"
7

8
        "github.com/mendersoftware/mender-server/pkg/rest.utils"
9
)
10

11
func Middleware(size int64) gin.HandlerFunc {
7✔
12
        if size < 0 {
7✔
13
                panic("requestsize Middleware initialized with negativ size")
×
14
        }
15
        tooLargeErr := http.MaxBytesError{
7✔
16
                Limit: size,
7✔
17
        }
7✔
18
        return func(c *gin.Context) {
14✔
19
                // if the Content-Length in header and is greater than size limit
7✔
20
                if c.Request.ContentLength > int64(size) {
7✔
21
                        rest.RenderError(c, http.StatusRequestEntityTooLarge, &tooLargeErr)
×
22
                        c.Abort()
×
23
                        return
×
24
                }
×
25
                // wrapping a nil body with MaxBytesReader causes a nil pointer dereference panic
26
                // when calling c.ShouldBindJSON()
27
                if c.Request.Body != nil {
14✔
28
                        c.Request.Body = http.MaxBytesReader(c.Writer, c.Request.Body, size)
7✔
29
                }
7✔
30

31
                c.Next()
7✔
32
        }
33
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc