Index: /branches/rel_ag_9_4_5/webui/proxy/new/incGlobal/adminTools/sysMgmt/class.cliWrap_gLicense.php
===================================================================
--- /branches/rel_ag_9_4_5/webui/proxy/new/incGlobal/adminTools/sysMgmt/class.cliWrap_gLicense.php	(revision 20511)
+++ /branches/rel_ag_9_4_5/webui/proxy/new/incGlobal/adminTools/sysMgmt/class.cliWrap_gLicense.php	(working copy)
@@ -21,7 +21,7 @@
 *
 * WRAPPER FOR CLI COMMANDS:
 *
-* 'system license "<license>" [novalidate]'
+* 'system license "<license>"'
 * 'show version'  used to get license key string for displaying.
 *
 * PUBLIC FUNCTIONS:
@@ -93,9 +93,12 @@
 				// Do import with validattion here.
 				// ------------------------------------------------------------
 				case ($this->classId . '_gLicenseImportValidate'):
-					$t_licenseCode = $_POST[$this->classId . '_license_code'];		
-					//echo 'Import With Validate.<br>LicCode=' . $t_licenseCode . '<br>';
-					
+					$t_licenseCode = $_POST[$this->classId . '_license_code'];
+					if (!preg_match('/^[A-Za-z0-9\-\_\+\/=#]+$/', $t_licenseCode)) {
+						$this->jsOnLoadEnd .= 'g_errStr += "License code format error!";';
+						break;
+					}
+
 					$t_errStr = cli::exec('system license "' . $t_licenseCode . '"');
 					if (!($t_errStr->result)) {
 						$this->jsOnLoadEnd .= 'g_errStr += "' . language::translate('alert_messageAlertFromSP') . '\n\n' . (urldecode(str_replace('%0A', '\n', urlencode(addslashes(cli::get_reason_info($t_errStr)))))) . '";';
@@ -108,27 +111,6 @@
 					}
 					break;
 
-				// ------------------------------------------------------------
-				// Do import without validattion here.
-				// ------------------------------------------------------------
-				case ($this->classId . '_gLicenseImportNoValidate'):
-					$t_licenseCode = $_POST[$this->classId . '_license_code'];		
-					//echo 'Import Without Validate.<br>LicCode=' . $t_licenseCode . '<br>';
-					
-					$t_errStr = cli::exec('system license "' . $t_licenseCode . '" novalidate');
-					if (!($t_errStr->result)) {
-						// cli cmd failed.
-						$this->jsOnLoadEnd .= 'g_errStr += "' . language::translate('alert_messageAlertFromSP') . '\n\n' . (urldecode(str_replace('%0A', '\n', urlencode(addslashes(cli::get_reason_info($t_errStr)))))) . '";';
-					} else {
-						//echo 'cli cmd succeeded.';
-						$t_result = "";
-						if (strstr($t_errStr->content[0], "SVD is not licensed on this system") != "") {
-							$t_result .= "<br>The SVD function has been disabled automatically because it is not included in this new license.";
-						}
-						$this->jsOnLoadEnd .= 'showSPMessage("status", "' . language::translate('status_operation_successful') . '<br><br>' . $t_result . '");';
-					}
-					break;
-				
 				case ($this->classId . '_gSysSerialNumber'):
 					$t_resp = cli::exec(CMD_SYSTEM_SERIALNUMBER);
 					$t_resp = cli::exec("YES");
@@ -290,22 +272,7 @@
 			}
 		}
 		';
-			
-		// ------------------------------------------------------------
-		// Prepare <FORM> tag for license import without validation.
-		// ------------------------------------------------------------
-		$this->jsAppend .= '
-		function gLicenseImportNoValidate() {
-			if (document.forms["form_mainView"].actionStr.value == "") {					
-				document.forms["form_mainView"].target = "mainView";
-				document.forms["form_mainView"].actionStr.value = "' . $this->classId . '_gLicenseImportNoValidate";
-				document.forms["form_mainView"].submit();
-			} else {
-				document.forms["form_mainView"].submit();
-			}
-		}
-		';
-		
+
 		// ------------------------------------------------------------
 		// Prepare <FORM> tag for generating a new serial number.
 		// ------------------------------------------------------------
