A community-supported supercharged document management system: scan, index and archive all your documents
Python aiangulararchivingdjangodmsdocument-managementdocument-management-systemllmmachine-learningocroptical-character-recognitionpdf
Limits tamper check find to depth 1, as only files at the first level could be run
Trenton Holmes046d43fbe843
diff --git a/docker/docker-prepare.sh b/docker/docker-prepare.shindex 92c9d1f15..18b5e8815 100755--- a/docker/docker-prepare.sh+++ b/docker/docker-prepare.sh@@ -97,12 +97,12 @@ custom_container_init() {# Don't run files which are owned by anyone except root# Don't run files which are writeable by othersif [ -d "${custom_script_dir}" ]; then- if [ -n "$(/usr/bin/find "${custom_script_dir}" ! -user root)" ]; then+ if [ -n "$(/usr/bin/find "${custom_script_dir}" -maxdepth 1 ! -user root)" ]; thenecho "**** Potential tampering with custom scripts detected ****"echo "**** The folder '${custom_script_dir}' must be owned by root ****"return 0fi- if [ -n "$(/usr/bin/find "${custom_script_dir}" -perm -o+w)" ]; then+ if [ -n "$(/usr/bin/find "${custom_script_dir}" -maxdepth 1 -perm -o+w)" ]; thenecho "**** The folder '${custom_script_dir}' or some of contents have write permissions for others, which is a security risk. ****"echo "**** Please review the permissions and their contents to make sure they are owned by root, and can only be modified by root. ****"return 0