--- User_Overlay.pm.bak	2010-04-20 11:45:52.000000000 +0200
+++ User_Overlay.pm	2010-04-20 11:54:19.000000000 +0200
@@ -1034,12 +1034,19 @@
     }
 
     #  if it's a historical password we say ok.
-    if ($self->__Value('Password') eq crypt($value, $self->__Value('Password'))
-        or $self->_GeneratePasswordBase64($value) eq $self->__Value('Password'))
+    eval
     {
-        # ...but upgrade the legacy password inplace.
-        $self->SUPER::SetPassword( $self->_GeneratePassword($value) );
-        return(1);
+      if ($self->__Value('Password') eq crypt($value, $self->__Value('Password'))
+          or $self->_GeneratePasswordBase64($value) eq $self->__Value('Password'))
+      {
+          # ...but upgrade the legacy password inplace.
+          $self->SUPER::SetPassword( $self->_GeneratePassword($value) );
+          return(1);
+      }
+    };
+    if ($@) {
+      $RT::Logger->info("Caught exception: $@");
+      return(undef);
     }
 
     # no password check has succeeded. get out
