瀏覽代碼

delete eval from roundcube configs

Serghey Rodin 8 年之前
父節點
當前提交
19400663ec
共有 1 個文件被更改,包括 19 次插入0 次删除
  1. 19 0
      upd/fix_roundcube.sh

+ 19 - 0
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