Index: uc_store/uc_store.module
===================================================================
--- uc_store/uc_store.module	(revision 1015)
+++ uc_store/uc_store.module	(working copy)
@@ -1651,6 +1651,9 @@
   // Default to the first part of the e-mail address.
   $name = substr($email, 0, strpos($email, '@'));
 
+  // Remove possible illegal characters.
+  $name = preg_replace('/[^[:alnum:]_.-]/', '', $name);
+  
   // Trim that value for spaces and length.
   $name = trim(substr($name, 0, USERNAME_MAX_LENGTH - 4));
 
