CHANGELOG INSTALLATION blockallocations.php privileges.php: added in changes from 2.5.2 release
diff --git a/CHANGELOG b/CHANGELOG
index c63b40e..2c7dde4 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,22 @@
+ASF VCL 2.5.2
+
+Dependency changes:
+
+No dependency changes for any components in this release.
+
+VCL Management Node:
+
+Release Notes - VCL - Version 2.5.2
+
+** Improvement
+    * [VCL-1127] - Make changes to handle Cygwin's change of sshd service name to cygsshd
+
+** Bug
+    * reworked flow of validation of owner when submitting a Block Allocation
+    * modified regular expression to validate submitted userid when looking up a user under User Lookup
+
+================================================================================
+
 ASF VCL 2.5.1
 
 Dependency changes:
diff --git a/INSTALLATION b/INSTALLATION
index f6f4a62..627fad1 100644
--- a/INSTALLATION
+++ b/INSTALLATION
@@ -1,6 +1,6 @@
-Installing VCL 2.5.1
+Installing VCL 2.5.2
 
-VCL 2.5.1 can be installed using an installation script. All you need to
+VCL 2.5.2 can be installed using an installation script. All you need to
 install VCL is the script. It will download and validate the VCL software
 and then install it. The script can be used to install all three parts of
 VCL (database, web portal, and management node) on a single system or to
@@ -145,7 +145,7 @@
       Import the vcl.sql file into the database. The vcl.sql file is included in
       the mysql directory within the Apache VCL source code
 
-        mysql vcl < apache-VCL-2.5.1/mysql/vcl.sql
+        mysql vcl < apache-VCL-2.5.2/mysql/vcl.sql
 
 2. Install and Configure the Web Components
 
@@ -226,14 +226,14 @@
       Copy the web directory to a location under the web root of your web
       server and navigate to the destination .ht-inc subdirectory:
 
-        cp -ar apache-VCL-2.5.1/web/ /var/www/html/vcl-2.5.1
-        ln -s /var/www/html/vcl-2.5.1 /var/www/html/vcl
+        cp -ar apache-VCL-2.5.2/web/ /var/www/html/vcl-2.5.2
+        ln -s /var/www/html/vcl-2.5.2 /var/www/html/vcl
         cd /var/www/html/vcl/.ht-inc
 
       If SELinux is enabled, run the following command to set the context of the
       web code to httpd_sys_content_t
 
-        chcon -R -t httpd_sys_content_t /var/www/html/vcl-2.5.1
+        chcon -R -t httpd_sys_content_t /var/www/html/vcl-2.5.2
 
       Copy secrets-default.php to secrets.php:
 
@@ -305,7 +305,7 @@
 
     D. Add a Management Node to the Database
 
-      Click the Management Nodes link
+      Click the Manage->Management Nodes link
 
          Select Edit Management Node Profiles
          Click Submit
@@ -354,8 +354,8 @@
    Prerequisites The following management node installation instructions assume
    the instructions in these previous sections have been completed:
 
-    VCL 2.5.1 Database Installation
-    VCL 2.5.1 Web Code Installation
+    VCL 2.5.2 Database Installation
+    VCL 2.5.2 Web Code Installation
 
    Supported Operating Systems:
 
@@ -424,8 +424,8 @@
       Copy the managementnode directory to the location where you want it to
       reside (typically /usr/local):
 
-        cp -ar apache-VCL-2.5.1/managementnode /usr/local/vcl-2.5.1
-        ln -s /usr/local/vcl-2.5.1 /usr/local/vcl
+        cp -ar apache-VCL-2.5.2/managementnode /usr/local/vcl-2.5.2
+        ln -s /usr/local/vcl-2.5.2 /usr/local/vcl
 
    B. Install the Required Linux Packages & Perl Modules
 
diff --git a/web/.ht-inc/blockallocations.php b/web/.ht-inc/blockallocations.php
index 8e7b3ca..10f1f65 100644
--- a/web/.ht-inc/blockallocations.php
+++ b/web/.ht-inc/blockallocations.php
@@ -3087,12 +3087,18 @@
 		$errmsg = i("The submitted image is invalid.");
 		$err = 1;
 	}
-	if(! $err && $method != 'request' && ! validateUserid($return['owner'])) {
-		$errmsg = i("The submitted owner is invalid.");
-		$err = 1;
+	if(! $err) {
+		if($method == 'new' || $method == 'edit') {
+			if(! validateUserid($return['owner'])) {
+				$errmsg = i("The submitted owner is invalid.");
+				$err = 1;
+			}
+			else
+				$return['ownerid'] = getUserlistID($return['owner']);
+		}
+		else
+			$return['owner'] = '';
 	}
-	else
-		$return['ownerid'] = getUserlistID($return['owner']);
 	$groups = getUserGroups(0, $user['affiliationid']);
 	$extragroups = getContinuationVar('extragroups');
 	if(! $err && ! array_key_exists($return['groupid'], $groups) &&
diff --git a/web/.ht-inc/privileges.php b/web/.ht-inc/privileges.php
index 4130169..500d3e1 100644
--- a/web/.ht-inc/privileges.php
+++ b/web/.ht-inc/privileges.php
@@ -1477,6 +1477,11 @@
 function userLookup() {
 	global $user;
 	$userid = processInputVar("userid", ARG_STRING, '');
+	$showerror = 0;
+	if(! preg_match('/^[-a-zA-Z0-9@_ \'\+\.,]{0,100}$/', $userid)) {
+		$userid = '';
+		$showerror = 1;
+	}
 	$affilid = processInputVar('affiliationid', ARG_NUMERIC, $user['affiliationid']);
 	$force = processInputVar('force', ARG_NUMERIC, 0);
 	print "<div align=center>\n";
@@ -1507,6 +1512,10 @@
 	$cont = addContinuationsEntry('submitUserLookup');
 	print "<INPUT type=hidden name=continuation value=\"$cont\">\n";
 	print "</FORM><br>\n";
+	if($showerror) {
+		print "<font color=red>User not found</font><br>\n";
+		return;
+	}
 	if(! empty($userid)) {
 		$esc_userid = vcl_mysql_escape_string($userid);
 		if(preg_match('/,/', $userid)) {