mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2025-12-17 18:14:42 -06:00
* enhancement: allow ocis to provide custom web applications * enhancement: add an option to disable web apps * test: add default logger tests * test: add app loading tests * test: add asset server tests * enhancement: make use of dedicated app conf file and app asset paths * enhancement: adjust asset locations and deprecate WEB_ASSET_PATH * enhancement: get rid of default logger and use the service level logger instead * Apply suggestions from code review Co-authored-by: Benedikt Kulmann <benedikt@kulmann.biz> Co-authored-by: kobergj <juliankoberg@googlemail.com> * enhancement: use basename as app id * Apply suggestions from code review Co-authored-by: Martin <github@diemattels.at> * enhancement: use afero as fs abstraction * enhancement: simplify logo upload * enhancement: make use of introductionVersion field annotations --------- Co-authored-by: Benedikt Kulmann <benedikt@kulmann.biz> Co-authored-by: kobergj <juliankoberg@googlemail.com> Co-authored-by: Martin <github@diemattels.at>
13 lines
376 B
Go
13 lines
376 B
Go
package filepathx
|
|
|
|
import (
|
|
"path/filepath"
|
|
)
|
|
|
|
// JailJoin joins any number of path elements into a single path,
|
|
// it protects against directory traversal by removing any "../" elements
|
|
// and ensuring that the path is always under the jail.
|
|
func JailJoin(jail string, elem ...string) string {
|
|
return filepath.Join(jail, filepath.Join(append([]string{"/"}, elem...)...))
|
|
}
|