diff --git a/CHANGELOG.md b/CHANGELOG.md index fa46933cac..94e8210398 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,34 @@ All notable changes to this project will be documented in this file. For commit guidelines, please refer to [Standard Version](https://github.com/conventional-changelog/standard-version). +## v1.5.0 + + **New Features**: + - Added basic html viewer with relative reference support (#2522) + - Shares can have pinned files, requires a user to have edit access to share (#2522) + - Enhanced search + - now uses "lazy" match by default. (#2509) + - added missing `case sensitive` option in the UI + - Progressive Web App (PWA) improvements + - restored install prompt with sidebar install button (#2086) + - camera and video capture buttons on upload (mobile-friendly `capture` inputs) + - send files to other apps via the Web Share API (`Send to app` in the context menu) + - App notifications for file operations (#2478) + - optional browser notifications when uploads, chunked downloads, move/copy, or failures finish while the tab is in the background + - single on/off toggle in Notifications settings, stored in browser local storage + + **Notes**: + - [docker] upgraded ffmpeg version 8.1 to 8.1.1 + + **BugFixes**: + - fixed PWA manifest `scope` and `id` so install works when the app is served under a base URL + - installing a public share as a PWA now opens the share URL instead of the site root (#2302) + +## v1.4.4 + + **BugFixes**: + - Pinning/Unpinning file resets users' scope permission (#2532) + ## v1.4.3 **Security**: diff --git a/_docker/Dockerfile b/_docker/Dockerfile index 040f5dd864..65bf0bacef 100644 --- a/_docker/Dockerfile +++ b/_docker/Dockerfile @@ -1,4 +1,4 @@ -FROM gtstef/ffmpeg:8.1-decode AS ffmpeg +FROM gtstef/ffmpeg:8.1.1-decode AS ffmpeg FROM golang:alpine AS base ARG VERSION ARG REVISION diff --git a/backend/adapters/fs/files/files.go b/backend/adapters/fs/files/files.go index c3bc0ba936..a7c1651dc3 100644 --- a/backend/adapters/fs/files/files.go +++ b/backend/adapters/fs/files/files.go @@ -223,12 +223,12 @@ func GetDirItems(opts utils.FileOptions, access *access.Storage, user *users.Use // FileInfoFasterFunc is a variable that can be mocked in tests var FileInfoFasterFunc = fileInfoFasterImpl -func FileInfoFaster(opts utils.FileOptions, access *access.Storage, user *users.User, share *share.Storage) (*iteminfo.ExtendedFileInfo, error) { - return FileInfoFasterFunc(opts, access, user, share) +func FileInfoFaster(opts utils.FileOptions, access *access.Storage, user *users.User, shareStore *share.Storage) (*iteminfo.ExtendedFileInfo, error) { + return FileInfoFasterFunc(opts, access, user, shareStore) } // fileInfoFasterImpl is the actual implementation of FileInfoFaster -func fileInfoFasterImpl(opts utils.FileOptions, access *access.Storage, user *users.User, share *share.Storage) (*iteminfo.ExtendedFileInfo, error) { +func fileInfoFasterImpl(opts utils.FileOptions, access *access.Storage, user *users.User, shareStore *share.Storage) (*iteminfo.ExtendedFileInfo, error) { response := &iteminfo.ExtendedFileInfo{} indexPath, userScope, topLevelErr := CheckPermissions(opts, access, user) accessRulesErr := topLevelErr != nil && topLevelErr == errors.ErrAccessDenied && indexPath != "" @@ -268,19 +268,25 @@ func fileInfoFasterImpl(opts utils.FileOptions, access *access.Storage, user *us response.FileInfo = *info response.RealPath = filepath.Join(idx.Path, indexPath) response.Source = opts.Source - if share != nil && user.Permissions.Share && opts.ShowSharedAttr { + if shareStore != nil && user.Permissions.Share && opts.ShowSharedAttr { for i := range response.Files { file := &response.Files[i] - file.IsShared = share.IsShared(response.Path+file.Name, idx.Path, user.ID) + file.IsShared = shareStore.IsShared(response.Path+file.Name, idx.Path, user.ID) } for i := range response.Folders { folder := &response.Folders[i] - folder.IsShared = share.IsShared(response.Path+folder.Name, idx.Path, user.ID) + folder.IsShared = shareStore.IsShared(response.Path+folder.Name, idx.Path, user.ID) } - response.IsShared = share.IsShared(response.Path, idx.Path, user.ID) + response.IsShared = shareStore.IsShared(response.Path, idx.Path, user.ID) } if info.Type == "directory" && opts.ShowPinnedItems { - if source, ok := users.ResolveSourceKey(response.Source); ok { + if opts.ShareHash != "" && shareStore != nil { + if link, err := shareStore.GetByHash(opts.ShareHash); err == nil { + if shareRelDir, err := link.ShareRelativeDir(response.Path); err == nil { + response.PinnedItems = link.PinnedItems.NamesForDirectory(shareRelDir) + } + } + } else if source, ok := users.ResolveSourceKey(response.Source); ok { response.PinnedItems = user.PinnedNamesForDirectory(source.Path, response.Path) } } diff --git a/backend/common/utils/file.go b/backend/common/utils/file.go index 23c6f7d35a..a511860609 100644 --- a/backend/common/utils/file.go +++ b/backend/common/utils/file.go @@ -57,7 +57,8 @@ type FileOptions struct { ExtractEmbeddedSubtitles bool // whether to extract embedded subtitles from media files AlbumArt bool // whether to get album art from media files ShowHidden bool // whether to show hidden files (true = show, false = hide) - ShowPinnedItems bool // whether to show pinned items + ShowPinnedItems bool // whether to show pinned items + ShareHash string // when set, pinned items are loaded from this share link HideFileExt string // Hide files based on extensions (eg: '.lrc' or '.srt') FollowSymlinks bool // whether to follow symlinks Only string // whether to only get files or folders diff --git a/backend/database/share/pinned_items.go b/backend/database/share/pinned_items.go new file mode 100644 index 0000000000..99142f2ed5 --- /dev/null +++ b/backend/database/share/pinned_items.go @@ -0,0 +1,80 @@ +package share + +import ( + "fmt" + "slices" + "strings" + + "github.com/gtsteffaniak/filebrowser/backend/common/utils" +) + +// PinnedItems maps share-relative directory paths to pinned item names. +type PinnedItems map[string][]string + +// Add records a pinned item name under shareRelDir. +func (p PinnedItems) Add(shareRelDir, name string) { + if p == nil { + return + } + items := p[shareRelDir] + if slices.Contains(items, name) { + return + } + p[shareRelDir] = append(items, name) +} + +// Remove deletes a pinned item name and prunes empty map entries. +func (p PinnedItems) Remove(shareRelDir, name string) { + if p == nil { + return + } + items := p[shareRelDir] + idx := slices.Index(items, name) + if idx < 0 { + return + } + items = append(items[:idx], items[idx+1:]...) + if len(items) == 0 { + delete(p, shareRelDir) + } else { + p[shareRelDir] = items + } +} + +// NamesForDirectory returns pinned item names for a share-relative directory path. +func (p PinnedItems) NamesForDirectory(shareRelDir string) []string { + if len(p) == 0 { + return nil + } + names := p[shareRelDir] + if len(names) == 0 { + return nil + } + out := make([]string, len(names)) + copy(out, names) + return out +} + +// EnsurePinnedItems returns a non-nil map for mutation. +func (l *Link) EnsurePinnedItems() PinnedItems { + if l.PinnedItems == nil { + l.PinnedItems = make(PinnedItems) + } + return l.PinnedItems +} + +// ShareRelativeDir maps a source index directory path to a share-relative directory path. +// link.Path is the index path of the share root (e.g. "/share/"). +func (l *Link) ShareRelativeDir(indexDirPath string) (string, error) { + shareRootIndex := utils.AddTrailingSlashIfNotExists(l.Path) + indexDirPath = utils.AddTrailingSlashIfNotExists(indexDirPath) + if !strings.HasPrefix(indexDirPath, shareRootIndex) { + return "", fmt.Errorf("path is outside share scope") + } + + rel := strings.TrimPrefix(indexDirPath, shareRootIndex) + if rel == "" { + return "/", nil + } + return utils.AddTrailingSlashIfNotExists("/" + strings.TrimPrefix(rel, "/")), nil +} diff --git a/backend/database/share/pinned_items_test.go b/backend/database/share/pinned_items_test.go new file mode 100644 index 0000000000..36e892b33e --- /dev/null +++ b/backend/database/share/pinned_items_test.go @@ -0,0 +1,58 @@ +package share + +import "testing" + +func TestSharePinnedItemsAddRemove(t *testing.T) { + p := make(PinnedItems) + const dir = "/" + const name = "vacation.jpg" + + p.Add(dir, name) + if len(p[dir]) != 1 || p[dir][0] != name { + t.Fatalf("add failed: %#v", p) + } + + p.Add(dir, name) + if len(p[dir]) != 1 { + t.Fatalf("duplicate add should be ignored: %#v", p) + } + + p.Remove(dir, name) + if len(p) != 0 { + t.Fatalf("remove should prune empty entries: %#v", p) + } +} + +func TestSharePinnedNamesForDirectory(t *testing.T) { + p := PinnedItems{ + "/photos/": {"vacation.jpg", "notes.txt"}, + } + + names := p.NamesForDirectory("/photos/") + if len(names) != 2 || names[0] != "vacation.jpg" || names[1] != "notes.txt" { + t.Fatalf("unexpected names: %#v", names) + } + if got := p.NamesForDirectory("/missing/"); got != nil { + t.Fatalf("expected nil for missing directory, got %#v", got) + } +} + +func TestShareRelativeDir(t *testing.T) { + link := &Link{CommonShare: CommonShare{Path: "/share/"}} + + got, err := link.ShareRelativeDir("/share/") + if err != nil { + t.Fatalf("ShareRelativeDir root: %v", err) + } + if got != "/" { + t.Fatalf("got %q, want /", got) + } + + got, err = link.ShareRelativeDir("/share/test [file2]/") + if err != nil { + t.Fatalf("ShareRelativeDir subdir: %v", err) + } + if got != "/test [file2]/" { + t.Fatalf("got %q, want /test [file2]/", got) + } +} diff --git a/backend/database/share/share.go b/backend/database/share/share.go index f9e02dadca..765fdb5b45 100644 --- a/backend/database/share/share.go +++ b/backend/database/share/share.go @@ -60,11 +60,12 @@ type CreateBody struct { // Link is the information needed to build a shareable link. type Link struct { CommonShare - Downloads int `json:"downloads"` - Hash string `json:"hash" storm:"id,index"` - UserID uint `json:"userID"` - Expire int64 `json:"expire"` - PasswordHash string `json:"password_hash,omitempty"` + Downloads int `json:"downloads"` + Hash string `json:"hash" storm:"id,index"` + UserID uint `json:"userID"` + Expire int64 `json:"expire"` + PasswordHash string `json:"password_hash,omitempty"` + PinnedItems PinnedItems `json:"pinnedItems,omitempty"` // Token is a random value that will only be set when PasswordHash is set. It is // URL-Safe and is used to download links in password-protected shares via a // query arg. diff --git a/backend/database/sql/search.go b/backend/database/sql/search.go index 3c10909359..4b900497cd 100644 --- a/backend/database/sql/search.go +++ b/backend/database/sql/search.go @@ -19,13 +19,17 @@ type SearchItem struct { } // appendNameGlobSQL adds AND (name GLOB ? OR ...) or AND (name GLOB ? AND ...) when joinAnd is true. -func appendNameGlobSQL(query string, args []interface{}, patterns []string, joinAnd bool) (string, []interface{}) { +func appendNameGlobSQL(query string, args []interface{}, patterns []string, joinAnd, caseExact bool) (string, []interface{}) { if len(patterns) == 0 { return query, args } + nameExpr := "name" + if !caseExact { + nameExpr = "lower(name)" + } parts := make([]string, len(patterns)) for i := range patterns { - parts[i] = "name GLOB ?" + parts[i] = nameExpr + " GLOB ?" args = append(args, patterns[i]) } join := " OR " @@ -38,7 +42,7 @@ func appendNameGlobSQL(query string, args []interface{}, patterns []string, join // SearchItems queries the database for items matching the search criteria for a single source. // When nameGlobPatterns is non-empty (and largest is false), rows are restricted with SQLite name GLOB ... OR .... // Returns rows that can be iterated to scan search results. -func (db *IndexDB) SearchItems(source string, scope string, largest bool, nameGlobPatterns []string, nameGlobPatternsAnd bool) (*sql.Rows, error) { +func (db *IndexDB) SearchItems(source string, scope string, largest bool, nameGlobPatterns []string, nameGlobPatternsAnd, caseExact bool) (*sql.Rows, error) { query := ` SELECT path, name, size, mod_time, type, is_dir, has_preview FROM index_items @@ -54,7 +58,7 @@ func (db *IndexDB) SearchItems(source string, scope string, largest bool, nameGl } if !largest && len(nameGlobPatterns) > 0 { - query, args = appendNameGlobSQL(query, args, nameGlobPatterns, nameGlobPatternsAnd) + query, args = appendNameGlobSQL(query, args, nameGlobPatterns, nameGlobPatternsAnd, caseExact) } if largest { @@ -67,7 +71,7 @@ func (db *IndexDB) SearchItems(source string, scope string, largest bool, nameGl // SearchItemsMultiSource queries the database for items matching the search criteria across multiple sources. // When nameGlobPatterns is non-empty (and largest is false), restricts rows with SQLite name GLOB ... OR .... // Returns rows that can be iterated to scan search results. -func (db *IndexDB) SearchItemsMultiSource(sources []string, sourceScopes map[string]string, largest bool, nameGlobPatterns []string, nameGlobPatternsAnd bool) (*sql.Rows, error) { +func (db *IndexDB) SearchItemsMultiSource(sources []string, sourceScopes map[string]string, largest bool, nameGlobPatterns []string, nameGlobPatternsAnd, caseExact bool) (*sql.Rows, error) { if len(sources) == 0 { return nil, fmt.Errorf("at least one source is required") } @@ -119,7 +123,7 @@ func (db *IndexDB) SearchItemsMultiSource(sources []string, sourceScopes map[str } if !largest && len(nameGlobPatterns) > 0 { - query, args = appendNameGlobSQL(query, args, nameGlobPatterns, nameGlobPatternsAnd) + query, args = appendNameGlobSQL(query, args, nameGlobPatterns, nameGlobPatternsAnd, caseExact) } if largest { diff --git a/backend/go.mod b/backend/go.mod index 6612ae7693..9ddabb32a1 100644 --- a/backend/go.mod +++ b/backend/go.mod @@ -24,16 +24,16 @@ require ( github.com/stretchr/testify v1.11.1 github.com/swaggo/http-swagger v1.3.4 github.com/swaggo/swag v1.16.6 - golang.org/x/crypto v0.52.0 - golang.org/x/image v0.41.0 - golang.org/x/mod v0.36.0 - golang.org/x/net v0.55.0 + golang.org/x/crypto v0.53.0 + golang.org/x/image v0.42.0 + golang.org/x/mod v0.37.0 + golang.org/x/net v0.56.0 golang.org/x/oauth2 v0.36.0 - golang.org/x/sys v0.45.0 + golang.org/x/sys v0.46.0 golang.org/x/time v0.15.0 - golang.org/x/tools v0.45.0 + golang.org/x/tools v0.46.0 gopkg.in/yaml.v3 v3.0.1 - modernc.org/sqlite v1.51.0 + modernc.org/sqlite v1.52.0 ) require ( @@ -123,13 +123,13 @@ require ( github.com/go-openapi/jsonpointer v0.23.1 // indirect github.com/go-openapi/jsonreference v0.21.6 // indirect github.com/go-openapi/spec v0.22.5 // indirect - github.com/go-openapi/swag/conv v0.26.0 // indirect - github.com/go-openapi/swag/jsonname v0.26.0 // indirect - github.com/go-openapi/swag/jsonutils v0.26.0 // indirect - github.com/go-openapi/swag/loading v0.26.0 // indirect - github.com/go-openapi/swag/stringutils v0.26.0 // indirect - github.com/go-openapi/swag/typeutils v0.26.0 // indirect - github.com/go-openapi/swag/yamlutils v0.26.0 // indirect + github.com/go-openapi/swag/conv v0.26.1 // indirect + github.com/go-openapi/swag/jsonname v0.26.1 // indirect + github.com/go-openapi/swag/jsonutils v0.26.1 // indirect + github.com/go-openapi/swag/loading v0.26.1 // indirect + github.com/go-openapi/swag/stringutils v0.26.1 // indirect + github.com/go-openapi/swag/typeutils v0.26.1 // indirect + github.com/go-openapi/swag/yamlutils v0.26.1 // indirect github.com/go-playground/locales v0.14.1 // indirect github.com/go-playground/universal-translator v0.18.1 // indirect github.com/go-toolsmith/astcast v1.1.0 // indirect @@ -147,7 +147,7 @@ require ( github.com/gofrs/flock v0.13.0 // indirect github.com/gohugoio/hugo v0.149.1 // indirect github.com/golang-jwt/jwt/v5 v5.3.1 // indirect - github.com/golang/geo v0.0.0-20260605061815-58f45aa500f1 // indirect + github.com/golang/geo v0.0.0-20260612074446-f1a45663b0f3 // indirect github.com/golang/protobuf v1.5.3 // indirect github.com/golangci/asciicheck v0.5.0 // indirect github.com/golangci/dupl v0.0.0-20260401084720-c99c5cf5c202 // indirect @@ -288,13 +288,13 @@ require ( go.yaml.in/yaml/v3 v3.0.4 // indirect golang.org/x/exp v0.0.0-20260218203240-3dfff04db8fa // indirect golang.org/x/exp/typeparams v0.0.0-20260209203927-2842357ff358 // indirect - golang.org/x/sync v0.20.0 // indirect - golang.org/x/text v0.37.0 // indirect + golang.org/x/sync v0.21.0 // indirect + golang.org/x/text v0.38.0 // indirect google.golang.org/protobuf v1.36.10 // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect honnef.co/go/tools v0.7.0 // indirect - modernc.org/libc v1.72.5 // indirect + modernc.org/libc v1.73.1 // indirect modernc.org/mathutil v1.7.1 // indirect modernc.org/memory v1.11.0 // indirect mvdan.cc/gofumpt v0.9.2 // indirect diff --git a/backend/go.sum b/backend/go.sum index 3e55ee79d0..29a795c7d6 100644 --- a/backend/go.sum +++ b/backend/go.sum @@ -323,22 +323,22 @@ github.com/go-openapi/jsonreference v0.21.6/go.mod h1:xzbgtQ3ZbWxvET3AxdzCJlJt6v github.com/go-openapi/spec v0.22.5 h1:KhO7RBlKQfonUWX2WzQCoLIXVA6AcNqDGZ3a1Dutdlo= github.com/go-openapi/spec v0.22.5/go.mod h1:vxpOtMya5TXtENXKE5bKqv5NjocVhyhxHrlZfvKnZ74= github.com/go-openapi/swag v0.23.0 h1:vsEVJDUo2hPJ2tu0/Xc+4noaxyEffXNIs3cOULZ+GrE= -github.com/go-openapi/swag/conv v0.26.0 h1:5yGGsPYI1ZCva93U0AoKi/iZrNhaJEjr324YVsiD89I= -github.com/go-openapi/swag/conv v0.26.0/go.mod h1:tpAmIL7X58VPnHHiSO4uE3jBeRamGsFsfdDeDtb5ECE= -github.com/go-openapi/swag/jsonname v0.26.0 h1:gV1NFX9M8avo0YSpmWogqfQISigCmpaiNci8cGECU5w= -github.com/go-openapi/swag/jsonname v0.26.0/go.mod h1:urBBR8bZNoDYGr653ynhIx+gTeIz0ARZxHkAPktJK2M= -github.com/go-openapi/swag/jsonutils v0.26.0 h1:FawFML2iAXsPqmERscuMPIHmFsoP1tOqWkxBaKNMsnA= -github.com/go-openapi/swag/jsonutils v0.26.0/go.mod h1:2VmA0CJlyFqgawOaPI9psnjFDqzyivIqLYN34t9p91E= -github.com/go-openapi/swag/jsonutils/fixtures_test v0.26.0 h1:apqeINu/ICHouqiRZbyFvuDge5jCmmLTqGQ9V95EaOM= -github.com/go-openapi/swag/jsonutils/fixtures_test v0.26.0/go.mod h1:AyM6QT8uz5IdKxk5akv0y6u4QvcL9GWERt0Jx/F/R8Y= -github.com/go-openapi/swag/loading v0.26.0 h1:Apg6zaKhCJurpJer0DCxq99qwmhFddBhaMX7kilDcko= -github.com/go-openapi/swag/loading v0.26.0/go.mod h1:dBxQ/6V2uBaAQdevN18VELE6xSpJWZxLX4txe12JwDg= -github.com/go-openapi/swag/stringutils v0.26.0 h1:qZQngLxs5s7SLijc3N2ZO+fUq2o8LjuWAASSrJuh+xg= -github.com/go-openapi/swag/stringutils v0.26.0/go.mod h1:sWn5uY+QIIspwPhvgnqJsH8xqFT2ZbYcvbcFanRyhFE= -github.com/go-openapi/swag/typeutils v0.26.0 h1:2kdEwdiNWy+JJdOvu5MA2IIg2SylWAFuuyQIKYybfq4= -github.com/go-openapi/swag/typeutils v0.26.0/go.mod h1:oovDuIUvTrEHVMqWilQzKzV4YlSKgyZmFh7AlfABNVE= -github.com/go-openapi/swag/yamlutils v0.26.0 h1:H7O8l/8NJJQ/oiReEN+oMpnGMyt8G0hl460nRZxhLMQ= -github.com/go-openapi/swag/yamlutils v0.26.0/go.mod h1:1evKEGAtP37Pkwcc7EWMF0hedX0/x3Rkvei2wtG/TbU= +github.com/go-openapi/swag/conv v0.26.1 h1:slr5FVkg9Wc3Y5zcwenD8Sd/PQ94b2I/QJI7N7KTBpg= +github.com/go-openapi/swag/conv v0.26.1/go.mod h1:mvQXgPptZk9GTrFgGwWvT4q+dN+zQej9JfmGwnipz1A= +github.com/go-openapi/swag/jsonname v0.26.1 h1:VReupaV6WxlAsCn0e4DUfgV6bPmINnPpyJDLqSfNPcE= +github.com/go-openapi/swag/jsonname v0.26.1/go.mod h1:OvdW6BoWoj33pTfi7x9vFrgmT+fk7aw0BRwvCE0YOuc= +github.com/go-openapi/swag/jsonutils v0.26.1 h1:2hdBfFkHg+7Wrz2VsCbeyR6hzkRDs7AztnMR2u84yOY= +github.com/go-openapi/swag/jsonutils v0.26.1/go.mod h1:U+RMJH3wa+6BRiphuRtIyI8fW9HPFqFQ4sHk2oRx0UQ= +github.com/go-openapi/swag/jsonutils/fixtures_test v0.26.1 h1:1CD7NiLLb/TXl3tOnFYU4b+mNfb5rtgHkaA+q7RMYYQ= +github.com/go-openapi/swag/jsonutils/fixtures_test v0.26.1/go.mod h1:ZWafc8nMdYzTE3uYY6W86f0n46+IF0g4uUyRhJw/kXc= +github.com/go-openapi/swag/loading v0.26.1 h1:E9K4wqXeROlhjFQ13K9zMz6ojFGXIggGe+ad1odrK9w= +github.com/go-openapi/swag/loading v0.26.1/go.mod h1:3qvRIlWzWdq1HvmldwmuJ2ohpcAryN6xVt2OTKd0/7E= +github.com/go-openapi/swag/stringutils v0.26.1 h1:f88uYyTso7TnHrKM/bUBsQ5e2wKf37cpgo6pvbzd9yU= +github.com/go-openapi/swag/stringutils v0.26.1/go.mod h1:Sc6d3bU8fgk5AyZR8/8jEQ+Is/Ald+TD/IIggPN8UJk= +github.com/go-openapi/swag/typeutils v0.26.1 h1:yg42FgMzRR6PVQ3M3qHz1s+Y6/P4HoJ3cBarXa3OVnU= +github.com/go-openapi/swag/typeutils v0.26.1/go.mod h1:VfnV+oUtSP2vCSCn2aJgnr8OevUYemyIzzS1VOzS10o= +github.com/go-openapi/swag/yamlutils v0.26.1 h1:0TSLK+lXs9vfIhAWzBeI/lOzEnIoot6WTCO1aAeWFTk= +github.com/go-openapi/swag/yamlutils v0.26.1/go.mod h1:7W5b7PRX9MxwL7TjeG7H8HkyBGRsIDRObhyMWFgBI2M= github.com/go-openapi/testify/enable/yaml/v2 v2.5.1 h1:q9NtHwK4qHF7yZziBPvZyv7zWAIk8ok88Gh2mR6Jpc8= github.com/go-openapi/testify/enable/yaml/v2 v2.5.1/go.mod h1:JW0MXIotCYps/XsgJnG3a8Q7rE5xAiBwoOD5OfaIQBk= github.com/go-openapi/testify/v2 v2.5.1 h1:TMdhCaw8fUNraVSf3Omoob1dO/AzBfhtFAPW0an6sBo= @@ -417,8 +417,8 @@ github.com/golang-jwt/jwt/v5 v5.3.1/go.mod h1:fxCRLWMO43lRc8nhHWY6LGqRcf+1gQWArs github.com/golang/geo v0.0.0-20190916061304-5b978397cfec/go.mod h1:QZ0nwyI2jOfgRAoBvP+ab5aRr7c9x7lhGEJrKvBwjWI= github.com/golang/geo v0.0.0-20200319012246-673a6f80352d/go.mod h1:QZ0nwyI2jOfgRAoBvP+ab5aRr7c9x7lhGEJrKvBwjWI= github.com/golang/geo v0.0.0-20210211234256-740aa86cb551/go.mod h1:QZ0nwyI2jOfgRAoBvP+ab5aRr7c9x7lhGEJrKvBwjWI= -github.com/golang/geo v0.0.0-20260605061815-58f45aa500f1 h1:vkAT/N8DPfmQ3ZltANiX95HhM0nv/tqoq5Innoimcwo= -github.com/golang/geo v0.0.0-20260605061815-58f45aa500f1/go.mod h1:Mymr9kRGDc64JPr03TSZmuIBODZ3KyswLzm1xL0HFA8= +github.com/golang/geo v0.0.0-20260612074446-f1a45663b0f3 h1:UlucSQUu9SZdDRlMWv5N/T3Rig9gv615vWvHFKrXHWA= +github.com/golang/geo v0.0.0-20260612074446-f1a45663b0f3/go.mod h1:Mymr9kRGDc64JPr03TSZmuIBODZ3KyswLzm1xL0HFA8= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= @@ -952,8 +952,8 @@ golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.52.0 h1:RMs7fP2rXdep0CftQlK8Uf+kibLm7qkCcradZWYz988= -golang.org/x/crypto v0.52.0/go.mod h1:1QgfPxDqh0T2M/elOJtp9RvuR95kVjir0e6/BvEmGbc= +golang.org/x/crypto v0.53.0 h1:QZ4Muo8THX6CizN2vPPd5fBGHyogrdK9fG4wLPFUsto= +golang.org/x/crypto v0.53.0/go.mod h1:DNLU434OwVakk9PzuwV8w62mAJpRJL3vsgcfp4Qnsio= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -972,8 +972,8 @@ golang.org/x/exp/typeparams v0.0.0-20260209203927-2842357ff358 h1:qWFG1Dj7TBjOjO golang.org/x/exp/typeparams v0.0.0-20260209203927-2842357ff358/go.mod h1:4Mzdyp/6jzw9auFDJ3OMF5qksa7UvPnzKqTVGcb04ms= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= -golang.org/x/image v0.41.0 h1:8wS72eGJMJaBxK6okTzd4WaXumUlTVlb753MlsSvTCo= -golang.org/x/image v0.41.0/go.mod h1:uIc348UZMSvS5Z65CVZ7iDPaNobNFEPeJ4kbqTOszmA= +golang.org/x/image v0.42.0 h1:1gSs6ehNWXLbkHBIPcWztk3D/6aIA/8hauiAYtlodVY= +golang.org/x/image v0.42.0/go.mod h1:rrpelvGFt+kLPAjPM4HeWPgrl0FtafueU//e5N0qk/Q= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= @@ -996,8 +996,8 @@ golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3/go.mod h1:3p9vT2HGsQu2K1YbXdKPJLVgG5VJdoTa1poYQBtP1AY= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= -golang.org/x/mod v0.36.0 h1:JJjpVx6myfUsUdAzZuOSTTmRE0PfZeNWzzvKrP7amb4= -golang.org/x/mod v0.36.0/go.mod h1:moc6ELqsWcOw5Ef3xVprK5ul/MvtVvkIXLziUOICjUQ= +golang.org/x/mod v0.37.0 h1:vF1DjpVEshcIqoEaauuHebaLk1O1forxjxBaVn884JQ= +golang.org/x/mod v0.37.0/go.mod h1:m8S8VeM9r4dzDwjrKO0a1sZP3YjeMamRRlD+fmR2Q/0= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -1036,8 +1036,8 @@ golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug golang.org/x/net v0.0.0-20221002022538-bcab6841153b/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= -golang.org/x/net v0.55.0 h1:bcvxaJn3e1U6InsFWt1JUq1aSjnRxLzT2rtD2KfkDF8= -golang.org/x/net v0.55.0/go.mod h1:L5U2KuzuOe1lY7Z+aWVIKK6qEeJXnXV9yzGA+WCHJww= +golang.org/x/net v0.56.0 h1:Rw8j/hFzGvJUZwNBXnAtf5sVDVt+65SK2C7IxCxZt5o= +golang.org/x/net v0.56.0/go.mod h1:D3Ku6r+V6JROoZK144D2XfMHFcMq/0zSfLelVTCFKec= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -1059,8 +1059,8 @@ golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.20.0 h1:e0PTpb7pjO8GAtTs2dQ6jYa5BWYlMuX047Dco/pItO4= -golang.org/x/sync v0.20.0/go.mod h1:9xrNwdLfx4jkKbNva9FpL6vEN7evnE43NNNJQ2LF3+0= +golang.org/x/sync v0.21.0 h1:HLII4xRRTtCRkxYp4HNFF0Js/Og6q2i++KXbg0gHCwM= +golang.org/x/sync v0.21.0/go.mod h1:9xrNwdLfx4jkKbNva9FpL6vEN7evnE43NNNJQ2LF3+0= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -1107,8 +1107,8 @@ golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220928140112-f11e5e49a4ec/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.45.0 h1:dO4czNzziLiiXplLQgBCEpCvXQ3dnkn0SdaZSYdQ+FY= -golang.org/x/sys v0.45.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw= +golang.org/x/sys v0.46.0 h1:noSf2Fq6F8DBgS+LysIkx7rIExoNHJsxOAtPp4rthXw= +golang.org/x/sys v0.46.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= @@ -1120,8 +1120,8 @@ golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.37.0 h1:Cqjiwd9eSg8e0QAkyCaQTNHFIIzWtidPahFWR83rTrc= -golang.org/x/text v0.37.0/go.mod h1:a5sjxXGs9hsn/AJVwuElvCAo9v8QYLzvavO5z2PiM38= +golang.org/x/text v0.38.0 h1:sXmwo9DwP3OK9EZ7PqAdaooSGozfl/3a6/xJcbzPRhE= +golang.org/x/text v0.38.0/go.mod h1:YXZt3QhHUKYT53r2lLKFIVi6Ao1jdzrTR/KQ09qyxF4= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -1174,8 +1174,8 @@ golang.org/x/tools v0.1.1-0.20210302220138-2ac05c832e1a/go.mod h1:9bzcO0MWcOuT0t golang.org/x/tools v0.1.10/go.mod h1:Uh6Zz+xoGYZom868N8YTex3t7RhtHDBrE8Gzo9bV56E= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= -golang.org/x/tools v0.45.0 h1:18qN3FAooORvApf5XjCXgsuayZOEtXf6JK18I3+ONa8= -golang.org/x/tools v0.45.0/go.mod h1:LuUGqqaXcXMEFEruIVJVm5mgDD8vww/z/SR1gQ4uE/0= +golang.org/x/tools v0.46.0 h1:7jTurBkPZu4moS/Uy4OQT1M+QBlsj3wejyZwsT8Z7rk= +golang.org/x/tools v0.46.0/go.mod h1:FrD85F8l+NWL+9XWBSyVSHO6Ne4jutsfIFba7AWQ5Ys= golang.org/x/tools/go/expect v0.1.1-deprecated h1:jpBZDwmgPhXsKZC6WhL20P4b/wmnpsEAGHaNy0n/rJM= golang.org/x/tools/go/expect v0.1.1-deprecated/go.mod h1:eihoPOH+FgIqa3FpoTwguz/bVUSGBlGQU67vpBeOrBY= golang.org/x/tools/go/packages/packagestest v0.1.1-deprecated h1:1h2MnaIAIXISqTFKdENegdpAgUXz6NrPEsbIeWaBRvM= @@ -1292,10 +1292,10 @@ honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9 honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.7.0 h1:w6WUp1VbkqPEgLz4rkBzH/CSU6HkoqNLp6GstyTx3lU= honnef.co/go/tools v0.7.0/go.mod h1:pm29oPxeP3P82ISxZDgIYeOaf9ta6Pi0EWvCFoLG2vc= -modernc.org/cc/v4 v4.28.2 h1:3tQ0lf2ADtoby2EtSP+J7IE2SHwEJdP8ioR59wx7XpY= -modernc.org/cc/v4 v4.28.2/go.mod h1:OnovgIhbbMXMu1aISnJ0wvVD1KnW+cAUJkIrAWh+kVI= -modernc.org/ccgo/v4 v4.34.2 h1:mxsy2FdrB6+qG3NfXefz1AmWv0ehOSDO4jxgxd7h9yo= -modernc.org/ccgo/v4 v4.34.2/go.mod h1:1L7us56+kAKu04p25EATpmBBvhbcqqZ85ibqWVwVgog= +modernc.org/cc/v4 v4.28.4 h1:Hd/4Es+MBj+/7hSdZaisNyu6bv3V0Dp2MdllyfqaH+c= +modernc.org/cc/v4 v4.28.4/go.mod h1:OnovgIhbbMXMu1aISnJ0wvVD1KnW+cAUJkIrAWh+kVI= +modernc.org/ccgo/v4 v4.34.4 h1:OVnSOWQjVKOYkFxoHYB+qQmSHK5gqMqARM+K9DpR/Ws= +modernc.org/ccgo/v4 v4.34.4/go.mod h1:qdKqE8FNIYyysougB1RX9MxCzp5oJOcQXSobANJ4TuE= modernc.org/fileutil v1.4.0 h1:j6ZzNTftVS054gi281TyLjHPp6CPHr2KCxEXjEbD6SM= modernc.org/fileutil v1.4.0/go.mod h1:EqdKFDxiByqxLk8ozOxObDSfcVOv/54xDs/DUHdvCUU= modernc.org/gc/v2 v2.6.5 h1:nyqdV8q46KvTpZlsw66kWqwXRHdjIlJOhG6kxiV/9xI= @@ -1304,8 +1304,8 @@ modernc.org/gc/v3 v3.1.3 h1:6QAplYyVO+KdPW3pGnqmJDUxtkec8ooEWvks/hhU3lc= modernc.org/gc/v3 v3.1.3/go.mod h1:HFK/6AGESC7Ex+EZJhJ2Gni6cTaYpSMmU/cT9RmlfYY= modernc.org/goabi0 v0.2.0 h1:HvEowk7LxcPd0eq6mVOAEMai46V+i7Jrj13t4AzuNks= modernc.org/goabi0 v0.2.0/go.mod h1:CEFRnnJhKvWT1c1JTI3Avm+tgOWbkOu5oPA8eH8LnMI= -modernc.org/libc v1.72.5 h1:m2OGx9Ser1VvTS4Z9ZJlWs+CBMxutLaTiAWkNz+NB9U= -modernc.org/libc v1.72.5/go.mod h1:np0N7KDJ7eUtMZmOqVZNldrZyG+DHLl2B5pg8Hbar3U= +modernc.org/libc v1.73.1 h1:HMa/TQJY2Z8ZjqBRbVJMLjBhmxTOwN2aMcxNrT01Dbc= +modernc.org/libc v1.73.1/go.mod h1:DXZ3eO8qMCNn2SnmTNCiC71nJ9Rcq3PsnpU6Vc4rWK8= modernc.org/mathutil v1.7.1 h1:GCZVGXdaN8gTqB1Mf/usp1Y/hSqgI2vAGGP4jZMCxOU= modernc.org/mathutil v1.7.1/go.mod h1:4p5IwJITfppl0G4sUEDtCr4DthTaT47/N3aT6MhfgJg= modernc.org/memory v1.11.0 h1:o4QC8aMQzmcwCK3t3Ux/ZHmwFPzE6hf2Y5LbkRs+hbI= @@ -1314,8 +1314,8 @@ modernc.org/opt v0.2.0 h1:tGyef5ApycA7FSEOMraay9SaTk5zmbx7Tu+cJs4QKZg= modernc.org/opt v0.2.0/go.mod h1:03fq9lsNfvkYSfxrfUhZCWPk1lm4cq4N+Bh//bEtgns= modernc.org/sortutil v1.2.1 h1:+xyoGf15mM3NMlPDnFqrteY07klSFxLElE2PVuWIJ7w= modernc.org/sortutil v1.2.1/go.mod h1:7ZI3a3REbai7gzCLcotuw9AC4VZVpYMjDzETGsSMqJE= -modernc.org/sqlite v1.51.0 h1:aH/MMSoayAIhozZ7uJbVTT9QO/VhzBf0J9tymmmuC/U= -modernc.org/sqlite v1.51.0/go.mod h1:tcNzv5p84E0skkmJn038y+hWJbLQXQqEnQfeh5r2JLM= +modernc.org/sqlite v1.52.0 h1:p4dhYh2tXZCiyaqHwRVJDjIGKWyXayiQpThxgDzJaxo= +modernc.org/sqlite v1.52.0/go.mod h1:tcNzv5p84E0skkmJn038y+hWJbLQXQqEnQfeh5r2JLM= modernc.org/strutil v1.2.1 h1:UneZBkQA+DX2Rp35KcM69cSsNES9ly8mQWD71HKlOA0= modernc.org/strutil v1.2.1/go.mod h1:EHkiggD70koQxjVdSBM3JKM7k6L0FbGE5eymy9i3B9A= modernc.org/token v1.1.0 h1:Xl7Ap9dKaEs5kLoOQeQmPWevfnk/DM5qcLcYlA8ys6Y= diff --git a/backend/http/httpRouter.go b/backend/http/httpRouter.go index 3b5f792960..48f45fb3c6 100644 --- a/backend/http/httpRouter.go +++ b/backend/http/httpRouter.go @@ -166,6 +166,7 @@ func StartHttp(ctx context.Context, storage *bolt.BoltStore, shutdownComplete ch api.HandleFunc("PATCH /share", withPermShare(sharePatchHandler)) api.HandleFunc("DELETE /share", withPermShare(shareDeleteHandler)) publicApi.HandleFunc("GET /share/info", withOrWithoutUser(shareInfoHandler)) + publicApi.HandleFunc("PATCH /share/pinnedItems", withPermShare(sharePatchPinnedItemsHandler)) publicApi.HandleFunc("GET /share/image", withHashFile(getShareImage)) // ======================================== diff --git a/backend/http/middleware.go b/backend/http/middleware.go index 4decf3d78e..a7bed5e476 100644 --- a/backend/http/middleware.go +++ b/backend/http/middleware.go @@ -137,6 +137,8 @@ func withHashFileHelper(fn handleFunc) handleFunc { ShowHidden: link.ShowHidden, HideFileExt: link.HideFileExt, FollowSymlinks: true, + ShowPinnedItems: true, + ShareHash: hash, }, store.Access, data.shareUser, store.Share) if err != nil { logger.Errorf("error fetching file info for share. hash=%v path=%v error=%v", hash, path, err) diff --git a/backend/http/pinnedItems.go b/backend/http/pinnedItems.go index 0388c78f37..524d821846 100644 --- a/backend/http/pinnedItems.go +++ b/backend/http/pinnedItems.go @@ -15,7 +15,13 @@ import ( type pinnedItemPatchRequest struct { Source string `json:"source" validate:"required"` Path string `json:"path" validate:"required"` // scope-relative parent directory - Name string `json:"name" validate:"required"` // item basename within path + Name string `json:"name" validate:"required"` // item basename within path +} + +// sharePinnedItemPatchRequest is the JSON body for PATCH /public/api/share/pinnedItems. +type sharePinnedItemPatchRequest struct { + Path string `json:"path" validate:"required"` // share-relative parent directory + Name string `json:"name" validate:"required"` // item basename within path } // scopeRelativeDirToIndexPath maps a scope-relative directory to source and index paths. @@ -39,6 +45,18 @@ func scopeRelativeDirToIndexPath(sourceName, userScope, directoryPath string) (s return source.Path, idx.MakeIndexPath(fullDirPath, true), nil } +// normalizeShareRelativeDir returns a normalized share-relative directory path key. +func normalizeShareRelativeDir(shareRelDir string) (string, error) { + if shareRelDir == "" || shareRelDir == "/" { + return "/", nil + } + cleanDir, err := utils.SanitizeUserPath(shareRelDir) + if err != nil { + return "", fmt.Errorf("invalid path: %w", err) + } + return utils.AddTrailingSlashIfNotExists(cleanDir), nil +} + // pinnedItemAction returns the patch action query param, defaulting to "add". func pinnedItemAction(r *http.Request) string { action := strings.ToLower(strings.TrimSpace(r.URL.Query().Get("action"))) diff --git a/backend/http/share.go b/backend/http/share.go index 8cb066dcc8..e9b6bd94dc 100644 --- a/backend/http/share.go +++ b/backend/http/share.go @@ -700,3 +700,78 @@ func redirectToShare(w http.ResponseWriter, r *http.Request, d *requestContext) http.Redirect(w, r, newURL, http.StatusMovedPermanently) return http.StatusMovedPermanently, nil } + +// publicSharePatchPinnedItemsHandler adds or removes a pinned item on a share link. +// @Summary Add or remove a pinned item on a share +// @Description Patches one pinned item at a time for share owners. Defaults to add; pass ?action=remove to unpin. +// @Tags Shares +// @Accept json +// @Produce json +// @Param hash query string true "Share hash" +// @Param action query string false "add (default) or remove" +// @Param body body sharePinnedItemPatchRequest true "Pinned item" +// @Success 204 "No Content" +// @Failure 400 {object} map[string]string "Bad Request" +// @Failure 403 {object} map[string]string "Forbidden" +// @Failure 404 {object} map[string]string "Share not found" +// @Failure 500 {object} map[string]string "Internal Server Error" +// @Router /public/api/share/pinnedItems [patch] +func sharePatchPinnedItemsHandler(w http.ResponseWriter, r *http.Request, d *requestContext) (int, error) { + hash := r.URL.Query().Get("hash") + if hash == "" { + return http.StatusBadRequest, fmt.Errorf("hash is required") + } + + link, err := store.Share.GetByHash(hash) + if err != nil { + return http.StatusNotFound, fmt.Errorf("share hash not found") + } + + if d.user.Username == "anonymous" || !link.UserCanEdit(d.user) { + return http.StatusForbidden, fmt.Errorf("share pin editing is not allowed for this user") + } + + if link.ShareType == "upload" { + return http.StatusForbidden, fmt.Errorf("pinning is disabled for upload shares") + } + + var body sharePinnedItemPatchRequest + if err = json.NewDecoder(r.Body).Decode(&body); err != nil { + return http.StatusBadRequest, fmt.Errorf("failed to decode body: %w", err) + } + defer r.Body.Close() + + action := pinnedItemAction(r) + if action != "add" && action != "remove" { + return http.StatusBadRequest, fmt.Errorf("action must be add or remove") + } + + if body.Path == "" || body.Name == "" { + return http.StatusBadRequest, fmt.Errorf("path and name are required") + } + + shareRelDir, err := normalizeShareRelativeDir(body.Path) + if err != nil { + return http.StatusBadRequest, fmt.Errorf("invalid path: %s", body.Path) + } + + cleanName, err := utils.SanitizeUserPath(body.Name) + if err != nil { + return http.StatusBadRequest, fmt.Errorf("invalid name: %s", body.Name) + } + body.Name = cleanName + + pinned := link.EnsurePinnedItems() + switch action { + case "add": + pinned.Add(shareRelDir, body.Name) + case "remove": + pinned.Remove(shareRelDir, body.Name) + } + + if err := store.Share.Save(link); err != nil { + return http.StatusInternalServerError, fmt.Errorf("failed to save share: %w", err) + } + + return http.StatusNoContent, nil +} diff --git a/backend/http/static.go b/backend/http/static.go index 82b12e3efc..a73aa88b32 100644 --- a/backend/http/static.go +++ b/backend/http/static.go @@ -6,6 +6,7 @@ import ( "html/template" "io/fs" "net/http" + "net/url" "os" "path/filepath" "strings" @@ -96,6 +97,17 @@ func handleWithStaticData(w http.ResponseWriter, r *http.Request, d *requestCont shareHash := "" data := make(map[string]interface{}) disableNavButtons := config.Frontend.DisableNavButtons + if d.share != nil { + shareHash = d.share.Hash + } + if shareHash == "" { + shareHash = icons.ShareHashFromHTTPPath(r.URL.Path, config.Server.BaseURL) + } + if shareHash != "" && d.share == nil && store != nil { + if link, err := store.Share.GetByHash(shareHash); err == nil { + d.share = link + } + } if d.share != nil { if d.share.Favicon != "" { if strings.HasPrefix(d.share.Favicon, "http") { @@ -124,7 +136,6 @@ func handleWithStaticData(w http.ResponseWriter, r *http.Request, d *requestCont if shareFavicon != "" { favicon = shareFavicon } - shareHash = d.share.Hash } // Set login icon URL loginIcon := staticURL + "/loginIcon" @@ -162,6 +173,20 @@ func handleWithStaticData(w http.ResponseWriter, r *http.Request, d *requestCont pwaIcon256 := staticURL + "/icons/pwa-icon-256.png" pwaIcon512 := staticURL + "/icons/pwa-icon-512.png" + manifestURL := staticURL + "/site.webmanifest" + if shareHash != "" { + pwaStartURL := config.Server.BaseURL + "public/share/" + shareHash + "/" + query := url.Values{} + query.Set("start", pwaStartURL) + if title != config.Frontend.Name { + query.Set("name", title) + } + if description != config.Frontend.Description { + query.Set("description", description) + } + manifestURL = staticURL + "/site.webmanifest?" + query.Encode() + } + data["htmlVars"] = map[string]interface{}{ "title": title, "customCSS": template.CSS(config.Frontend.Styling.CustomCSSRaw), @@ -183,7 +208,7 @@ func handleWithStaticData(w http.ResponseWriter, r *http.Request, d *requestCont "pwaIcon192": pwaIcon192, "pwaIcon256": pwaIcon256, "pwaIcon512": pwaIcon512, - "manifestURL": staticURL + "/site.webmanifest", + "manifestURL": manifestURL, } data["globalVars"] = map[string]interface{}{ @@ -267,12 +292,21 @@ func setContentType(w http.ResponseWriter, path string) { } } -// manifestHandler serves the cached PWA manifest +// manifestHandler serves the cached PWA manifest, optionally scoped to a public share. func manifestHandler(w http.ResponseWriter, r *http.Request) { w.Header().Set("Content-Type", "application/manifest+json") w.Header().Set("Cache-Control", "public, max-age=3600") // Cache for 1 hour - if err := json.NewEncoder(w).Encode(icons.CachedManifest); err != nil { + manifest := icons.CachedManifest + if startURL := r.URL.Query().Get("start"); startURL != "" { + name := r.URL.Query().Get("name") + description := r.URL.Query().Get("description") + if shareManifest, ok := icons.ManifestForShare(config.Server.BaseURL, startURL, name, description); ok { + manifest = shareManifest + } + } + + if err := json.NewEncoder(w).Encode(manifest); err != nil { http.Error(w, "Failed to serve manifest", http.StatusInternalServerError) } } diff --git a/backend/icons/manifest.go b/backend/icons/manifest.go index f880e91acc..fef93dfcb2 100644 --- a/backend/icons/manifest.go +++ b/backend/icons/manifest.go @@ -8,6 +8,8 @@ import ( type PWAManifest struct { Name string `json:"name"` ShortName string `json:"short_name"` + ID string `json:"id"` + Scope string `json:"scope"` Icons []PWAIcon `json:"icons"` StartURL string `json:"start_url"` Display string `json:"display"` @@ -40,6 +42,8 @@ func generatePWAManifest(name, description, baseURL, themeColor, pwaIcon192, pwa return PWAManifest{ Name: name, ShortName: shortName, + ID: baseURL, + Scope: baseURL, StartURL: baseURL, Display: "standalone", BackgroundColor: "#ffffff", diff --git a/backend/icons/manifest_share.go b/backend/icons/manifest_share.go new file mode 100644 index 0000000000..cbe7b3a608 --- /dev/null +++ b/backend/icons/manifest_share.go @@ -0,0 +1,108 @@ +package icons + +import ( + "strings" + + "github.com/gtsteffaniak/filebrowser/backend/common/utils" +) + +const maxManifestTextLen = 256 + +func isValidShareHash(hash string) bool { + if len(hash) < 8 || len(hash) > 64 { + return false + } + if strings.Contains(hash, "..") || strings.Contains(hash, "/") { + return false + } + return true +} + +// ShareRootFromStartURL validates a share PWA start URL and returns the share root +// used for manifest scope/id plus the normalized start URL. +func ShareRootFromStartURL(baseURL, startURL string) (shareRoot, normalizedStart string, ok bool) { + if startURL == "" || !strings.HasPrefix(startURL, baseURL) { + return "", "", false + } + + rel := strings.TrimPrefix(startURL, baseURL) + if !strings.HasPrefix(rel, "public/share/") { + return "", "", false + } + + rest := strings.TrimPrefix(rel, "public/share/") + hash, subPath, _ := strings.Cut(rest, "/") + if !isValidShareHash(hash) { + return "", "", false + } + if subPath != "" { + if _, err := utils.SanitizeUserPath(subPath); err != nil { + return "", "", false + } + } + + shareRoot = baseURL + "public/share/" + hash + "/" + normalizedStart = startURL + if !strings.HasPrefix(normalizedStart, shareRoot) && normalizedStart != strings.TrimSuffix(shareRoot, "/") { + return "", "", false + } + if normalizedStart == baseURL+"public/share/"+hash { + normalizedStart = shareRoot + } + + return shareRoot, normalizedStart, true +} + +// ShareHashFromHTTPPath extracts a share hash from common FileBrowser share routes. +func ShareHashFromHTTPPath(path, baseURL string) string { + prefixes := []string{ + strings.TrimSuffix(baseURL, "/") + "/public/share/", + "/public/share/", + "/share/", + } + for _, prefix := range prefixes { + if !strings.HasPrefix(path, prefix) { + continue + } + rest := strings.TrimPrefix(path, prefix) + hash, _, _ := strings.Cut(rest, "/") + if isValidShareHash(hash) { + return hash + } + } + return "" +} + +func sanitizeManifestText(value string) string { + if len(value) > maxManifestTextLen { + return value[:maxManifestTextLen] + } + return value +} + +// ManifestForShare returns a manifest scoped to a single public share link. +func ManifestForShare(baseURL, startURL, name, description string) (PWAManifest, bool) { + shareRoot, normalizedStart, ok := ShareRootFromStartURL(baseURL, startURL) + if !ok { + return PWAManifest{}, false + } + + manifest := CachedManifest + manifest.StartURL = normalizedStart + manifest.Scope = shareRoot + manifest.ID = shareRoot + + if name = sanitizeManifestText(strings.TrimSpace(name)); name != "" { + manifest.Name = name + shortName := name + if len(shortName) > 12 { + shortName = shortName[:12] + } + manifest.ShortName = shortName + } + if description = sanitizeManifestText(strings.TrimSpace(description)); description != "" { + manifest.Description = description + } + + return manifest, true +} diff --git a/backend/icons/manifest_share_test.go b/backend/icons/manifest_share_test.go new file mode 100644 index 0000000000..5a71541ee8 --- /dev/null +++ b/backend/icons/manifest_share_test.go @@ -0,0 +1,80 @@ +package icons + +import "testing" + +func TestShareRootFromStartURL(t *testing.T) { + baseURL := "/testing/" + startURL := "/testing/public/share/abc123XYZ-_/" + shareRoot, normalizedStart, ok := ShareRootFromStartURL(baseURL, startURL) + if !ok { + t.Fatal("expected valid share start URL") + } + if shareRoot != "/testing/public/share/abc123XYZ-_/" { + t.Fatalf("unexpected share root: %q", shareRoot) + } + if normalizedStart != startURL { + t.Fatalf("unexpected normalized start: %q", normalizedStart) + } +} + +func TestShareRootFromStartURLRejectsTraversal(t *testing.T) { + baseURL := "/testing/" + startURL := "/testing/public/share/abc123XYZ-_/../secret/" + _, _, ok := ShareRootFromStartURL(baseURL, startURL) + if ok { + t.Fatal("expected traversal path to be rejected") + } +} + +func TestShareHashFromHTTPPath(t *testing.T) { + baseURL := "/testing/" + paths := []string{ + "/testing/public/share/hash1234567890abcdef/", + "/public/share/hash1234567890abcdef/files", + "/share/hash1234567890abcdef/", + } + for _, path := range paths { + hash := ShareHashFromHTTPPath(path, baseURL) + if hash != "hash1234567890abcdef" { + t.Fatalf("path %q: got hash %q", path, hash) + } + } +} + +func TestShareHashFromHTTPPathRejectsEmbeddedPrefix(t *testing.T) { + baseURL := "/testing/" + path := "/evil/route/share/hash1234567890abcdef/" + hash := ShareHashFromHTTPPath(path, baseURL) + if hash != "" { + t.Fatalf("expected empty hash for non-prefixed path, got %q", hash) + } +} + +func TestManifestForShare(t *testing.T) { + CachedManifest = PWAManifest{ + Name: "FileBrowser Quantum", + ShortName: "FBQ", + StartURL: "/testing/", + Scope: "/testing/", + ID: "/testing/", + } + + manifest, ok := ManifestForShare( + "/testing/", + "/testing/public/share/hash1234567890abcdef/", + "My Share", + "Shared files", + ) + if !ok { + t.Fatal("expected share manifest") + } + if manifest.StartURL != "/testing/public/share/hash1234567890abcdef/" { + t.Fatalf("unexpected start_url: %q", manifest.StartURL) + } + if manifest.Scope != "/testing/public/share/hash1234567890abcdef/" { + t.Fatalf("unexpected scope: %q", manifest.Scope) + } + if manifest.Name != "My Share" { + t.Fatalf("unexpected name: %q", manifest.Name) + } +} diff --git a/backend/indexing/indexingScanner.go b/backend/indexing/indexingScanner.go index eb4793d831..6995e59c8d 100644 --- a/backend/indexing/indexingScanner.go +++ b/backend/indexing/indexingScanner.go @@ -95,12 +95,6 @@ func (s *Scanner) executeScan() { s.fullScanCounter = 0 } }) - scanMode := "full" - if quick { - scanMode = "quick" - } - logger.Debugf("[%s] scanner [%s] starting %s scan (full/quick cadence step %d of 5)", s.idx.Name, s.scanPath, scanMode, pre+1) - s.runIndexing(quick) s.updateSchedule() } diff --git a/backend/indexing/iteminfo/searchPatterns.go b/backend/indexing/iteminfo/searchPatterns.go new file mode 100644 index 0000000000..4d0a799939 --- /dev/null +++ b/backend/indexing/iteminfo/searchPatterns.go @@ -0,0 +1,92 @@ +package iteminfo + +import "strings" + +type namePatternMode int + +const ( + patternLazyDefault namePatternMode = iota + patternQuotedLiteral + patternUserGlob +) + +func escapeGlobLiteral(s string) string { + var b strings.Builder + for _, r := range s { + switch r { + case '*', '?', '[', '\\': + b.WriteByte('\\') + b.WriteRune(r) + default: + b.WriteRune(r) + } + } + return b.String() +} + +func wrapGlobPattern(s string) string { + return "*" + s + "*" +} + +// BuildNameGlobPattern converts a search term into a SQLite GLOB pattern for indexed file names. +func BuildNameGlobPattern(term string, quoted, useWildcard, exactCase bool) string { + if term == "" { + return "" + } + + var mode namePatternMode + switch { + case useWildcard: + mode = patternUserGlob + case quoted: + mode = patternQuotedLiteral + default: + mode = patternLazyDefault + } + + var pattern string + switch mode { + case patternUserGlob: + pattern = term + case patternQuotedLiteral: + pattern = wrapGlobPattern(escapeGlobLiteral(term)) + case patternLazyDefault: + parts := strings.Fields(term) + if len(parts) == 0 { + return "" + } + escaped := make([]string, len(parts)) + for i, p := range parts { + escaped[i] = escapeGlobLiteral(p) + } + pattern = wrapGlobPattern(strings.Join(escaped, "*")) + } + + if !exactCase { + pattern = strings.ToLower(pattern) + } + return pattern +} + +// NameGlobPatternsForSearch builds SQLite name GLOB patterns for the given search options. +func NameGlobPatternsForSearch(opts SearchOptions, useWildcard, largest bool) []string { + if largest || len(opts.Terms) == 0 { + return nil + } + + exactCase := opts.Conditions["exact"] + var patterns []string + for _, t := range opts.Terms { + if t == "" { + continue + } + p := BuildNameGlobPattern(t, opts.Quoted, useWildcard, exactCase) + if p != "" { + patterns = append(patterns, p) + } + } + if len(patterns) == 0 { + return nil + } + return patterns +} diff --git a/backend/indexing/iteminfo/searchPatterns_test.go b/backend/indexing/iteminfo/searchPatterns_test.go new file mode 100644 index 0000000000..7cba9a2091 --- /dev/null +++ b/backend/indexing/iteminfo/searchPatterns_test.go @@ -0,0 +1,53 @@ +package iteminfo + +import "testing" + +func TestBuildNameGlobPattern(t *testing.T) { + tests := []struct { + term string + quoted bool + useWildcard bool + exactCase bool + want string + }{ + {"cons", false, false, false, "*cons*"}, + {"new folder", false, false, false, "*new*folder*"}, + {"new folder", true, false, false, "*new folder*"}, + {"new*folder", false, true, false, "new*folder"}, + {"Blade Runner", false, false, false, "*blade*runner*"}, + {"Blade Runner", false, false, true, "*Blade*Runner*"}, + {"test[1]", false, false, false, "*test\\[1]*"}, + } + + for _, tt := range tests { + got := BuildNameGlobPattern(tt.term, tt.quoted, tt.useWildcard, tt.exactCase) + if got != tt.want { + t.Errorf("BuildNameGlobPattern(%q, quoted=%v, wildcard=%v, exact=%v) = %q, want %q", + tt.term, tt.quoted, tt.useWildcard, tt.exactCase, got, tt.want) + } + } +} + +func TestNameGlobPatternsForSearch(t *testing.T) { + opts := SearchOptions{ + Terms: []string{"house", "car"}, + } + patterns := NameGlobPatternsForSearch(opts, false, false) + if len(patterns) != 2 || patterns[0] != "*house*" || patterns[1] != "*car*" { + t.Fatalf("unexpected patterns: %#v", patterns) + } + + optsQuoted := SearchOptions{ + Terms: []string{"new folder"}, + Quoted: true, + } + patterns = NameGlobPatternsForSearch(optsQuoted, false, false) + if len(patterns) != 1 || patterns[0] != "*new folder*" { + t.Fatalf("unexpected quoted patterns: %#v", patterns) + } + + optsLargest := SearchOptions{Terms: []string{"test"}} + if p := NameGlobPatternsForSearch(optsLargest, false, true); p != nil { + t.Fatalf("largest mode should return nil patterns, got %#v", p) + } +} diff --git a/backend/indexing/iteminfo/searchQuery.go b/backend/indexing/iteminfo/searchQuery.go index 201db5cc65..b4c0e8a32c 100644 --- a/backend/indexing/iteminfo/searchQuery.go +++ b/backend/indexing/iteminfo/searchQuery.go @@ -20,6 +20,8 @@ type SearchOptions struct { // MatchAllTerms, when true and non-wildcard search, an item must contain every term (AND). When false (default), any term matches (OR). // For name GLOB wildcard search, name must match every pattern when true; when false, patterns are OR-combined in SQL. MatchAllTerms bool + // Quoted is true when the search query was a double-quoted phrase; spaces are kept literal in name matching. + Quoted bool } // BuildSearchOptionsFromQuery merges optional repeated literal terms (HTTP "terms" parameters) with structured filter text ("query" prefix). @@ -119,6 +121,7 @@ func ParseSearch(value string) SearchOptions { unique = strings.TrimSuffix(unique, "\"") opts.Terms = []string{unique} + opts.Quoted = true return opts } value = strings.TrimSpace(value) diff --git a/backend/indexing/search.go b/backend/indexing/search.go index a6f370a1af..f7bd68a738 100644 --- a/backend/indexing/search.go +++ b/backend/indexing/search.go @@ -55,10 +55,11 @@ func (idx *Index) SearchParsed(baseOpts iteminfo.SearchOptions, scope string, so searchOptions.Terms = []string{""} } - nameGlobPatterns := nameGlobPatternsForSearch(searchOptions, useWildcard, largest) - globAnd := useWildcard && searchOptions.MatchAllTerms + nameGlobPatterns := iteminfo.NameGlobPatternsForSearch(searchOptions, useWildcard, largest) + caseExact := searchOptions.Conditions["exact"] + globAnd := len(nameGlobPatterns) > 0 && searchOptions.MatchAllTerms - rows, err := idx.db.SearchItems(idx.Name, scope, largest, nameGlobPatterns, globAnd) + rows, err := idx.db.SearchItems(idx.Name, scope, largest, nameGlobPatterns, globAnd, caseExact) if err != nil { return []*SearchResult{} } @@ -95,7 +96,7 @@ func (idx *Index) SearchParsed(baseOpts iteminfo.SearchOptions, scope string, so HasPreview: hasPreview, } - matches := itemMatchesSearchFilters(item, isDir, searchOptions, largest, useWildcard, nameGlobPatterns) + matches := itemMatchesSearchFilters(item, isDir, searchOptions, largest, nameGlobPatterns) if matches { resType := mimeType @@ -127,7 +128,7 @@ func (idx *Index) SearchParsed(baseOpts iteminfo.SearchOptions, scope string, so return sortedKeys } -func itemMatchesSearchFilters(item iteminfo.ItemInfo, isDir bool, searchOptions iteminfo.SearchOptions, largest, useWildcard bool, nameGlobPatterns []string) bool { +func itemMatchesSearchFilters(item iteminfo.ItemInfo, isDir bool, searchOptions iteminfo.SearchOptions, largest bool, nameGlobPatterns []string) bool { if largest { largerThan := int64(searchOptions.LargerThan) * 1024 * 1024 sizeMatches := largerThan == 0 || item.Size > largerThan @@ -141,7 +142,7 @@ func itemMatchesSearchFilters(item iteminfo.ItemInfo, isDir bool, searchOptions dateMatches := searchDateMatches(item.ModTime.Unix(), searchOptions) return sizeMatches && typeMatches && dateMatches } - if useWildcard && len(nameGlobPatterns) > 0 { + if len(nameGlobPatterns) > 0 { return item.MatchesSearchAuxiliaryFilters(searchOptions) } if searchOptions.MatchAllTerms { @@ -168,23 +169,6 @@ func itemMatchesSearchFilters(item iteminfo.ItemInfo, isDir bool, searchOptions return false } -// nameGlobPatternsForSearch builds non-empty parsed terms for SQLite name GLOB OR clauses. -func nameGlobPatternsForSearch(opts iteminfo.SearchOptions, useWildcard, largest bool) []string { - if largest || !useWildcard || len(opts.Terms) == 0 { - return nil - } - var patterns []string - for _, t := range opts.Terms { - if t != "" { - patterns = append(patterns, t) - } - } - if len(patterns) == 0 { - return nil - } - return patterns -} - func searchDateMatches(modUnix int64, opts iteminfo.SearchOptions) bool { if opts.ModifiedNewerThan > 0 && modUnix < opts.ModifiedNewerThan { return false @@ -234,10 +218,11 @@ func SearchMultiSourcesParsed(baseOpts iteminfo.SearchOptions, sources []string, searchOptions.Terms = []string{""} } - nameGlobPatterns := nameGlobPatternsForSearch(searchOptions, useWildcard, largest) - globAnd := useWildcard && searchOptions.MatchAllTerms + nameGlobPatterns := iteminfo.NameGlobPatternsForSearch(searchOptions, useWildcard, largest) + caseExact := searchOptions.Conditions["exact"] + globAnd := len(nameGlobPatterns) > 0 && searchOptions.MatchAllTerms - rows, err := db.SearchItemsMultiSource(sources, normalizedScopes, largest, nameGlobPatterns, globAnd) + rows, err := db.SearchItemsMultiSource(sources, normalizedScopes, largest, nameGlobPatterns, globAnd, caseExact) if err != nil { return []*SearchResult{} } @@ -275,7 +260,7 @@ func SearchMultiSourcesParsed(baseOpts iteminfo.SearchOptions, sources []string, HasPreview: hasPreview, } - matches := itemMatchesSearchFilters(item, isDir, searchOptions, largest, useWildcard, nameGlobPatterns) + matches := itemMatchesSearchFilters(item, isDir, searchOptions, largest, nameGlobPatterns) if matches { resType := mimeType diff --git a/backend/indexing/search_test.go b/backend/indexing/search_test.go index 09e55ab7aa..a275f3ef43 100644 --- a/backend/indexing/search_test.go +++ b/backend/indexing/search_test.go @@ -116,6 +116,14 @@ func TestParseSearch(t *testing.T) { Terms: []string{"thisfile"}, }, }, + { + input: `"new folder"`, + want: iteminfo.SearchOptions{ + Conditions: map[string]bool{"exact": false}, + Terms: []string{"new folder"}, + Quoted: true, + }, + }, { input: "type:olderThan=2024-06-01 type:newerThan=2024-01-01 findme", want: iteminfo.SearchOptions{ @@ -266,6 +274,13 @@ func TestSearchIndexes(t *testing.T) { {ItemInfo: iteminfo.ItemInfo{Name: "toggle.gif", Size: 65536, Type: "image/gif"}}, }, }, + "/media/": { + ItemInfo: iteminfo.ItemInfo{Name: "media", Type: "directory"}, + Files: []iteminfo.ExtendedItemInfo{ + {ItemInfo: iteminfo.ItemInfo{Name: "Blade.Runner.mkv", Type: "video"}}, + {ItemInfo: iteminfo.ItemInfo{Name: "new.folder.txt", Type: "text"}}, + }, + }, } // Insert all directories and files into database @@ -462,6 +477,65 @@ func TestSearchIndexes(t *testing.T) { }, }, }, + { + search: "Blade Runner", + scope: "/media/", + expectedResult: []*SearchResult{ + { + Path: "/media/Blade.Runner.mkv", + Type: "video", + Size: 0, + }, + }, + }, + { + search: "new folder", + scope: "/media/", + expectedResult: []*SearchResult{ + { + Path: "/media/new.folder.txt", + Type: "text", + Size: 0, + }, + }, + }, + { + search: "new folder", + scope: "/", + expectedResult: []*SearchResult{ + { + Path: "/new+folder/", + Type: "directory", + Size: 0, + }, + { + Path: "/media/new.folder.txt", + Type: "text", + Size: 0, + }, + }, + }, + { + search: `"new folder"`, + scope: "/media/", + expectedResult: []*SearchResult{}, + }, + { + search: "VIDEO", + scope: "/new/test/", + expectedResult: []*SearchResult{ + { + Path: "/new/test/video.MP4", + Type: "video", + Size: 0, + }, + { + Path: "/new/test/video.mp4", + Type: "video", + Size: 0, + }, + }, + }, } for _, tt := range tests { @@ -481,6 +555,59 @@ func TestSearchIndexes(t *testing.T) { } } +func TestSearchUserGlob(t *testing.T) { + if indexDB == nil { + var err error + indexDB, _, err = dbsql.NewIndexDB("test_search_glob", "OFF", 1000, 32, false) + if err != nil { + t.Fatalf("Failed to create test database: %v", err) + } + } + + index := Index{ + Source: settings.Source{ + Name: "test_search_glob", + Path: "/mock/path", + }, + db: indexDB, + mock: true, + } + + now := time.Now() + directories := map[string]*iteminfo.FileInfo{ + "/media/": { + ItemInfo: iteminfo.ItemInfo{Name: "media", Type: "directory"}, + Files: []iteminfo.ExtendedItemInfo{ + {ItemInfo: iteminfo.ItemInfo{Name: "NEW-folder", Type: "text"}}, + }, + }, + } + + for path, dirInfo := range directories { + dirInfo.Path = path + if dirInfo.ModTime.IsZero() { + dirInfo.ModTime = now + } + _ = index.db.InsertItem("test_search_glob", path, dirInfo) + for _, file := range dirInfo.Files { + filePath := strings.TrimSuffix(path, "/") + "/" + file.Name + fileInfo := &iteminfo.FileInfo{ + Path: filePath, + ItemInfo: file.ItemInfo, + } + if fileInfo.ModTime.IsZero() { + fileInfo.ModTime = now + } + _ = index.db.InsertItem("test_search_glob", filePath, fileInfo) + } + } + + result := index.Search("new*folder", "/media/", "", false, DefaultSearchResults, 0, 0, true) + if len(result) != 1 || result[0].Path != "/media/NEW-folder" { + t.Fatalf("expected new*folder to match NEW-folder, got %#v", result) + } +} + func TestSearchLargestModeExcludesRoot(t *testing.T) { // Initialize the database if not already done if indexDB == nil { diff --git a/backend/swagger/docs/docs.go b/backend/swagger/docs/docs.go index 6f19ab3972..734418caf4 100644 --- a/backend/swagger/docs/docs.go +++ b/backend/swagger/docs/docs.go @@ -4630,6 +4630,86 @@ const docTemplate = `{ } } } + }, + "/public/api/share/pinnedItems": { + "patch": { + "description": "Patches one pinned item at a time for share owners. Defaults to add; pass ?action=remove to unpin.", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "Shares" + ], + "summary": "Add or remove a pinned item on a share", + "parameters": [ + { + "type": "string", + "description": "Share hash", + "name": "hash", + "in": "query", + "required": true + }, + { + "type": "string", + "description": "add (default) or remove", + "name": "action", + "in": "query" + }, + { + "description": "Pinned item", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/http.sharePinnedItemPatchRequest" + } + } + ], + "responses": { + "204": { + "description": "No Content" + }, + "400": { + "description": "Bad Request", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "403": { + "description": "Forbidden", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "404": { + "description": "Share not found", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + } + } } }, "definitions": { @@ -4923,6 +5003,9 @@ const docTemplate = `{ "perUserDownloadLimit": { "type": "boolean" }, + "pinnedItems": { + "$ref": "#/definitions/share.PinnedItems" + }, "quickDownload": { "type": "boolean" }, @@ -5119,6 +5202,23 @@ const docTemplate = `{ } } }, + "http.sharePinnedItemPatchRequest": { + "type": "object", + "required": [ + "name", + "path" + ], + "properties": { + "name": { + "description": "item basename within path", + "type": "string" + }, + "path": { + "description": "share-relative parent directory", + "type": "string" + } + } + }, "http.unarchiveRequest": { "type": "object", "properties": { @@ -7283,6 +7383,9 @@ const docTemplate = `{ "perUserDownloadLimit": { "type": "boolean" }, + "pinnedItems": { + "$ref": "#/definitions/share.PinnedItems" + }, "quickDownload": { "type": "boolean" }, @@ -7343,6 +7446,15 @@ const docTemplate = `{ } } }, + "share.PinnedItems": { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + } + } + }, "users.AuthToken": { "type": "object", "properties": { diff --git a/backend/swagger/docs/swagger.json b/backend/swagger/docs/swagger.json index e63aa94a77..b3db494cfd 100644 --- a/backend/swagger/docs/swagger.json +++ b/backend/swagger/docs/swagger.json @@ -4619,6 +4619,86 @@ } } } + }, + "/public/api/share/pinnedItems": { + "patch": { + "description": "Patches one pinned item at a time for share owners. Defaults to add; pass ?action=remove to unpin.", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "Shares" + ], + "summary": "Add or remove a pinned item on a share", + "parameters": [ + { + "type": "string", + "description": "Share hash", + "name": "hash", + "in": "query", + "required": true + }, + { + "type": "string", + "description": "add (default) or remove", + "name": "action", + "in": "query" + }, + { + "description": "Pinned item", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/http.sharePinnedItemPatchRequest" + } + } + ], + "responses": { + "204": { + "description": "No Content" + }, + "400": { + "description": "Bad Request", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "403": { + "description": "Forbidden", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "404": { + "description": "Share not found", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + } + } } }, "definitions": { @@ -4912,6 +4992,9 @@ "perUserDownloadLimit": { "type": "boolean" }, + "pinnedItems": { + "$ref": "#/definitions/share.PinnedItems" + }, "quickDownload": { "type": "boolean" }, @@ -5108,6 +5191,23 @@ } } }, + "http.sharePinnedItemPatchRequest": { + "type": "object", + "required": [ + "name", + "path" + ], + "properties": { + "name": { + "description": "item basename within path", + "type": "string" + }, + "path": { + "description": "share-relative parent directory", + "type": "string" + } + } + }, "http.unarchiveRequest": { "type": "object", "properties": { @@ -7272,6 +7372,9 @@ "perUserDownloadLimit": { "type": "boolean" }, + "pinnedItems": { + "$ref": "#/definitions/share.PinnedItems" + }, "quickDownload": { "type": "boolean" }, @@ -7332,6 +7435,15 @@ } } }, + "share.PinnedItems": { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + } + } + }, "users.AuthToken": { "type": "object", "properties": { diff --git a/backend/swagger/docs/swagger.yaml b/backend/swagger/docs/swagger.yaml index 50095a1e30..340e5e7b23 100644 --- a/backend/swagger/docs/swagger.yaml +++ b/backend/swagger/docs/swagger.yaml @@ -193,6 +193,8 @@ definitions: type: boolean perUserDownloadLimit: type: boolean + pinnedItems: + $ref: '#/definitions/share.PinnedItems' quickDownload: type: boolean shareTheme: @@ -339,6 +341,18 @@ definitions: - path - source type: object + http.sharePinnedItemPatchRequest: + properties: + name: + description: item basename within path + type: string + path: + description: share-relative parent directory + type: string + required: + - name + - path + type: object http.unarchiveRequest: properties: deleteAfter: @@ -1967,6 +1981,8 @@ definitions: type: string perUserDownloadLimit: type: boolean + pinnedItems: + $ref: '#/definitions/share.PinnedItems' quickDownload: type: boolean shareTheme: @@ -2013,6 +2029,12 @@ definitions: "gallery"' type: string type: object + share.PinnedItems: + additionalProperties: + items: + type: string + type: array + type: object users.AuthToken: properties: Permissions: @@ -5587,4 +5609,58 @@ paths: summary: Get share information by hash tags: - Shares + /public/api/share/pinnedItems: + patch: + consumes: + - application/json + description: Patches one pinned item at a time for share owners. Defaults to + add; pass ?action=remove to unpin. + parameters: + - description: Share hash + in: query + name: hash + required: true + type: string + - description: add (default) or remove + in: query + name: action + type: string + - description: Pinned item + in: body + name: body + required: true + schema: + $ref: '#/definitions/http.sharePinnedItemPatchRequest' + produces: + - application/json + responses: + "204": + description: No Content + "400": + description: Bad Request + schema: + additionalProperties: + type: string + type: object + "403": + description: Forbidden + schema: + additionalProperties: + type: string + type: object + "404": + description: Share not found + schema: + additionalProperties: + type: string + type: object + "500": + description: Internal Server Error + schema: + additionalProperties: + type: string + type: object + summary: Add or remove a pinned item on a share + tags: + - Shares swagger: "2.0" diff --git a/frontend/eslint.config.js b/frontend/eslint.config.js index 5bc546398b..8f28d996a1 100644 --- a/frontend/eslint.config.js +++ b/frontend/eslint.config.js @@ -5,6 +5,7 @@ import pluginVue from "eslint-plugin-vue"; import vueI18n from '@intlify/eslint-plugin-vue-i18n'; import vueParser from "vue-eslint-parser"; import globals from "globals"; +import security from "eslint-plugin-security"; export default defineConfig( { @@ -12,7 +13,7 @@ export default defineConfig( "**/dist/**", "**/node_modules/**", "**/public/**", - "**/i18n/is.json", + "**/*.json", ], }, @@ -21,6 +22,7 @@ export default defineConfig( ...tseslint.configs.recommended, ...pluginVue.configs["flat/essential"], ...vueI18n.configs.recommended, + security.configs.recommended, // i18n { @@ -75,8 +77,13 @@ export default defineConfig( "prefer-template": "warn", "@typescript-eslint/consistent-type-definitions": "warn", "@typescript-eslint/prefer-optional-chain": "warn", + "@typescript-eslint/no-floating-promises": "error", + "@typescript-eslint/no-unnecessary-condition": "off", // this one is useful, but is pretty noisy and found lot of false positives + "@typescript-eslint/no-dynamic-delete": "warn", + "@typescript-eslint/no-misused-promises": "error", "prefer-object-has-own": "error", "no-prototype-builtins": "error", + "no-implied-eval": "error", "no-restricted-globals": [ "error", { name: "isNaN", message: "Use Number.isNaN instead." }, @@ -118,6 +125,20 @@ export default defineConfig( "vue/require-v-for-key": "error", "vue/no-reserved-component-names": "off", "vue/no-unused-components": "warn", + //"vue/no-v-html": "warn", + "vue/no-v-text-v-html-on-component": "warn", + }, + }, + // Relax the rules a bit for tests files + { + files: ["tests/**/*.ts", "**/*.spec.ts", "**/*.test.ts"], + rules: { + "preserve-caught-error": "off", + "no-empty-pattern": "off", + "@typescript-eslint/no-explicit-any": "off", + "@typescript-eslint/no-unused-vars": ["error", { caughtErrors: "none" }], + "no-unused-expressions": "off", + "security/detect-non-literal-regexp": "off", }, }, ); diff --git a/frontend/package-lock.json b/frontend/package-lock.json index 3e101570b0..d33f0b3375 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -32,10 +32,12 @@ "@intlify/eslint-plugin-vue-i18n": "^4.4.0", "@intlify/unplugin-vue-i18n": "^11.2.3", "@playwright/test": "^1.54.1", + "@types/eslint-plugin-security": "^3.0.1", "@types/node": "^24.1.0", "@vitejs/plugin-vue": "^5.0.4", "deepl-node": "^1.16.0", "eslint": "^10.4.0", + "eslint-plugin-security": "^4.0.0", "eslint-plugin-vue": "^10.9.1", "fs-extra": "^11.3.0", "globals": "^17.6.0", @@ -1798,6 +1800,27 @@ "dev": true, "license": "MIT" }, + "node_modules/@types/eslint": { + "version": "9.6.1", + "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-9.6.1.tgz", + "integrity": "sha512-FXx2pKgId/WyYo2jXw63kk7/+TY7u7AziEJxJAnSFzHlqTAS3Ync6SvgYAN/k4/PQpnnVuzoMuVnByKK2qp0ag==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/estree": "*", + "@types/json-schema": "*" + } + }, + "node_modules/@types/eslint-plugin-security": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@types/eslint-plugin-security/-/eslint-plugin-security-3.0.1.tgz", + "integrity": "sha512-z+v78aGgONHyq7mMaXgzG+10HonH0HBubSLDbTXdNGyCLtM3c29MdDc9hQzHO9pDan4WYHWdULVOJyzszqDuqg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/eslint": "*" + } + }, "node_modules/@types/esrecurse": { "version": "4.3.1", "resolved": "https://registry.npmjs.org/@types/esrecurse/-/esrecurse-4.3.1.tgz", @@ -1830,9 +1853,9 @@ } }, "node_modules/@types/node": { - "version": "24.13.1", - "resolved": "https://registry.npmjs.org/@types/node/-/node-24.13.1.tgz", - "integrity": "sha512-RSpUJGmvsJ1ZeBehQZFhIdpsz+bIpES0nIQXko4Ybq+N+kX6XvOq3Jo+iJ82FWLdblFq85AsMikd3m35jgezYg==", + "version": "24.13.2", + "resolved": "https://registry.npmjs.org/@types/node/-/node-24.13.2.tgz", + "integrity": "sha512-fRa09kZTgu8o71KFcDjUFuc7F+dEbZYZmkI0mg5YBTRs0yMKjYHsq/c0urDKeDb+D5qVgXOdFcuu+DZPKOITwA==", "dev": true, "license": "MIT", "dependencies": { @@ -1847,17 +1870,17 @@ "optional": true }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "8.60.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.60.1.tgz", - "integrity": "sha512-JQ4S5GB0tfjO8BuJ4fcX+HodkzJjYBV+7OJ+wLygaX7OGQ7FudyHL4NSCA6ob+w3Yn+5MkKIozOwQhXeM7opVg==", + "version": "8.61.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.61.0.tgz", + "integrity": "sha512-bFNvl9ZczlVb+wR2Akszf3gHfKVj/8WanXaGJ3UstTA7brNKg0cNdk6X1Psu5V7MZ2oQtzZKOEzIUehaoxbDGw==", "dev": true, "license": "MIT", "dependencies": { "@eslint-community/regexpp": "^4.12.2", - "@typescript-eslint/scope-manager": "8.60.1", - "@typescript-eslint/type-utils": "8.60.1", - "@typescript-eslint/utils": "8.60.1", - "@typescript-eslint/visitor-keys": "8.60.1", + "@typescript-eslint/scope-manager": "8.61.0", + "@typescript-eslint/type-utils": "8.61.0", + "@typescript-eslint/utils": "8.61.0", + "@typescript-eslint/visitor-keys": "8.61.0", "ignore": "^7.0.5", "natural-compare": "^1.4.0", "ts-api-utils": "^2.5.0" @@ -1870,22 +1893,22 @@ "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "@typescript-eslint/parser": "^8.60.1", + "@typescript-eslint/parser": "^8.61.0", "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", "typescript": ">=4.8.4 <6.1.0" } }, "node_modules/@typescript-eslint/parser": { - "version": "8.60.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.60.1.tgz", - "integrity": "sha512-A0M6ua6H252bVjPvvtSgl2QA4+ET9S5Mtkb2GDyTxIhH/C4qDItT7RQNO5PhMC6NXGYXOR9dIalcDDgBKT7oFA==", + "version": "8.61.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.61.0.tgz", + "integrity": "sha512-5B7PfA2e1NQGCnDHd/0lW7W3gvp3d59Ryw54FYO8Uswxo9f6ikw3AZV+Xj/TvpImmpsiYyUqAfhC6kJID1jF6w==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/scope-manager": "8.60.1", - "@typescript-eslint/types": "8.60.1", - "@typescript-eslint/typescript-estree": "8.60.1", - "@typescript-eslint/visitor-keys": "8.60.1", + "@typescript-eslint/scope-manager": "8.61.0", + "@typescript-eslint/types": "8.61.0", + "@typescript-eslint/typescript-estree": "8.61.0", + "@typescript-eslint/visitor-keys": "8.61.0", "debug": "^4.4.3" }, "engines": { @@ -1901,14 +1924,14 @@ } }, "node_modules/@typescript-eslint/project-service": { - "version": "8.60.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.60.1.tgz", - "integrity": "sha512-eXkTH2bxmXlqD1RnOPmLZ9ZM9D3VwSx04JOwBnP9RQ+yUA5a2Mu7SfW8uaV2Aon53NJzZlZYuX7tn91Izf+xaw==", + "version": "8.61.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.61.0.tgz", + "integrity": "sha512-DV42F7MLJO6Rax7SK1yg43tcnEfGUrurSpSxKuVX+a3RCTzBlH3fuxprrOJXKCJGAaw82xXocikJ0uQaqwXgGA==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/tsconfig-utils": "^8.60.1", - "@typescript-eslint/types": "^8.60.1", + "@typescript-eslint/tsconfig-utils": "^8.61.0", + "@typescript-eslint/types": "^8.61.0", "debug": "^4.4.3" }, "engines": { @@ -1923,14 +1946,14 @@ } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "8.60.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.60.1.tgz", - "integrity": "sha512-gvI5OQoptnxQnchOirukCuQ55svJSTuD/4k5+pC267xyBtYry748R9/c3tYUzb/iE6RZfllRz2lVulLCHkTm4w==", + "version": "8.61.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.61.0.tgz", + "integrity": "sha512-IWdXFHFSb6mlC3HPc7QsLDm5zYEbUla6trDEHf32D3/dnuUyXd87plScSNXSbm0/RxMvObpI17sv/EDTGrGZkA==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.60.1", - "@typescript-eslint/visitor-keys": "8.60.1" + "@typescript-eslint/types": "8.61.0", + "@typescript-eslint/visitor-keys": "8.61.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -1941,9 +1964,9 @@ } }, "node_modules/@typescript-eslint/tsconfig-utils": { - "version": "8.60.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.60.1.tgz", - "integrity": "sha512-nh8w4qAteiKuZu3pSSzG/yGKpw0OlkrKnzFmbVRenKaD4qc+7i1GrmZaLVkr8rk4uipiPGMOW4YsM6WmKZ5CvA==", + "version": "8.61.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.61.0.tgz", + "integrity": "sha512-O5Amvdv9ztMpxpf+vmFULGG78IE6Qwdr3bCGvqwG4nwc9H2qXkOYJJnRbRHyMkQTjv1d03olqwwwzHLMqpFePQ==", "dev": true, "license": "MIT", "engines": { @@ -1958,15 +1981,15 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "8.60.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.60.1.tgz", - "integrity": "sha512-sdwTrpjosW7ANQYJ39ZBF1ZyEMEGVB2UsikrserVM/30a/F1dTLnu9bGxEdosugyu5caigjLrR2qiD11asjI1A==", + "version": "8.61.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.61.0.tgz", + "integrity": "sha512-TuBiQYIkd97yBfInHCTKVYMbX4kvEmpOEuixIuzCU9p8BGT1SfyyO0d0IfDMbPIHcjn/hWnusUX5e8v5Xg+X8A==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.60.1", - "@typescript-eslint/typescript-estree": "8.60.1", - "@typescript-eslint/utils": "8.60.1", + "@typescript-eslint/types": "8.61.0", + "@typescript-eslint/typescript-estree": "8.61.0", + "@typescript-eslint/utils": "8.61.0", "debug": "^4.4.3", "ts-api-utils": "^2.5.0" }, @@ -1983,9 +2006,9 @@ } }, "node_modules/@typescript-eslint/types": { - "version": "8.60.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.60.1.tgz", - "integrity": "sha512-4h0tY8ppCkdCzcrl2YM5M3my0xsE1Tf8om3owEu5oPWmXwkKRmk0j0LGDzYBGUcAlesEbxBhazqu/K4cu3Ug7w==", + "version": "8.61.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.61.0.tgz", + "integrity": "sha512-9QTQpZ5Iin4CdIodfbDQFSeiSJKidgYJYug1P9CC2xWgUTvlmixViqDZNciMjwLBZyJnG4tGmPl97rVAFb1AJg==", "dev": true, "license": "MIT", "engines": { @@ -1997,16 +2020,16 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "8.60.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.60.1.tgz", - "integrity": "sha512-alpRkfG8hlVE5kdJW2GkfgDgXxold3e8e4l6EnmhRmRLbekgAPCCGDVD++sABy9FcgPFroq+uFcCSM1vR57Cew==", + "version": "8.61.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.61.0.tgz", + "integrity": "sha512-42zatd5qSvvcV1JdDBCLxYRznvP4eIHpPoZXdkPFnAmanA4FuZ5dibSnCBggY8hQnqajPpoGjXFdZ7fIJKQnlA==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/project-service": "8.60.1", - "@typescript-eslint/tsconfig-utils": "8.60.1", - "@typescript-eslint/types": "8.60.1", - "@typescript-eslint/visitor-keys": "8.60.1", + "@typescript-eslint/project-service": "8.61.0", + "@typescript-eslint/tsconfig-utils": "8.61.0", + "@typescript-eslint/types": "8.61.0", + "@typescript-eslint/visitor-keys": "8.61.0", "debug": "^4.4.3", "minimatch": "^10.2.2", "semver": "^7.7.3", @@ -2025,16 +2048,16 @@ } }, "node_modules/@typescript-eslint/utils": { - "version": "8.60.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.60.1.tgz", - "integrity": "sha512-h2MPBLoNtjc3qZWfY3Tl51yPorQ2McHn8pJfcMNTcIvrrZrr90Ykffit0yjrPFWQcRcUxzH20+6OcVdW4yHtUg==", + "version": "8.61.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.61.0.tgz", + "integrity": "sha512-3bzFt7ImFMW/jVYwJamDoe/dMOdFLSC6pom6rRjdh4SZJEYupyMzem8e7vKZLclLfpHjlwSAXOUxtKxGXUiLqA==", "dev": true, "license": "MIT", "dependencies": { "@eslint-community/eslint-utils": "^4.9.1", - "@typescript-eslint/scope-manager": "8.60.1", - "@typescript-eslint/types": "8.60.1", - "@typescript-eslint/typescript-estree": "8.60.1" + "@typescript-eslint/scope-manager": "8.61.0", + "@typescript-eslint/types": "8.61.0", + "@typescript-eslint/typescript-estree": "8.61.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -2049,13 +2072,13 @@ } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "8.60.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.60.1.tgz", - "integrity": "sha512-EbGRQg4FhrmwLodl+t3JNAnXHWVr9Vp+Zl1QBZVPY4ByfkzIT8cX3K6QWODHtkIZqqJVEWvhHSx3v5PDHsaQag==", + "version": "8.61.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.61.0.tgz", + "integrity": "sha512-QVLZu3ZPQEE+HICQyAMZ2yLQhxf0meY/wx6Hx14YcTNj13JB3qHlX3lJ02L3fLGHgERRH71kvYDwiXIguT3AjQ==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.60.1", + "@typescript-eslint/types": "8.61.0", "eslint-visitor-keys": "^5.0.0" }, "engines": { @@ -2246,39 +2269,39 @@ } }, "node_modules/@vue/compiler-core": { - "version": "3.5.35", - "resolved": "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.5.35.tgz", - "integrity": "sha512-BUmHaR1J+O+CKZ9uJucdVTEr1LHsdyvv7vG3eNRhK3CczEHeMd/LtsHAuD7PbrxvI2envCY2v7HI1vC1aBRzKw==", + "version": "3.5.38", + "resolved": "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.5.38.tgz", + "integrity": "sha512-s99aGxWYig9ErHbct27KXEGhrBYlRI6c4MwAgXErOAbX9xiW37/uMa+XUDO69zLz83dng8UUZ70CTOJrLrYrEQ==", "license": "MIT", "dependencies": { - "@babel/parser": "^7.29.3", - "@vue/shared": "3.5.35", + "@babel/parser": "^7.29.7", + "@vue/shared": "3.5.38", "entities": "^7.0.1", "estree-walker": "^2.0.2", "source-map-js": "^1.2.1" } }, "node_modules/@vue/compiler-dom": { - "version": "3.5.35", - "resolved": "https://registry.npmjs.org/@vue/compiler-dom/-/compiler-dom-3.5.35.tgz", - "integrity": "sha512-k+bprkXxuqhVajgTx5mUHuir7TwQzUKOWR40ng1ncAqQRPnrLngGGgqVEEhOnTMlc8btHYVKmrP8s5Qyg0hvYA==", + "version": "3.5.38", + "resolved": "https://registry.npmjs.org/@vue/compiler-dom/-/compiler-dom-3.5.38.tgz", + "integrity": "sha512-JTqp25l8aFfJYF7/KmsXZjAxJz7T+SjmTJLoXVjHtc2BrSgSiW2n9Aem/cWq1OPe68A8JL06B3eVdhlP0H4TVw==", "license": "MIT", "dependencies": { - "@vue/compiler-core": "3.5.35", - "@vue/shared": "3.5.35" + "@vue/compiler-core": "3.5.38", + "@vue/shared": "3.5.38" } }, "node_modules/@vue/compiler-sfc": { - "version": "3.5.35", - "resolved": "https://registry.npmjs.org/@vue/compiler-sfc/-/compiler-sfc-3.5.35.tgz", - "integrity": "sha512-G5VPMcXTSywXBgtFOZOnHKBxKSrwXUcvY1iaF5/hRcy7t0J6CH/d8ha9F4nzi00Fax1eLV0QHM7v4mQu68jydw==", + "version": "3.5.38", + "resolved": "https://registry.npmjs.org/@vue/compiler-sfc/-/compiler-sfc-3.5.38.tgz", + "integrity": "sha512-DuA2GiZawSEW442iw/9+Fkol8hTgb4Ke5KkhmSry65QA7YuyMbIdy8p0XZRMvNwJdgRz307W8g1CSzdvS4nuNg==", "license": "MIT", "dependencies": { - "@babel/parser": "^7.29.3", - "@vue/compiler-core": "3.5.35", - "@vue/compiler-dom": "3.5.35", - "@vue/compiler-ssr": "3.5.35", - "@vue/shared": "3.5.35", + "@babel/parser": "^7.29.7", + "@vue/compiler-core": "3.5.38", + "@vue/compiler-dom": "3.5.38", + "@vue/compiler-ssr": "3.5.38", + "@vue/shared": "3.5.38", "estree-walker": "^2.0.2", "magic-string": "^0.30.21", "postcss": "^8.5.15", @@ -2286,13 +2309,13 @@ } }, "node_modules/@vue/compiler-ssr": { - "version": "3.5.35", - "resolved": "https://registry.npmjs.org/@vue/compiler-ssr/-/compiler-ssr-3.5.35.tgz", - "integrity": "sha512-rGhAeXgdM7/ffTJGXT69rCCdTmjDewnFuUZfBQQHTdcEBeWdT5HCGY60y2ytLJr9/Dsu7IntUi5z/w0h6Rjnzw==", + "version": "3.5.38", + "resolved": "https://registry.npmjs.org/@vue/compiler-ssr/-/compiler-ssr-3.5.38.tgz", + "integrity": "sha512-7s+W5Gc42FGxZMcuwl8H5B29T8BJPMdBT7KHFE+BbAuZ/iTEdTtv7z2XiMjiaUUw4w3ZcCEdHs36RuYJ2VA7bA==", "license": "MIT", "dependencies": { - "@vue/compiler-dom": "3.5.35", - "@vue/shared": "3.5.35" + "@vue/compiler-dom": "3.5.38", + "@vue/shared": "3.5.38" } }, "node_modules/@vue/compiler-vue2": { @@ -2338,53 +2361,53 @@ } }, "node_modules/@vue/reactivity": { - "version": "3.5.35", - "resolved": "https://registry.npmjs.org/@vue/reactivity/-/reactivity-3.5.35.tgz", - "integrity": "sha512-tVc+SsHConvh/Lz64qq1pP3rYArBmK42xonovEcxY74SQtvctZodG/zhq54P5dr38cVuw25d27cPNRdlMidpGQ==", + "version": "3.5.38", + "resolved": "https://registry.npmjs.org/@vue/reactivity/-/reactivity-3.5.38.tgz", + "integrity": "sha512-pG6LV/NDNRbKizcUjFFLAfjaL8mcv4DmR9avNcUw2gDHBzZneuS2TWCmp633ynzxz9YYKNeEPK2I8Wraqy2HUQ==", "license": "MIT", "dependencies": { - "@vue/shared": "3.5.35" + "@vue/shared": "3.5.38" } }, "node_modules/@vue/runtime-core": { - "version": "3.5.35", - "resolved": "https://registry.npmjs.org/@vue/runtime-core/-/runtime-core-3.5.35.tgz", - "integrity": "sha512-A/xFNX9loIcWDygeQuNCfKuh0CoYBzxhqEMNah5TSFg9Z53DrFYEN2qi5CU9necjM1OWYegYREUTHmXTmhfXtg==", + "version": "3.5.38", + "resolved": "https://registry.npmjs.org/@vue/runtime-core/-/runtime-core-3.5.38.tgz", + "integrity": "sha512-iyW8WVfF1CpCXxncZY5Ei6rSd6oZr5DgEom//fUjRBRl56AXPD+s9ATvukRt77ZFTuYlnVA1bxY+dJB94tWVYw==", "license": "MIT", "dependencies": { - "@vue/reactivity": "3.5.35", - "@vue/shared": "3.5.35" + "@vue/reactivity": "3.5.38", + "@vue/shared": "3.5.38" } }, "node_modules/@vue/runtime-dom": { - "version": "3.5.35", - "resolved": "https://registry.npmjs.org/@vue/runtime-dom/-/runtime-dom-3.5.35.tgz", - "integrity": "sha512-odrJ1C391dbGnyDRh8U+rnP7J2amIEzfmRk5vXy7xi3aZhEXofTvpi0T4HJb6jlNqQZTNPR5MPHSB3RHNkIORA==", + "version": "3.5.38", + "resolved": "https://registry.npmjs.org/@vue/runtime-dom/-/runtime-dom-3.5.38.tgz", + "integrity": "sha512-apX2wt9sdfDshS+a2xueFZLVpt0GkRJZSoPmrW/SA4yzXTznhfcMVW59gr7h4YQeY0vJhdJkk2rsIDwgfFgC5A==", "license": "MIT", "dependencies": { - "@vue/reactivity": "3.5.35", - "@vue/runtime-core": "3.5.35", - "@vue/shared": "3.5.35", + "@vue/reactivity": "3.5.38", + "@vue/runtime-core": "3.5.38", + "@vue/shared": "3.5.38", "csstype": "^3.2.3" } }, "node_modules/@vue/server-renderer": { - "version": "3.5.35", - "resolved": "https://registry.npmjs.org/@vue/server-renderer/-/server-renderer-3.5.35.tgz", - "integrity": "sha512-NkebSOYdB97wi8OQcO3HqzZSlymJi/aWsN/7h74OSVhRTm6qGs3Jp3e0rCXynmWwSlKeRrnlIug+ilYoHBmQDA==", + "version": "3.5.38", + "resolved": "https://registry.npmjs.org/@vue/server-renderer/-/server-renderer-3.5.38.tgz", + "integrity": "sha512-vue8vbf2QlV4quHqzwmJy6dWfmRhP1J8l4wtZg60CL6VoKqcPY2oe7may3+1d9qfpedjK5PRLFqd5k3Isj9mUw==", "license": "MIT", "dependencies": { - "@vue/compiler-ssr": "3.5.35", - "@vue/shared": "3.5.35" + "@vue/compiler-ssr": "3.5.38", + "@vue/shared": "3.5.38" }, "peerDependencies": { - "vue": "3.5.35" + "vue": "3.5.38" } }, "node_modules/@vue/shared": { - "version": "3.5.35", - "resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.5.35.tgz", - "integrity": "sha512-zSbjL7gRXwks2ZQLRGCajBtBXEOXW9Ddhn/HvSdrGkE2dqGnumzW8XtusRrxrE9LvqtiqDXQ+A60Hp6mvdYxfA==", + "version": "3.5.38", + "resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.5.38.tgz", + "integrity": "sha512-FTW0AFZNaK5/mOqvGBwVfUlNLU38TiQn4+DQgIFUnrBBJQ1crMJ82yeGQLV5jyKFsO8yRukpbuP7x+nRbH6aug==", "license": "MIT" }, "node_modules/@xmldom/xmldom": { @@ -2403,9 +2426,9 @@ "license": "BSD-3-Clause" }, "node_modules/acorn": { - "version": "8.16.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.16.0.tgz", - "integrity": "sha512-UVJyE9MttOsBQIDKw1skb9nAwQuR5wuGD3+82K6JgJlm/Y+KI92oNsMNGZCYdDsVtRHSak0pcV5Dno5+4jh9sw==", + "version": "8.17.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.17.0.tgz", + "integrity": "sha512-xRQbDb9BnwDafYNn6Vwl839DYVjqXYb1XVGtWAZ1kcDc6iwAL4hg3B1dZlRiuENFeO2H53gFG3in621AdERVAg==", "dev": true, "license": "MIT", "bin": { @@ -2896,9 +2919,9 @@ "license": "BSD-2-Clause" }, "node_modules/dompurify": { - "version": "3.4.8", - "resolved": "https://registry.npmjs.org/dompurify/-/dompurify-3.4.8.tgz", - "integrity": "sha512-yb1cEmaOum7wFvOCSQxyfgVlv5D47Rc30iZWoMpbDIWTnJ6grDDQyu2KFJzB2k7u0pMuJcQ1zphH//fFnw2tjQ==", + "version": "3.4.10", + "resolved": "https://registry.npmjs.org/dompurify/-/dompurify-3.4.10.tgz", + "integrity": "sha512-0xzNv0e7oYC6yyuOGZIABPM4qtg3QxLFniDNPP4ZP90wR8Yq3zgwpRbrNiT4N3IKqDbbYFEJLV+JWEs19aZ//w==", "license": "(MPL-2.0 OR Apache-2.0)", "optionalDependencies": { "@types/trusted-types": "^2.0.7" @@ -3211,6 +3234,22 @@ "eslint": ">=6.0.0" } }, + "node_modules/eslint-plugin-security": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-security/-/eslint-plugin-security-4.0.0.tgz", + "integrity": "sha512-tfuQT8K/Li1ZxhFzyD8wPIKtlzZxqBcPr9q0jFMQ77wWAbKBVEhaMPVQRTMTvCMUDhwBe5vPVqQPwAGk/ASfxQ==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "safe-regex": "^2.1.1" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, "node_modules/eslint-plugin-vue": { "version": "10.9.2", "resolved": "https://registry.npmjs.org/eslint-plugin-vue/-/eslint-plugin-vue-10.9.2.tgz", @@ -4616,16 +4655,16 @@ } }, "node_modules/nwsapi": { - "version": "2.2.23", - "resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.2.23.tgz", - "integrity": "sha512-7wfH4sLbt4M0gCDzGE6vzQBo0bfTKjU7Sfpqy/7gs1qBfYz2vEJH6vXcBKpO3+6Yu1telwd0t9HpyOoLEQQbIQ==", + "version": "2.2.24", + "resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.2.24.tgz", + "integrity": "sha512-7YRhZ3jS45LwmSCT4b2sVFHt/WuovaktDU07QrtOBY2PXskss5a9jfmR9jptyumwXST+rFjrmppMY1KT/yn35A==", "dev": true, "license": "MIT" }, "node_modules/obug": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/obug/-/obug-2.1.2.tgz", - "integrity": "sha512-AWGB9WFcRXOQs48Z/udjI5ZcZMHXwX8XPByNpOydgcGsDLIzjGizhoMWJyKAWze7AVW/2W1i+/gPX4YtKe5cyg==", + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/obug/-/obug-2.1.3.tgz", + "integrity": "sha512-9miFgM2OFba7hB+pRgvtV84pYTBaoTHohvmIgiRt6dRIzbwEOIaNaP+dIlGs2fNFoB0SeISs0Jz5WFVRid6Xyg==", "dev": true, "funding": [ "https://github.com/sponsors/sxzz", @@ -4911,9 +4950,9 @@ } }, "node_modules/postcss-selector-parser": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-7.1.1.tgz", - "integrity": "sha512-orRsuYpJVw8LdAwqqLykBj9ecS5/cRHlI5+nvTo8LcCKmzDmqVORXtOIYEEQuL9D4BxtA1lm5isAqzQZCoQ6Eg==", + "version": "7.1.4", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-7.1.4.tgz", + "integrity": "sha512-HeP7D2wyhkR+XaK6v4W8oRF62Dsz4flyuczALJp61GckGm42u1saSSJ/0auvcBqxs3jMRFEcPK34At/0JBKdOg==", "dev": true, "license": "MIT", "dependencies": { @@ -5024,6 +5063,16 @@ "url": "https://paulmillr.com/funding/" } }, + "node_modules/regexp-tree": { + "version": "0.1.27", + "resolved": "https://registry.npmjs.org/regexp-tree/-/regexp-tree-0.1.27.tgz", + "integrity": "sha512-iETxpjK6YoRWJG5o6hXLwvjYAoW+FEZn9os0PD/b6AP6xQwsa/Y7lCVgIixBbUPMfhu+i2LtdeAqVTgGlQarfA==", + "dev": true, + "license": "MIT", + "bin": { + "regexp-tree": "bin/regexp-tree" + } + }, "node_modules/resolve-from": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", @@ -5127,6 +5176,16 @@ "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", "license": "MIT" }, + "node_modules/safe-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-2.1.1.tgz", + "integrity": "sha512-rx+x8AMzKb5Q5lQ95Zoi6ZbJqwCLkqi3XuJXp5P3rT8OEc6sZCJG5AE5dU3lsgRr/F4Bs31jSlVN+j5KrsGu9A==", + "dev": true, + "license": "MIT", + "dependencies": { + "regexp-tree": "~0.1.1" + } + }, "node_modules/safer-buffer": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", @@ -5148,9 +5207,9 @@ } }, "node_modules/semver": { - "version": "7.8.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.2.tgz", - "integrity": "sha512-c8jsqUZm3omBOI66G90z1Dyw5z622G8oLG+omfsHBJf3CWQTlOcwOjvOG6wtiNfW6anKm/eA39LMwMtMez2TiQ==", + "version": "7.8.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.4.tgz", + "integrity": "sha512-rUCObTnP32Q08R2uuIrt7r9PlEonuTmtuXYcW6s5kjdlj3xbnwe+21yXptAUYcMAABLkYYTtnmzb3w3EDZfueA==", "dev": true, "license": "ISC", "bin": { @@ -5573,16 +5632,16 @@ } }, "node_modules/typescript-eslint": { - "version": "8.60.1", - "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.60.1.tgz", - "integrity": "sha512-6m5hkkRAp8lKvhVpcprAIn5KkehQEh+47oHH2VGnExEh7dhNxXlg6GPAOIu6TxbVQxhebrJDvjl3020ooiWCMA==", + "version": "8.61.0", + "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.61.0.tgz", + "integrity": "sha512-8y31Rd0eGTrDKqhy6vT0HtzhN+YLjQizwX3aA3hPXP/ynSfnrBXcQY5IzsP9/DM7+klX4IUncZZjkchP0z+rUw==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/eslint-plugin": "8.60.1", - "@typescript-eslint/parser": "8.60.1", - "@typescript-eslint/typescript-estree": "8.60.1", - "@typescript-eslint/utils": "8.60.1" + "@typescript-eslint/eslint-plugin": "8.61.0", + "@typescript-eslint/parser": "8.61.0", + "@typescript-eslint/typescript-estree": "8.61.0", + "@typescript-eslint/utils": "8.61.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -5934,16 +5993,16 @@ "license": "MIT" }, "node_modules/vue": { - "version": "3.5.35", - "resolved": "https://registry.npmjs.org/vue/-/vue-3.5.35.tgz", - "integrity": "sha512-cx89fnr+0kVGHiNFG6y6s0bdjypJRFNZn6x3WPstNdQR1bi1mbB7h4v5IBGTsPJU3nK1+0Iqj3Zf+hZWMieR4Q==", + "version": "3.5.38", + "resolved": "https://registry.npmjs.org/vue/-/vue-3.5.38.tgz", + "integrity": "sha512-vAMKHfImQlYSy0C+PBue4s3ERZ2xGKfgZg5GXAsLInq1dyh2H78ILVP5sK0KPFPVW4kv+OGCIvBEondcjpZp7A==", "license": "MIT", "dependencies": { - "@vue/compiler-dom": "3.5.35", - "@vue/compiler-sfc": "3.5.35", - "@vue/runtime-dom": "3.5.35", - "@vue/server-renderer": "3.5.35", - "@vue/shared": "3.5.35" + "@vue/compiler-dom": "3.5.38", + "@vue/compiler-sfc": "3.5.38", + "@vue/runtime-dom": "3.5.38", + "@vue/server-renderer": "3.5.38", + "@vue/shared": "3.5.38" }, "peerDependencies": { "typescript": "*" diff --git a/frontend/package.json b/frontend/package.json index 5aed41b89e..1d04f8533d 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -50,10 +50,12 @@ "@intlify/eslint-plugin-vue-i18n": "^4.4.0", "@intlify/unplugin-vue-i18n": "^11.2.3", "@playwright/test": "^1.54.1", + "@types/eslint-plugin-security": "^3.0.1", "@types/node": "^24.1.0", "@vitejs/plugin-vue": "^5.0.4", "deepl-node": "^1.16.0", "eslint": "^10.4.0", + "eslint-plugin-security": "^4.0.0", "eslint-plugin-vue": "^10.9.1", "fs-extra": "^11.3.0", "globals": "^17.6.0", diff --git a/frontend/public/index.html b/frontend/public/index.html index 4fc9555ed5..e6087d618f 100644 --- a/frontend/public/index.html +++ b/frontend/public/index.html @@ -20,6 +20,7 @@ + @@ -51,6 +52,12 @@ + +
+