=== modified file 'uc_store/uc_store.module'
--- uc_store/uc_store.module	2009-07-02 14:44:09 +0000
+++ uc_store/uc_store.module	2009-07-02 14:57:11 +0000
@@ -1655,6 +1655,9 @@
   // Default to the first part of the e-mail address.
   $name = substr($email, 0, strpos($email, '@'));
 
+  // Remove possible illegal characters.
+  $name = preg_replace('/[^A-Za-z0-9_.-]/', '', $name);
+
   // Trim that value for spaces and length.
   $name = trim(substr($name, 0, USERNAME_MAX_LENGTH - 4));
 

