Hello!

In install.sh script exist following code:

 692     if [ "X${USER_DIR}" = "X" ]; then
 693         while [ 1 ]; do
 694             $ECHO " - ${wheretoinstall} [$INSTALLDIR]: "
 695             read ANSWER
 696             if [ ! "X$ANSWER" = "X" ]; then
 697                 echo $ANSWER |grep -E "^/[a-zA-Z0-9/-]{3,128}$"
>/dev/null 2>&1
 698                 if [ $? = 0 ]; then
 699                     INSTALLDIR=$ANSWER;
 700                     WORKDIR=$ANSWER;
 701                     break;
 702                 fi
 703             else
 704                 break;
 705             fi
 706         done
 707     else
 708         INSTALLDIR=${USER_DIR}
 709         WORKDIR=${USER_DIR}
 710     fi

Code for verify installation dir not allow to me specify root (/) as
installation directory:

[EMAIL PROTECTED] ~]$ echo "/" |grep -E "^/[a-zA-Z0-9/-]{3,128}$">/dev/null
2>&1; echo rc=$?
rc=1

So I suggest change this behavior:

- echo $ANSWER | grep -E "^/[a-zA-Z0-9/-]{3,128}$" >/dev/null 2>&1
+printf '%s' "$ANSWER" | grep -E "^/[[:alnum:]/-]{0,128}$" >/dev/null 2>&1

What's think developers about this change? Should I post the bug for this?

Thanks in advance.

-- 
+ Slava Semushin | slava.semushin @ gmail.com
+ ALT Linux Team | php-coder @ altlinux.ru

Reply via email to