Backend: Add security-focused tests, harden WebDAV and use safe.Download

Signed-off-by: Michael Mayer <michael@photoprism.app>
This commit is contained in:
Michael Mayer
2025-09-22 10:42:53 +02:00
parent a22babe3d1
commit 9ea5f0596c
29 changed files with 9905 additions and 7695 deletions

View File

@@ -15,7 +15,16 @@ import (
// Connect confirms external service accounts using a token.
//
// PUT /api/v1/connect/:name
// @Summary confirm external service accounts using a token
// @Id ConnectService
// @Tags Config
// @Accept json
// @Produce json
// @Param name path string true "service name (e.g., hub)"
// @Param connect body form.Connect true "connection token"
// @Success 200 {object} gin.H
// @Failure 400,401,403 {object} i18n.Response
// @Router /api/v1/connect/{name} [put]
func Connect(router *gin.RouterGroup) {
router.PUT("/connect/:name", func(c *gin.Context) {
name := clean.ID(c.Param("name"))