Add managed Craft addons with secure installation and document editing

This commit is contained in:
SantaSpeen committed 2026-10-22 18:46:46 +03:00
1 parent 1afa755d4f
commit 5cb1b463ea
31 files changed
+2274 -15

No files matched your search

+3
View File
@@ -281,6 +281,9 @@ func resourcePatchHandler(fileCache FileCache) handleFunc {
// delete then recurse through the whole subtree, so a rule denying a descendant
// of an allowed directory would be bypassed by operating on the parent instead.
func checkDescendants(d *data, src, dst string) error {
if addonPathDenied(d, src, true) || (dst != "" && addonPathDenied(d, dst, true)) {
return fberrors.ErrPermissionDenied
}
if len(d.settings.Rules) == 0 && len(d.user.Rules) == 0 {
return nil
}