incubator-ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vik...@apache.org
Subject svn commit: r1347163 - in /incubator/ambari/branches/ambari-186: CHANGES.txt hmc/php/frontend/configUtils.php
Date Wed, 06 Jun 2012 22:01:08 GMT
Author: vikram
Date: Wed Jun  6 22:01:07 2012
New Revision: 1347163

URL: http://svn.apache.org/viewvc?rev=1347163&view=rev
Log:
AMBARI-388. Do not allow invalid chars for database name and user name for hive (Contributed
by Hitesh)

Modified:
    incubator/ambari/branches/ambari-186/CHANGES.txt
    incubator/ambari/branches/ambari-186/hmc/php/frontend/configUtils.php

Modified: incubator/ambari/branches/ambari-186/CHANGES.txt
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/ambari-186/CHANGES.txt?rev=1347163&r1=1347162&r2=1347163&view=diff
==============================================================================
--- incubator/ambari/branches/ambari-186/CHANGES.txt (original)
+++ incubator/ambari/branches/ambari-186/CHANGES.txt Wed Jun  6 22:01:07 2012
@@ -6,6 +6,8 @@ characters wide.
 
 Release 0.1.x - unreleased
 
+  AMBARI-389. Do not allow invalid chars for database name and user name for hive (Hitesh
via Vikram)
+
   AMBARI-388. Prevent the user from assigning NameNode and Secondary NameNode services on
the same host (Yusaku via Vikram)
 
   AMBARI-386. On Single Node install when install all the components the recommended num
for Map/Reduce Tasks is too high (Hitesh via Vikram)

Modified: incubator/ambari/branches/ambari-186/hmc/php/frontend/configUtils.php
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/ambari-186/hmc/php/frontend/configUtils.php?rev=1347163&r1=1347162&r2=1347163&view=diff
==============================================================================
--- incubator/ambari/branches/ambari-186/hmc/php/frontend/configUtils.php (original)
+++ incubator/ambari/branches/ambari-186/hmc/php/frontend/configUtils.php Wed Jun  6 22:01:07
2012
@@ -89,10 +89,14 @@ function validateConfigs($svcConfigs) {
       } else if ($key == "hive_database_name") {
         if ($val == "") {
           $errors[$key] = array ( "error" => "Database name cannot be empty");
+        } else if (preg_match("/^\w+$/", $val) == 0) {
+          $errors[$key] = array ( "error" => "Database name should only contain alphanumeric
characters");
         }
       } else if ($key == "hive_metastore_user_name") {
         if ($val == "") {
           $errors[$key] = array ( "error" => "Database user name cannot be empty");
+        } else if (preg_match("/^\w+$/", $val) == 0) {
+          $errors[$key] = array ( "error" => "Database user name should only contain alphanumeric
characters");
         }
       } else if ($key == "hive_metastore_user_passwd") {
         if ($val == "") {



Mime
View raw message