mirror of
https://github.com/photoprism/photoprism.git
synced 2025-12-12 00:34:13 +01:00
API: Improve path and filename parameter sanitation #1814
This commit is contained in:
@@ -14,7 +14,7 @@ import (
|
||||
"github.com/photoprism/photoprism/internal/photoprism"
|
||||
"github.com/photoprism/photoprism/internal/service"
|
||||
"github.com/photoprism/photoprism/pkg/fs"
|
||||
"github.com/photoprism/photoprism/pkg/txt"
|
||||
"github.com/photoprism/photoprism/pkg/sanitize"
|
||||
)
|
||||
|
||||
// IndexCommand registers the index cli command.
|
||||
@@ -57,9 +57,9 @@ func indexAction(ctx *cli.Context) error {
|
||||
subPath := strings.TrimSpace(ctx.Args().First())
|
||||
|
||||
if subPath == "" {
|
||||
log.Infof("indexing originals in %s", txt.LogParam(conf.OriginalsPath()))
|
||||
log.Infof("indexing originals in %s", sanitize.Log(conf.OriginalsPath()))
|
||||
} else {
|
||||
log.Infof("indexing originals in %s", txt.LogParam(filepath.Join(conf.OriginalsPath(), subPath)))
|
||||
log.Infof("indexing originals in %s", sanitize.Log(filepath.Join(conf.OriginalsPath(), subPath)))
|
||||
}
|
||||
|
||||
if conf.ReadOnly() {
|
||||
|
||||
Reference in New Issue
Block a user