fixed padding to allow spaces
[mirror/userdir-ldap-cgi.git] / update.cgi
index 5fdfb74..7dd4fc5 100755 (executable)
@@ -1,6 +1,7 @@
 #!/usr/bin/perl
 
-# (c) 1999 Debian and Randolph Chung. Licensed under the GPL. <tausq@debian.org>
+# $Id: update.cgi,v 1.6 2000/03/26 22:13:25 tausq Exp $
+# (c) 1999 Randolph Chung. Licensed under the GPL. <tausq@debian.org>
 
 use lib '.';
 use strict vars;
@@ -93,6 +94,11 @@ if (!($query->param('doupdate'))) {
   # Actually update stuff...
   my ($newpassword, $newstaddress);
   
+  if (($query->param('labeledurl')) && 
+      ($query->param('labeledurl') !~ /^https?:\/\//i)) {
+    &Util::HTMLError("Your homepage URL is invalid");
+  }
+  
   if ($query->param('newpass') && $query->param('newpassvrfy')) {
     if ($query->param('newpass') ne $query->param('newpassvrfy')) {
       # passwords don't match...
@@ -124,6 +130,7 @@ if (!($query->param('doupdate'))) {
   LDAPUpdate($ldap, $editdn, 'emailForward', $query->param('email'));
   LDAPUpdate($ldap, $editdn, 'privatesub', $query->param('privatesub'));
   LDAPUpdate($ldap, $editdn, 'ircNick', $query->param('ircnick'));
+  LDAPUpdate($ldap, $editdn, 'icquin', $query->param('icquin'));
   LDAPUpdate($ldap, $editdn, 'labeledUrl', $query->param('labeledurl'));
   LDAPUpdate($ldap, $editdn, 'onvacation', $query->param('onvacation'));