Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a430eb2e60 | ||
|
|
c232d41f90 | ||
|
|
c1e4fd648b | ||
|
|
d5b39a14fd | ||
|
|
e2e1e49130 | ||
|
|
b0f92dd2d7 | ||
|
|
21b0827808 | ||
|
|
d6d84e2b48 | ||
|
|
ca86f91621 | ||
|
|
4bfbf33249 | ||
|
|
f19943a42e | ||
|
|
e74c958862 | ||
|
|
221451a517 | ||
|
|
f46641b038 | ||
|
|
23bd8f6715 | ||
|
|
506fc08577 | ||
|
|
f33076462a | ||
|
|
6c29fabdc8 | ||
|
|
0268506f80 | ||
|
|
ad864a97e9 | ||
|
|
f714e71a35 | ||
|
|
dbdbbab4d7 | ||
|
|
7c0c7820ef | ||
|
|
2741616473 |
No files matched your search
@@ -2,6 +2,60 @@
|
|||||||
|
|
||||||
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
||||||
|
|
||||||
|
### [2.33.9](https://github.com/filebrowser/filebrowser/compare/v2.33.8...v2.33.9) (2025-06-26)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* check exact match on command allow list ([e2e1e49](https://github.com/filebrowser/filebrowser/commit/e2e1e4913085cca8917e0f69171dc28d3c6af1b6))
|
||||||
|
* remove auth token from /api/command ([d5b39a1](https://github.com/filebrowser/filebrowser/commit/d5b39a14fd3fc0d1c364116b41289484df7c27b2))
|
||||||
|
* remove unused import ([c232d41](https://github.com/filebrowser/filebrowser/commit/c232d41f903d3026ec290bbe819b6c59a933048e))
|
||||||
|
|
||||||
|
### [2.33.8](https://github.com/filebrowser/filebrowser/compare/v2.33.7...v2.33.8) (2025-06-25)
|
||||||
|
|
||||||
|
### [2.33.7](https://github.com/filebrowser/filebrowser/compare/v2.33.6...v2.33.7) (2025-06-25)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* correctly parse negative boolean flags ([221451a](https://github.com/filebrowser/filebrowser/commit/221451a5179c8f139819a315b80d0ecb0e7220c3))
|
||||||
|
* linting issues ([4bfbf33](https://github.com/filebrowser/filebrowser/commit/4bfbf332499fc8aea5f6df6aae1efa0de918d1ae))
|
||||||
|
* linting issues ([e74c958](https://github.com/filebrowser/filebrowser/commit/e74c95886226c0ee429af1860eed21dd1f8601aa))
|
||||||
|
|
||||||
|
### [2.33.6](https://github.com/filebrowser/filebrowser/compare/v2.33.5...v2.33.6) (2025-06-24)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* remove incorrect default for password flag ([23bd8f6](https://github.com/filebrowser/filebrowser/commit/23bd8f67155081d707d4799393d3b1e2bebeaa34))
|
||||||
|
|
||||||
|
### [2.33.5](https://github.com/filebrowser/filebrowser/compare/v2.33.4...v2.33.5) (2025-06-24)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* update languages for project File Browser ([#5190](https://github.com/filebrowser/filebrowser/issues/5190)) ([f330764](https://github.com/filebrowser/filebrowser/commit/f33076462a133935ca97fb6c7345303fe350e167))
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* actually register the czech language ([#5189](https://github.com/filebrowser/filebrowser/issues/5189)) ([0268506](https://github.com/filebrowser/filebrowser/commit/0268506f80d33d2d31e38055e12530241d27a11b))
|
||||||
|
|
||||||
|
### [2.33.4](https://github.com/filebrowser/filebrowser/compare/v2.33.3...v2.33.4) (2025-06-22)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* translation updates for project File Browser ([#5179](https://github.com/filebrowser/filebrowser/issues/5179)) ([f714e71](https://github.com/filebrowser/filebrowser/commit/f714e71a356c2301f394d651c9b6c467440508e3))
|
||||||
|
|
||||||
|
### [2.33.3](https://github.com/filebrowser/filebrowser/compare/v2.33.2...v2.33.3) (2025-06-22)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* keep command behavior in Dockerfile ([7c0c782](https://github.com/filebrowser/filebrowser/commit/7c0c7820efbbed2f0499353cc76ecb85d00ff7c3))
|
||||||
|
* update search hotkey in help prompt ([#5178](https://github.com/filebrowser/filebrowser/issues/5178)) ([2741616](https://github.com/filebrowser/filebrowser/commit/2741616473636d40b7e9f14c9906ada08d328c3c))
|
||||||
|
|
||||||
### [2.33.2](https://github.com/filebrowser/filebrowser/compare/v2.33.1...v2.33.2) (2025-06-21)
|
### [2.33.2](https://github.com/filebrowser/filebrowser/compare/v2.33.1...v2.33.2) (2025-06-21)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+1
-2
@@ -29,5 +29,4 @@ VOLUME /srv /config /database
|
|||||||
|
|
||||||
EXPOSE 80
|
EXPOSE 80
|
||||||
|
|
||||||
ENTRYPOINT [ "tini", "--", "/init.sh" ]
|
ENTRYPOINT [ "tini", "--", "/init.sh", "filebrowser", "--config", "/config/settings.json" ]
|
||||||
CMD [ "filebrowser", "--config", "/config/settings.json" ]
|
|
||||||
@@ -38,6 +38,9 @@ File Browser is a **create-your-own-cloud-kind** of software where you can insta
|
|||||||
| :----------------------: | :----------------------: | :----------------------: |
|
| :----------------------: | :----------------------: | :----------------------: |
|
||||||
|  |  |  |
|
|  |  |  |
|
||||||
|
|
||||||
|
> [!CAUTION]
|
||||||
|
>
|
||||||
|
> The **command execution** functionality has been disabled for all existent and new installations by default from version v2.33.8 and onwards, due to continuous and known security vulnerabilities. You should only use this feature if you are aware of all of the security risks involved. For more up to date information, consult issue [#5199](https://github.com/filebrowser/filebrowser/issues/5199).
|
||||||
|
|
||||||
## Install
|
## Install
|
||||||
|
|
||||||
|
|||||||
+67
-30
@@ -48,7 +48,7 @@ func init() {
|
|||||||
persistent.StringP("database", "d", "./filebrowser.db", "database path")
|
persistent.StringP("database", "d", "./filebrowser.db", "database path")
|
||||||
flags.Bool("noauth", false, "use the noauth auther when using quick setup")
|
flags.Bool("noauth", false, "use the noauth auther when using quick setup")
|
||||||
flags.String("username", "admin", "username for the first user when using quick config")
|
flags.String("username", "admin", "username for the first user when using quick config")
|
||||||
flags.String("password", "", "hashed password for the first user when using quick config (default \"admin\")")
|
flags.String("password", "", "hashed password for the first user when using quick config")
|
||||||
|
|
||||||
addServerFlags(flags)
|
addServerFlags(flags)
|
||||||
}
|
}
|
||||||
@@ -68,7 +68,7 @@ func addServerFlags(flags *pflag.FlagSet) {
|
|||||||
flags.Int("img-processors", 4, "image processors count") //nolint:gomnd
|
flags.Int("img-processors", 4, "image processors count") //nolint:gomnd
|
||||||
flags.Bool("disable-thumbnails", false, "disable image thumbnails")
|
flags.Bool("disable-thumbnails", false, "disable image thumbnails")
|
||||||
flags.Bool("disable-preview-resize", false, "disable resize of image previews")
|
flags.Bool("disable-preview-resize", false, "disable resize of image previews")
|
||||||
flags.Bool("disable-exec", false, "disables Command Runner feature")
|
flags.Bool("disable-exec", true, "disables Command Runner feature")
|
||||||
flags.Bool("disable-type-detection-by-header", false, "disables type detection by reading file headers")
|
flags.Bool("disable-type-detection-by-header", false, "disables type detection by reading file headers")
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -201,42 +201,42 @@ func getRunParams(flags *pflag.FlagSet, st *storage.Storage) *settings.Server {
|
|||||||
server, err := st.Settings.GetServer()
|
server, err := st.Settings.GetServer()
|
||||||
checkErr(err)
|
checkErr(err)
|
||||||
|
|
||||||
if val, set := getParamB(flags, "root"); set {
|
if val, set := getStringParamB(flags, "root"); set {
|
||||||
server.Root = val
|
server.Root = val
|
||||||
}
|
}
|
||||||
|
|
||||||
if val, set := getParamB(flags, "baseurl"); set {
|
if val, set := getStringParamB(flags, "baseurl"); set {
|
||||||
server.BaseURL = val
|
server.BaseURL = val
|
||||||
}
|
}
|
||||||
|
|
||||||
if val, set := getParamB(flags, "log"); set {
|
if val, set := getStringParamB(flags, "log"); set {
|
||||||
server.Log = val
|
server.Log = val
|
||||||
}
|
}
|
||||||
|
|
||||||
isSocketSet := false
|
isSocketSet := false
|
||||||
isAddrSet := false
|
isAddrSet := false
|
||||||
|
|
||||||
if val, set := getParamB(flags, "address"); set {
|
if val, set := getStringParamB(flags, "address"); set {
|
||||||
server.Address = val
|
server.Address = val
|
||||||
isAddrSet = isAddrSet || set
|
isAddrSet = isAddrSet || set
|
||||||
}
|
}
|
||||||
|
|
||||||
if val, set := getParamB(flags, "port"); set {
|
if val, set := getStringParamB(flags, "port"); set {
|
||||||
server.Port = val
|
server.Port = val
|
||||||
isAddrSet = isAddrSet || set
|
isAddrSet = isAddrSet || set
|
||||||
}
|
}
|
||||||
|
|
||||||
if val, set := getParamB(flags, "key"); set {
|
if val, set := getStringParamB(flags, "key"); set {
|
||||||
server.TLSKey = val
|
server.TLSKey = val
|
||||||
isAddrSet = isAddrSet || set
|
isAddrSet = isAddrSet || set
|
||||||
}
|
}
|
||||||
|
|
||||||
if val, set := getParamB(flags, "cert"); set {
|
if val, set := getStringParamB(flags, "cert"); set {
|
||||||
server.TLSCert = val
|
server.TLSCert = val
|
||||||
isAddrSet = isAddrSet || set
|
isAddrSet = isAddrSet || set
|
||||||
}
|
}
|
||||||
|
|
||||||
if val, set := getParamB(flags, "socket"); set {
|
if val, set := getStringParamB(flags, "socket"); set {
|
||||||
server.Socket = val
|
server.Socket = val
|
||||||
isSocketSet = isSocketSet || set
|
isSocketSet = isSocketSet || set
|
||||||
}
|
}
|
||||||
@@ -250,33 +250,69 @@ func getRunParams(flags *pflag.FlagSet, st *storage.Storage) *settings.Server {
|
|||||||
server.Socket = ""
|
server.Socket = ""
|
||||||
}
|
}
|
||||||
|
|
||||||
_, disableThumbnails := getParamB(flags, "disable-thumbnails")
|
disableThumbnails := getBoolParam(flags, "disable-thumbnails")
|
||||||
server.EnableThumbnails = !disableThumbnails
|
server.EnableThumbnails = !disableThumbnails
|
||||||
|
|
||||||
_, disablePreviewResize := getParamB(flags, "disable-preview-resize")
|
disablePreviewResize := getBoolParam(flags, "disable-preview-resize")
|
||||||
server.ResizePreview = !disablePreviewResize
|
server.ResizePreview = !disablePreviewResize
|
||||||
|
|
||||||
_, disableTypeDetectionByHeader := getParamB(flags, "disable-type-detection-by-header")
|
disableTypeDetectionByHeader := getBoolParam(flags, "disable-type-detection-by-header")
|
||||||
server.TypeDetectionByHeader = !disableTypeDetectionByHeader
|
server.TypeDetectionByHeader = !disableTypeDetectionByHeader
|
||||||
|
|
||||||
_, disableExec := getParamB(flags, "disable-exec")
|
disableExec := getBoolParam(flags, "disable-exec")
|
||||||
server.EnableExec = !disableExec
|
server.EnableExec = !disableExec
|
||||||
|
|
||||||
if val, set := getParamB(flags, "token-expiration-time"); set {
|
if server.EnableExec {
|
||||||
|
log.Println("WARNING: Command Runner feature enabled!")
|
||||||
|
log.Println("WARNING: This feature has known security vulnerabilities and should not")
|
||||||
|
log.Println("WARNING: you fully understand the risks involved. For more information")
|
||||||
|
log.Println("WARNING: read https://github.com/filebrowser/filebrowser/issues/5199")
|
||||||
|
}
|
||||||
|
|
||||||
|
if val, set := getStringParamB(flags, "token-expiration-time"); set {
|
||||||
server.TokenExpirationTime = val
|
server.TokenExpirationTime = val
|
||||||
}
|
}
|
||||||
|
|
||||||
return server
|
return server
|
||||||
}
|
}
|
||||||
|
|
||||||
// getParamB returns a parameter as a string and a boolean to tell if it is different from the default
|
// getBoolParamB returns a parameter as a string and a boolean to tell if it is different from the default
|
||||||
//
|
//
|
||||||
// NOTE: we could simply bind the flags to viper and use IsSet.
|
// NOTE: we could simply bind the flags to viper and use IsSet.
|
||||||
// Although there is a bug on Viper that always returns true on IsSet
|
// Although there is a bug on Viper that always returns true on IsSet
|
||||||
// if a flag is binded. Our alternative way is to manually check
|
// if a flag is binded. Our alternative way is to manually check
|
||||||
// the flag and then the value from env/config/gotten by viper.
|
// the flag and then the value from env/config/gotten by viper.
|
||||||
// https://github.com/spf13/viper/pull/331
|
// https://github.com/spf13/viper/pull/331
|
||||||
func getParamB(flags *pflag.FlagSet, key string) (string, bool) {
|
func getBoolParamB(flags *pflag.FlagSet, key string) (value, ok bool) {
|
||||||
|
value, _ = flags.GetBool(key)
|
||||||
|
|
||||||
|
// If set on Flags, use it.
|
||||||
|
if flags.Changed(key) {
|
||||||
|
return value, true
|
||||||
|
}
|
||||||
|
|
||||||
|
// If set through viper (env, config), return it.
|
||||||
|
if v.IsSet(key) {
|
||||||
|
return v.GetBool(key), true
|
||||||
|
}
|
||||||
|
|
||||||
|
// Otherwise use default value on flags.
|
||||||
|
return value, false
|
||||||
|
}
|
||||||
|
|
||||||
|
func getBoolParam(flags *pflag.FlagSet, key string) bool {
|
||||||
|
val, _ := getBoolParamB(flags, key)
|
||||||
|
return val
|
||||||
|
}
|
||||||
|
|
||||||
|
// getStringParamB returns a parameter as a string and a boolean to tell if it is different from the default
|
||||||
|
//
|
||||||
|
// NOTE: we could simply bind the flags to viper and use IsSet.
|
||||||
|
// Although there is a bug on Viper that always returns true on IsSet
|
||||||
|
// if a flag is binded. Our alternative way is to manually check
|
||||||
|
// the flag and then the value from env/config/gotten by viper.
|
||||||
|
// https://github.com/spf13/viper/pull/331
|
||||||
|
func getStringParamB(flags *pflag.FlagSet, key string) (string, bool) {
|
||||||
value, _ := flags.GetString(key)
|
value, _ := flags.GetString(key)
|
||||||
|
|
||||||
// If set on Flags, use it.
|
// If set on Flags, use it.
|
||||||
@@ -293,8 +329,8 @@ func getParamB(flags *pflag.FlagSet, key string) (string, bool) {
|
|||||||
return value, false
|
return value, false
|
||||||
}
|
}
|
||||||
|
|
||||||
func getParam(flags *pflag.FlagSet, key string) string {
|
func getStringParam(flags *pflag.FlagSet, key string) string {
|
||||||
val, _ := getParamB(flags, key)
|
val, _ := getStringParamB(flags, key)
|
||||||
return val
|
return val
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -349,7 +385,7 @@ func quickSetup(flags *pflag.FlagSet, d pythonData) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
var err error
|
var err error
|
||||||
if _, noauth := getParamB(flags, "noauth"); noauth {
|
if _, noauth := getStringParamB(flags, "noauth"); noauth {
|
||||||
set.AuthMethod = auth.MethodNoAuth
|
set.AuthMethod = auth.MethodNoAuth
|
||||||
err = d.store.Auth.Save(&auth.NoAuth{})
|
err = d.store.Auth.Save(&auth.NoAuth{})
|
||||||
} else {
|
} else {
|
||||||
@@ -362,27 +398,27 @@ func quickSetup(flags *pflag.FlagSet, d pythonData) {
|
|||||||
checkErr(err)
|
checkErr(err)
|
||||||
|
|
||||||
ser := &settings.Server{
|
ser := &settings.Server{
|
||||||
BaseURL: getParam(flags, "baseurl"),
|
BaseURL: getStringParam(flags, "baseurl"),
|
||||||
Port: getParam(flags, "port"),
|
Port: getStringParam(flags, "port"),
|
||||||
Log: getParam(flags, "log"),
|
Log: getStringParam(flags, "log"),
|
||||||
TLSKey: getParam(flags, "key"),
|
TLSKey: getStringParam(flags, "key"),
|
||||||
TLSCert: getParam(flags, "cert"),
|
TLSCert: getStringParam(flags, "cert"),
|
||||||
Address: getParam(flags, "address"),
|
Address: getStringParam(flags, "address"),
|
||||||
Root: getParam(flags, "root"),
|
Root: getStringParam(flags, "root"),
|
||||||
}
|
}
|
||||||
|
|
||||||
err = d.store.Settings.SaveServer(ser)
|
err = d.store.Settings.SaveServer(ser)
|
||||||
checkErr(err)
|
checkErr(err)
|
||||||
|
|
||||||
username := getParam(flags, "username")
|
username := getStringParam(flags, "username")
|
||||||
password := getParam(flags, "password")
|
password := getStringParam(flags, "password")
|
||||||
|
|
||||||
if password == "" {
|
if password == "" {
|
||||||
var pwd string
|
var pwd string
|
||||||
pwd, err = users.RandomPwd()
|
pwd, err = users.RandomPwd()
|
||||||
checkErr(err)
|
checkErr(err)
|
||||||
|
|
||||||
log.Println("Generated random admin password for quick setup:", pwd)
|
log.Println("Randomly generated password for user 'admin':", pwd)
|
||||||
|
|
||||||
password, err = users.HashPwd(pwd)
|
password, err = users.HashPwd(pwd)
|
||||||
checkErr(err)
|
checkErr(err)
|
||||||
@@ -420,6 +456,7 @@ func initConfig() {
|
|||||||
v.SetEnvPrefix("FB")
|
v.SetEnvPrefix("FB")
|
||||||
v.AutomaticEnv()
|
v.AutomaticEnv()
|
||||||
v.SetEnvKeyReplacer(strings.NewReplacer(".", "_"))
|
v.SetEnvKeyReplacer(strings.NewReplacer(".", "_"))
|
||||||
|
v.SetEnvKeyReplacer(strings.NewReplacer("-", "_"))
|
||||||
|
|
||||||
if err := v.ReadInConfig(); err != nil {
|
if err := v.ReadInConfig(); err != nil {
|
||||||
var configParseError v.ConfigParseError
|
var configParseError v.ConfigParseError
|
||||||
|
|||||||
+1
-1
@@ -25,7 +25,7 @@ this version.`,
|
|||||||
flags := cmd.Flags()
|
flags := cmd.Flags()
|
||||||
oldDB := mustGetString(flags, "old.database")
|
oldDB := mustGetString(flags, "old.database")
|
||||||
oldConf := mustGetString(flags, "old.config")
|
oldConf := mustGetString(flags, "old.config")
|
||||||
err := importer.Import(oldDB, oldConf, getParam(flags, "database"))
|
err := importer.Import(oldDB, oldConf, getStringParam(flags, "database"))
|
||||||
checkErr(err)
|
checkErr(err)
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
+3
-2
@@ -14,6 +14,7 @@ import (
|
|||||||
"github.com/spf13/pflag"
|
"github.com/spf13/pflag"
|
||||||
yaml "gopkg.in/yaml.v2"
|
yaml "gopkg.in/yaml.v2"
|
||||||
|
|
||||||
|
"github.com/filebrowser/filebrowser/v2/files"
|
||||||
"github.com/filebrowser/filebrowser/v2/settings"
|
"github.com/filebrowser/filebrowser/v2/settings"
|
||||||
"github.com/filebrowser/filebrowser/v2/storage"
|
"github.com/filebrowser/filebrowser/v2/storage"
|
||||||
"github.com/filebrowser/filebrowser/v2/storage/bolt"
|
"github.com/filebrowser/filebrowser/v2/storage/bolt"
|
||||||
@@ -86,7 +87,7 @@ func python(fn pythonFunc, cfg pythonConfig) cobraFunc {
|
|||||||
return func(cmd *cobra.Command, args []string) {
|
return func(cmd *cobra.Command, args []string) {
|
||||||
data := pythonData{hadDB: true}
|
data := pythonData{hadDB: true}
|
||||||
|
|
||||||
path := getParam(cmd.Flags(), "database")
|
path := getStringParam(cmd.Flags(), "database")
|
||||||
absPath, err := filepath.Abs(path)
|
absPath, err := filepath.Abs(path)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
panic(err)
|
panic(err)
|
||||||
@@ -105,7 +106,7 @@ func python(fn pythonFunc, cfg pythonConfig) cobraFunc {
|
|||||||
|
|
||||||
log.Println("Using database: " + absPath)
|
log.Println("Using database: " + absPath)
|
||||||
data.hadDB = exists
|
data.hadDB = exists
|
||||||
db, err := storm.Open(path)
|
db, err := storm.Open(path, storm.BoltOptions(files.PermFile, nil))
|
||||||
checkErr(err)
|
checkErr(err)
|
||||||
defer db.Close()
|
defer db.Close()
|
||||||
data.store, err = bolt.NewStorage(db)
|
data.store, err = bolt.NewStorage(db)
|
||||||
|
|||||||
+2
-2
@@ -27,8 +27,8 @@ import (
|
|||||||
"github.com/filebrowser/filebrowser/v2/rules"
|
"github.com/filebrowser/filebrowser/v2/rules"
|
||||||
)
|
)
|
||||||
|
|
||||||
const PermFile = 0644
|
const PermFile = 0640
|
||||||
const PermDir = 0755
|
const PermDir = 0750
|
||||||
|
|
||||||
var (
|
var (
|
||||||
reSubDirs = regexp.MustCompile("(?i)^sub(s|titles)$")
|
reSubDirs = regexp.MustCompile("(?i)^sub(s|titles)$")
|
||||||
|
|||||||
@@ -24,6 +24,7 @@
|
|||||||
"ace-builds": "^1.37.5",
|
"ace-builds": "^1.37.5",
|
||||||
"core-js": "^3.40.0",
|
"core-js": "^3.40.0",
|
||||||
"dayjs": "^1.11.10",
|
"dayjs": "^1.11.10",
|
||||||
|
"dompurify": "^3.2.6",
|
||||||
"epubjs": "^0.3.93",
|
"epubjs": "^0.3.93",
|
||||||
"filesize": "^10.1.1",
|
"filesize": "^10.1.1",
|
||||||
"js-base64": "^3.7.7",
|
"js-base64": "^3.7.7",
|
||||||
|
|||||||
Generated
+23
-7
@@ -26,6 +26,9 @@ importers:
|
|||||||
dayjs:
|
dayjs:
|
||||||
specifier: ^1.11.10
|
specifier: ^1.11.10
|
||||||
version: 1.11.13
|
version: 1.11.13
|
||||||
|
dompurify:
|
||||||
|
specifier: ^3.2.6
|
||||||
|
version: 3.2.6
|
||||||
epubjs:
|
epubjs:
|
||||||
specifier: ^0.3.93
|
specifier: ^0.3.93
|
||||||
version: 0.3.93
|
version: 0.3.93
|
||||||
@@ -946,8 +949,8 @@ packages:
|
|||||||
resolution: {integrity: sha512-dF2iMMy8P9uKVHV/20LA1ulFLL+MKSbfMiixSmn6fpwqzvix38OIc7ebgnFbBqElvghZCW9ACtzKTGKsTGTWGA==}
|
resolution: {integrity: sha512-dF2iMMy8P9uKVHV/20LA1ulFLL+MKSbfMiixSmn6fpwqzvix38OIc7ebgnFbBqElvghZCW9ACtzKTGKsTGTWGA==}
|
||||||
engines: {node: '>= 16'}
|
engines: {node: '>= 16'}
|
||||||
|
|
||||||
'@intlify/shared@11.1.3':
|
'@intlify/shared@11.1.7':
|
||||||
resolution: {integrity: sha512-pTFBgqa/99JRA2H1qfyqv97MKWJrYngXBA/I0elZcYxvJgcCw3mApAoPW3mJ7vx3j+Ti0FyKUFZ4hWxdjKaxvA==}
|
resolution: {integrity: sha512-4yZeMt2Aa/7n5Ehy4KalUlvt3iRLcg1tq9IBVfOgkyWFArN4oygn6WxgGIFibP3svpaH8DarbNaottq+p0gUZQ==}
|
||||||
engines: {node: '>= 16'}
|
engines: {node: '>= 16'}
|
||||||
|
|
||||||
'@intlify/shared@12.0.0-alpha.2':
|
'@intlify/shared@12.0.0-alpha.2':
|
||||||
@@ -1174,6 +1177,9 @@ packages:
|
|||||||
'@types/node@22.10.10':
|
'@types/node@22.10.10':
|
||||||
resolution: {integrity: sha512-X47y/mPNzxviAGY5TcYPtYL8JsY3kAq2n8fMmKoRCxq/c4v4pyGNCzM2R6+M5/umG4ZfHuT+sgqDYqWc9rJ6ww==}
|
resolution: {integrity: sha512-X47y/mPNzxviAGY5TcYPtYL8JsY3kAq2n8fMmKoRCxq/c4v4pyGNCzM2R6+M5/umG4ZfHuT+sgqDYqWc9rJ6ww==}
|
||||||
|
|
||||||
|
'@types/trusted-types@2.0.7':
|
||||||
|
resolution: {integrity: sha512-ScaPdn1dQczgbl0QFTeTOmVHFULt394XJgOQNoyVhZ6r2vLnMLJfBPd53SB52T/3G36VI1/g2MZaX0cwDuXsfw==}
|
||||||
|
|
||||||
'@types/web-bluetooth@0.0.20':
|
'@types/web-bluetooth@0.0.20':
|
||||||
resolution: {integrity: sha512-g9gZnnXVq7gM7v3tJCWV/qw7w+KeOlSHAhgF9RytFyifW6AF61hdT2ucrYhPq9hLs5JIryeupHV3qGk95dH9ow==}
|
resolution: {integrity: sha512-g9gZnnXVq7gM7v3tJCWV/qw7w+KeOlSHAhgF9RytFyifW6AF61hdT2ucrYhPq9hLs5JIryeupHV3qGk95dH9ow==}
|
||||||
|
|
||||||
@@ -1602,6 +1608,9 @@ packages:
|
|||||||
dom-walk@0.1.2:
|
dom-walk@0.1.2:
|
||||||
resolution: {integrity: sha512-6QvTW9mrGeIegrFXdtQi9pk7O/nSK6lSdXW2eqUspN5LWD7UTji2Fqw5V2YLjBpHEoU9Xl/eUWNpDeZvoyOv2w==}
|
resolution: {integrity: sha512-6QvTW9mrGeIegrFXdtQi9pk7O/nSK6lSdXW2eqUspN5LWD7UTji2Fqw5V2YLjBpHEoU9Xl/eUWNpDeZvoyOv2w==}
|
||||||
|
|
||||||
|
dompurify@3.2.6:
|
||||||
|
resolution: {integrity: sha512-/2GogDQlohXPZe6D6NOgQvXLPSYBqIWMnZ8zzOhn09REE4eyAzb+Hed3jhoM9OkuaJ8P6ZGTTVWQKAi8ieIzfQ==}
|
||||||
|
|
||||||
electron-to-chromium@1.5.67:
|
electron-to-chromium@1.5.67:
|
||||||
resolution: {integrity: sha512-nz88NNBsD7kQSAGGJyp8hS6xSPtWwqNogA0mjtc2nUYeEf3nURK9qpV18TuBdDmEDgVWotS8Wkzf+V52dSQ/LQ==}
|
resolution: {integrity: sha512-nz88NNBsD7kQSAGGJyp8hS6xSPtWwqNogA0mjtc2nUYeEf3nURK9qpV18TuBdDmEDgVWotS8Wkzf+V52dSQ/LQ==}
|
||||||
|
|
||||||
@@ -3628,7 +3637,7 @@ snapshots:
|
|||||||
|
|
||||||
'@intlify/shared@11.1.2': {}
|
'@intlify/shared@11.1.2': {}
|
||||||
|
|
||||||
'@intlify/shared@11.1.3': {}
|
'@intlify/shared@11.1.7': {}
|
||||||
|
|
||||||
'@intlify/shared@12.0.0-alpha.2': {}
|
'@intlify/shared@12.0.0-alpha.2': {}
|
||||||
|
|
||||||
@@ -3636,8 +3645,8 @@ snapshots:
|
|||||||
dependencies:
|
dependencies:
|
||||||
'@eslint-community/eslint-utils': 4.4.1(eslint@9.19.0)
|
'@eslint-community/eslint-utils': 4.4.1(eslint@9.19.0)
|
||||||
'@intlify/bundle-utils': 10.0.0(vue-i18n@11.1.2(vue@3.5.13(typescript@5.6.3)))
|
'@intlify/bundle-utils': 10.0.0(vue-i18n@11.1.2(vue@3.5.13(typescript@5.6.3)))
|
||||||
'@intlify/shared': 11.1.3
|
'@intlify/shared': 11.1.7
|
||||||
'@intlify/vue-i18n-extensions': 8.0.0(@intlify/shared@11.1.3)(@vue/compiler-dom@3.5.13)(vue-i18n@11.1.2(vue@3.5.13(typescript@5.6.3)))(vue@3.5.13(typescript@5.6.3))
|
'@intlify/vue-i18n-extensions': 8.0.0(@intlify/shared@11.1.7)(@vue/compiler-dom@3.5.13)(vue-i18n@11.1.2(vue@3.5.13(typescript@5.6.3)))(vue@3.5.13(typescript@5.6.3))
|
||||||
'@rollup/pluginutils': 5.1.4(rollup@4.40.1)
|
'@rollup/pluginutils': 5.1.4(rollup@4.40.1)
|
||||||
'@typescript-eslint/scope-manager': 8.21.0
|
'@typescript-eslint/scope-manager': 8.21.0
|
||||||
'@typescript-eslint/typescript-estree': 8.21.0(typescript@5.6.3)
|
'@typescript-eslint/typescript-estree': 8.21.0(typescript@5.6.3)
|
||||||
@@ -3659,11 +3668,11 @@ snapshots:
|
|||||||
- supports-color
|
- supports-color
|
||||||
- typescript
|
- typescript
|
||||||
|
|
||||||
'@intlify/vue-i18n-extensions@8.0.0(@intlify/shared@11.1.3)(@vue/compiler-dom@3.5.13)(vue-i18n@11.1.2(vue@3.5.13(typescript@5.6.3)))(vue@3.5.13(typescript@5.6.3))':
|
'@intlify/vue-i18n-extensions@8.0.0(@intlify/shared@11.1.7)(@vue/compiler-dom@3.5.13)(vue-i18n@11.1.2(vue@3.5.13(typescript@5.6.3)))(vue@3.5.13(typescript@5.6.3))':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@babel/parser': 7.26.7
|
'@babel/parser': 7.26.7
|
||||||
optionalDependencies:
|
optionalDependencies:
|
||||||
'@intlify/shared': 11.1.3
|
'@intlify/shared': 11.1.7
|
||||||
'@vue/compiler-dom': 3.5.13
|
'@vue/compiler-dom': 3.5.13
|
||||||
vue: 3.5.13(typescript@5.6.3)
|
vue: 3.5.13(typescript@5.6.3)
|
||||||
vue-i18n: 11.1.2(vue@3.5.13(typescript@5.6.3))
|
vue-i18n: 11.1.2(vue@3.5.13(typescript@5.6.3))
|
||||||
@@ -3812,6 +3821,9 @@ snapshots:
|
|||||||
dependencies:
|
dependencies:
|
||||||
undici-types: 6.20.0
|
undici-types: 6.20.0
|
||||||
|
|
||||||
|
'@types/trusted-types@2.0.7':
|
||||||
|
optional: true
|
||||||
|
|
||||||
'@types/web-bluetooth@0.0.20': {}
|
'@types/web-bluetooth@0.0.20': {}
|
||||||
|
|
||||||
'@typescript-eslint/eslint-plugin@8.21.0(@typescript-eslint/parser@8.21.0(eslint@9.19.0)(typescript@5.6.3))(eslint@9.19.0)(typescript@5.6.3)':
|
'@typescript-eslint/eslint-plugin@8.21.0(@typescript-eslint/parser@8.21.0(eslint@9.19.0)(typescript@5.6.3))(eslint@9.19.0)(typescript@5.6.3)':
|
||||||
@@ -4282,6 +4294,10 @@ snapshots:
|
|||||||
|
|
||||||
dom-walk@0.1.2: {}
|
dom-walk@0.1.2: {}
|
||||||
|
|
||||||
|
dompurify@3.2.6:
|
||||||
|
optionalDependencies:
|
||||||
|
'@types/trusted-types': 2.0.7
|
||||||
|
|
||||||
electron-to-chromium@1.5.67: {}
|
electron-to-chromium@1.5.67: {}
|
||||||
|
|
||||||
emoji-regex@8.0.0: {}
|
emoji-regex@8.0.0: {}
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
import { removePrefix } from "./utils";
|
|
||||||
import { baseURL } from "@/utils/constants";
|
import { baseURL } from "@/utils/constants";
|
||||||
import { useAuthStore } from "@/stores/auth";
|
import { removePrefix } from "./utils";
|
||||||
|
|
||||||
const ssl = window.location.protocol === "https:";
|
const ssl = window.location.protocol === "https:";
|
||||||
const protocol = ssl ? "wss:" : "ws:";
|
const protocol = ssl ? "wss:" : "ws:";
|
||||||
@@ -11,10 +10,8 @@ export default function command(
|
|||||||
onmessage: WebSocket["onmessage"],
|
onmessage: WebSocket["onmessage"],
|
||||||
onclose: WebSocket["onclose"]
|
onclose: WebSocket["onclose"]
|
||||||
) {
|
) {
|
||||||
const authStore = useAuthStore();
|
|
||||||
|
|
||||||
url = removePrefix(url);
|
url = removePrefix(url);
|
||||||
url = `${protocol}//${window.location.host}${baseURL}/api/command${url}?auth=${authStore.jwt}`;
|
url = `${protocol}//${window.location.host}${baseURL}/api/command${url}`;
|
||||||
|
|
||||||
const conn = new window.WebSocket(url);
|
const conn = new window.WebSocket(url);
|
||||||
conn.onopen = () => conn.send(command);
|
conn.onopen = () => conn.send(command);
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
<li><strong>DEL</strong> - {{ $t("help.del") }}</li>
|
<li><strong>DEL</strong> - {{ $t("help.del") }}</li>
|
||||||
<li><strong>ESC</strong> - {{ $t("help.esc") }}</li>
|
<li><strong>ESC</strong> - {{ $t("help.esc") }}</li>
|
||||||
<li><strong>CTRL + S</strong> - {{ $t("help.ctrl.s") }}</li>
|
<li><strong>CTRL + S</strong> - {{ $t("help.ctrl.s") }}</li>
|
||||||
<li><strong>CTRL + F</strong> - {{ $t("help.ctrl.f") }}</li>
|
<li><strong>CTRL + SHIFT + F</strong> - {{ $t("help.ctrl.f") }}</li>
|
||||||
<li><strong>CTRL + Click</strong> - {{ $t("help.ctrl.click") }}</li>
|
<li><strong>CTRL + Click</strong> - {{ $t("help.ctrl.click") }}</li>
|
||||||
<li><strong>Click</strong> - {{ $t("help.click") }}</li>
|
<li><strong>Click</strong> - {{ $t("help.click") }}</li>
|
||||||
<li><strong>Double click</strong> - {{ $t("help.doubleClick") }}</li>
|
<li><strong>Double click</strong> - {{ $t("help.doubleClick") }}</li>
|
||||||
|
|||||||
@@ -19,6 +19,7 @@ export default {
|
|||||||
hu: "Magyar",
|
hu: "Magyar",
|
||||||
ar: "العربية",
|
ar: "العربية",
|
||||||
ca: "Català",
|
ca: "Català",
|
||||||
|
cs: "Čeština",
|
||||||
de: "Deutsch",
|
de: "Deutsch",
|
||||||
el: "Ελληνικά",
|
el: "Ελληνικά",
|
||||||
en: "English",
|
en: "English",
|
||||||
|
|||||||
@@ -24,6 +24,7 @@
|
|||||||
"ok": "OK",
|
"ok": "OK",
|
||||||
"permalink": "Získat trvalý odkaz",
|
"permalink": "Získat trvalý odkaz",
|
||||||
"previous": "Předchozí",
|
"previous": "Předchozí",
|
||||||
|
"preview": "Preview",
|
||||||
"publish": "Publikovat",
|
"publish": "Publikovat",
|
||||||
"rename": "Přejmenovat",
|
"rename": "Přejmenovat",
|
||||||
"replace": "Nahradit",
|
"replace": "Nahradit",
|
||||||
@@ -3,14 +3,17 @@
|
|||||||
"cancel": "Abbrechen",
|
"cancel": "Abbrechen",
|
||||||
"clear": "Schließen",
|
"clear": "Schließen",
|
||||||
"close": "Schließen",
|
"close": "Schließen",
|
||||||
|
"continue": "Fortfahren",
|
||||||
"copy": "Kopieren",
|
"copy": "Kopieren",
|
||||||
"copyFile": "Kopiere Datei",
|
"copyFile": "Kopiere Datei",
|
||||||
"copyToClipboard": "In Zwischenablage kopieren",
|
"copyToClipboard": "In Zwischenablage kopieren",
|
||||||
|
"copyDownloadLinkToClipboard": "Download-Link in die Zwischenablage kopieren",
|
||||||
"create": "Neu",
|
"create": "Neu",
|
||||||
"delete": "Löschen",
|
"delete": "Löschen",
|
||||||
"download": "Herunterladen",
|
"download": "Herunterladen",
|
||||||
"file": "Datei",
|
"file": "Datei",
|
||||||
"folder": "Ordner",
|
"folder": "Ordner",
|
||||||
|
"fullScreen": "Vollbildmodus umschalten",
|
||||||
"hideDotfiles": "Versteckte Dateien ausblenden",
|
"hideDotfiles": "Versteckte Dateien ausblenden",
|
||||||
"info": "Info",
|
"info": "Info",
|
||||||
"more": "mehr",
|
"more": "mehr",
|
||||||
@@ -21,6 +24,7 @@
|
|||||||
"ok": "OK",
|
"ok": "OK",
|
||||||
"permalink": "permanenten Verweis anzeigen",
|
"permalink": "permanenten Verweis anzeigen",
|
||||||
"previous": "vorherige",
|
"previous": "vorherige",
|
||||||
|
"preview": "Vorschau",
|
||||||
"publish": "Veröffentlichen",
|
"publish": "Veröffentlichen",
|
||||||
"rename": "umbenennen",
|
"rename": "umbenennen",
|
||||||
"replace": "Ersetzen",
|
"replace": "Ersetzen",
|
||||||
@@ -37,13 +41,17 @@
|
|||||||
"toggleSidebar": "Seitenleiste anzeigen",
|
"toggleSidebar": "Seitenleiste anzeigen",
|
||||||
"update": "Update",
|
"update": "Update",
|
||||||
"upload": "Upload",
|
"upload": "Upload",
|
||||||
"openFile": "Datei öffnen"
|
"openFile": "Datei öffnen",
|
||||||
|
"discardChanges": "Verwerfen"
|
||||||
},
|
},
|
||||||
"download": {
|
"download": {
|
||||||
"downloadFile": "Download Datei",
|
"downloadFile": "Download Datei",
|
||||||
"downloadFolder": "Download Ordner",
|
"downloadFolder": "Download Ordner",
|
||||||
"downloadSelected": "Auswahl herunterladen"
|
"downloadSelected": "Auswahl herunterladen"
|
||||||
},
|
},
|
||||||
|
"upload": {
|
||||||
|
"abortUpload": "Sind Sie sicher, dass Sie den Vorgang abbrechen möchten?"
|
||||||
|
},
|
||||||
"errors": {
|
"errors": {
|
||||||
"forbidden": "Sie haben keine Berechtigung dies abzurufen.",
|
"forbidden": "Sie haben keine Berechtigung dies abzurufen.",
|
||||||
"internal": "Etwas ist schiefgelaufen.",
|
"internal": "Etwas ist schiefgelaufen.",
|
||||||
@@ -102,6 +110,7 @@
|
|||||||
"deleteMessageMultiple": "Sind Sie sicher, dass Sie {count} Datei(en) löschen möchten?",
|
"deleteMessageMultiple": "Sind Sie sicher, dass Sie {count} Datei(en) löschen möchten?",
|
||||||
"deleteMessageSingle": "Sind Sie sicher, dass Sie diesen Ordner/diese Datei löschen möchten?",
|
"deleteMessageSingle": "Sind Sie sicher, dass Sie diesen Ordner/diese Datei löschen möchten?",
|
||||||
"deleteMessageShare": "Sind Sie sicher, dass Sie diese Freigabe löschen möchten ({path})?",
|
"deleteMessageShare": "Sind Sie sicher, dass Sie diese Freigabe löschen möchten ({path})?",
|
||||||
|
"deleteUser": "Sind Sie sicher, dass Sie diesen Benutzer löschen möchten?",
|
||||||
"deleteTitle": "Lösche Dateien",
|
"deleteTitle": "Lösche Dateien",
|
||||||
"displayName": "Anzeigename:",
|
"displayName": "Anzeigename:",
|
||||||
"download": "Lade Dateien",
|
"download": "Lade Dateien",
|
||||||
@@ -130,7 +139,9 @@
|
|||||||
"upload": "Upload",
|
"upload": "Upload",
|
||||||
"uploadFiles": "Upload von {files} Dateien...",
|
"uploadFiles": "Upload von {files} Dateien...",
|
||||||
"uploadMessage": "Wählen Sie eine Upload-Methode",
|
"uploadMessage": "Wählen Sie eine Upload-Methode",
|
||||||
"optionalPassword": "Optionales Passwort"
|
"optionalPassword": "Optionales Passwort",
|
||||||
|
"resolution": "Auflösung",
|
||||||
|
"discardEditorChanges": "Möchten Sie die vorgenommenen Änderungen wirklich verwerfen?"
|
||||||
},
|
},
|
||||||
"search": {
|
"search": {
|
||||||
"images": "Bilder",
|
"images": "Bilder",
|
||||||
@@ -163,6 +174,9 @@
|
|||||||
"tusUploadsHelp": "File Browser unterstützt das Hochladen von gestückelten Dateien und ermöglicht so einen effizienten, zuverlässigen, fortsetzbaren und gestückelten Datei-Upload auch in unzuverlässigen Netzwerken.",
|
"tusUploadsHelp": "File Browser unterstützt das Hochladen von gestückelten Dateien und ermöglicht so einen effizienten, zuverlässigen, fortsetzbaren und gestückelten Datei-Upload auch in unzuverlässigen Netzwerken.",
|
||||||
"tusUploadsChunkSize": "Gibt die maximale Größe pro Anfrage an (direkte Uploads werden für kleinere Uploads verwendet). Bitte geben Sie eine Byte-Angabe oder eine Zeichenfolge wie 10 MB, 1 GB usw. an",
|
"tusUploadsChunkSize": "Gibt die maximale Größe pro Anfrage an (direkte Uploads werden für kleinere Uploads verwendet). Bitte geben Sie eine Byte-Angabe oder eine Zeichenfolge wie 10 MB, 1 GB usw. an",
|
||||||
"tusUploadsRetryCount": "Anzahl der Wiederholungsversuche, wenn das Hochladen eines Stückes fehlschlägt.",
|
"tusUploadsRetryCount": "Anzahl der Wiederholungsversuche, wenn das Hochladen eines Stückes fehlschlägt.",
|
||||||
|
"userHomeBasePath": "Basispfad für Benutzer-Home-Verzeichnisse",
|
||||||
|
"userScopeGenerationPlaceholder": "Scope wird automatisch generiert",
|
||||||
|
"createUserHomeDirectory": "Benutzer-Home-Verzeichnis erstellen",
|
||||||
"customStylesheet": "Individuelles Stylesheet",
|
"customStylesheet": "Individuelles Stylesheet",
|
||||||
"defaultUserDescription": "Das sind die Standardeinstellung für Benutzer",
|
"defaultUserDescription": "Das sind die Standardeinstellung für Benutzer",
|
||||||
"disableExternalLinks": "Externe Links deaktivieren (außer Dokumentation)",
|
"disableExternalLinks": "Externe Links deaktivieren (außer Dokumentation)",
|
||||||
@@ -209,6 +223,7 @@
|
|||||||
"shareDeleted": "Freigabe gelöscht!",
|
"shareDeleted": "Freigabe gelöscht!",
|
||||||
"singleClick": "Einfacher Klick zum Öffnen von Dateien und Ordnern",
|
"singleClick": "Einfacher Klick zum Öffnen von Dateien und Ordnern",
|
||||||
"themes": {
|
"themes": {
|
||||||
|
"default": "Systemstandard",
|
||||||
"dark": "Dunkel",
|
"dark": "Dunkel",
|
||||||
"light": "Hell",
|
"light": "Hell",
|
||||||
"title": "Erscheinungsbild"
|
"title": "Erscheinungsbild"
|
||||||
|
|||||||
@@ -26,6 +26,7 @@ import("dayjs/locale/uk");
|
|||||||
import("dayjs/locale/vi");
|
import("dayjs/locale/vi");
|
||||||
import("dayjs/locale/zh-cn");
|
import("dayjs/locale/zh-cn");
|
||||||
import("dayjs/locale/zh-tw");
|
import("dayjs/locale/zh-tw");
|
||||||
|
import("dayjs/locale/cs");
|
||||||
|
|
||||||
// All i18n resources specified in the plugin `include` option can be loaded
|
// All i18n resources specified in the plugin `include` option can be loaded
|
||||||
// at once using the import syntax
|
// at once using the import syntax
|
||||||
|
|||||||
@@ -262,4 +262,4 @@
|
|||||||
"seconds": "Giây",
|
"seconds": "Giây",
|
||||||
"unit": "Đơn vị"
|
"unit": "Đơn vị"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -41,6 +41,7 @@ import url from "@/utils/url";
|
|||||||
import ace, { Ace, version as ace_version } from "ace-builds";
|
import ace, { Ace, version as ace_version } from "ace-builds";
|
||||||
import modelist from "ace-builds/src-noconflict/ext-modelist";
|
import modelist from "ace-builds/src-noconflict/ext-modelist";
|
||||||
import "ace-builds/src-noconflict/ext-language_tools";
|
import "ace-builds/src-noconflict/ext-language_tools";
|
||||||
|
import DOMPurify from "dompurify";
|
||||||
|
|
||||||
import HeaderBar from "@/components/header/HeaderBar.vue";
|
import HeaderBar from "@/components/header/HeaderBar.vue";
|
||||||
import Action from "@/components/header/Action.vue";
|
import Action from "@/components/header/Action.vue";
|
||||||
@@ -83,7 +84,7 @@ onMounted(() => {
|
|||||||
if (isMarkdownFile && isPreview.value) {
|
if (isMarkdownFile && isPreview.value) {
|
||||||
const new_value = editor.value?.getValue() || "";
|
const new_value = editor.value?.getValue() || "";
|
||||||
try {
|
try {
|
||||||
previewContent.value = await marked(new_value);
|
previewContent.value = DOMPurify.sanitize(await marked(new_value));
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error("Failed to convert content to HTML:", error);
|
console.error("Failed to convert content to HTML:", error);
|
||||||
previewContent.value = "";
|
previewContent.value = "";
|
||||||
|
|||||||
+1
-1
@@ -8,7 +8,7 @@ import (
|
|||||||
|
|
||||||
// ParseCommand parses the command taking in account if the current
|
// ParseCommand parses the command taking in account if the current
|
||||||
// instance uses a shell to run the commands or just calls the binary
|
// instance uses a shell to run the commands or just calls the binary
|
||||||
// directyly.
|
// directly.
|
||||||
func ParseCommand(s *settings.Settings, raw string) ([]string, error) {
|
func ParseCommand(s *settings.Settings, raw string) ([]string, error) {
|
||||||
var command []string
|
var command []string
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,6 @@ filters:
|
|||||||
settings:
|
settings:
|
||||||
language_mapping:
|
language_mapping:
|
||||||
sv_SE: sv-se
|
sv_SE: sv-se
|
||||||
cz-CS: cz_cs
|
|
||||||
pt_BR: pt-br
|
pt_BR: pt-br
|
||||||
zh_CN: zh-cn
|
zh_CN: zh-cn
|
||||||
zh_HK: zh-hk
|
zh_HK: zh-hk
|
||||||
|
|||||||
+2
-8
@@ -2,7 +2,7 @@ package users
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
"regexp"
|
"slices"
|
||||||
|
|
||||||
"github.com/spf13/afero"
|
"github.com/spf13/afero"
|
||||||
|
|
||||||
@@ -111,11 +111,5 @@ func (u *User) CanExecute(command string) bool {
|
|||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
for _, cmd := range u.Commands {
|
return slices.Contains(u.Commands, command)
|
||||||
if regexp.MustCompile(cmd).MatchString(command) {
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return false
|
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user