From 19400663ec500b9aa5af6b9a718ecd99c677e8c3 Mon Sep 17 00:00:00 2001 From: Serghey Rodin Date: Fri, 11 May 2018 16:44:45 +0300 Subject: [PATCH] delete eval from roundcube configs --- upd/fix_roundcube.sh | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100755 upd/fix_roundcube.sh diff --git a/upd/fix_roundcube.sh b/upd/fix_roundcube.sh new file mode 100755 index 00000000..621ffd2f --- /dev/null +++ b/upd/fix_roundcube.sh @@ -0,0 +1,19 @@ +#!/bin/bash + +# Locate roundcube directory +if [ -d '/etc/roundcube' ]; then + rc_dir='/etc/roundcube' +fi +if [ -d '/etc/roundcubemail' ]; then + rc_dir='/etc/roundcubemail' +fi + +if [ -z "$rc_dir" ]; then + exit +fi + +# Check for eval +cd $rc_dir +for config in $(grep eval *.php |cut -f1 -d:); do + sed -i '/eval/d' $config +done