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

mendersoftware / mender-server / 2030701598

09 Sep 2025 09:31PM UTC coverage: 65.606% (+0.3%) from 65.283%
2030701598

Pull #946

gitlab-ci

web-flow
chore: bump vite from 7.0.6 to 7.1.5 in /frontend

Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 7.0.6 to 7.1.5.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/main/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v7.1.5/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-version: 7.1.5
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Pull Request #946: chore: bump vite from 7.0.6 to 7.1.5 in /frontend

28607 of 43604 relevant lines covered (65.61%)

1.46 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