[Rt-commit] r3739 - rt/branches/3.4-RELEASE

robert at bestpractical.com robert at bestpractical.com
Wed Aug 31 16:46:17 EDT 2005


Author: robert
Date: Wed Aug 31 16:46:16 2005
New Revision: 3739

Modified:
   rt/branches/3.4-RELEASE/   (props changed)
   rt/branches/3.4-RELEASE/configure.ac
Log:
 r3748 at woof:  rspier | 2005-08-31 13:41:53 -0700
 Check for invalid character (-) in mysql database names and prevent RT from allowing it to be configured.


Modified: rt/branches/3.4-RELEASE/configure.ac
==============================================================================
--- rt/branches/3.4-RELEASE/configure.ac	(original)
+++ rt/branches/3.4-RELEASE/configure.ac	Wed Aug 31 16:46:16 2005
@@ -23,6 +23,7 @@
 
 dnl Check for programs
 AC_PROG_INSTALL
+AC_PROG_AWK
 AC_ARG_VAR([PERL],[Perl interpreter command])
 AC_PATH_PROG([PERL], [perl], [not found])
 if test "$PERL" = 'not found'; then
@@ -213,6 +214,15 @@
             WEB_USER=$my_user
             WEB_GROUP=$my_group)
 
+# Test for valid database names
+AS_IF([ test "$DB_TYPE" == "mysql" ],
+      [ AC_MSG_CHECKING([if database name is valid])
+          AS_IF([ echo $DB_DATABASE | $AWK '/-/ { exit 1 }' ],
+                [ AC_MSG_RESULT([yes]) ],
+                [ AC_MSG_ERROR([no.  database name ($DB_DATABASE) contains '-' which is not valid for mysql]) ]
+               )
+      ]
+     )
 
 
 dnl Set the value of apachectl


More information about the Rt-commit mailing list