mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-12-05 14:39:23 -05:00
fix(webdav): trim the Tika thumbnail preset once in Sanitize
The check trimmed the preset but the URL took it untrimmed, so " thumbnail" started fine and then answered 404 for /unpack/preset/%20thumbnail. Sanitize trims it now and Validate only compares against "". The tests build their Tika through a helper that sets the default preset.
This commit is contained in:
1 parent
17a9874be2
commit
0ac1ea8e30
5 files changed
+38
-13
No files matched your search
@@ -2,7 +2,6 @@ package parser
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"strings"
|
||||
|
||||
occfg "github.com/opencloud-eu/opencloud/pkg/config"
|
||||
"github.com/opencloud-eu/opencloud/services/webdav/pkg/config"
|
||||
@@ -34,7 +33,7 @@ func ParseConfig(cfg *config.Config) error {
|
||||
}
|
||||
|
||||
func Validate(cfg *config.Config) error {
|
||||
if strings.TrimSpace(cfg.TikaThumbnailPreset) == "" {
|
||||
if cfg.TikaThumbnailPreset == "" {
|
||||
return errors.New("OC_TIKA_THUMBNAIL_PRESET must not be empty")
|
||||
}
|
||||
return nil
|
||||
|
||||
Reference in new issue
Block a user