<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -110,7 +110,7 @@ module Clearance
       #     :expires =&gt; 1.year.from_now.utc
       #   }
       def remember_me!
-        self.remember_token = encrypt(&quot;--#{Time.now.utc}--#{password}--&quot;)
+        self.remember_token = encrypt(&quot;--#{Time.now.utc}--#{password}--#{id}--&quot;)
         save(false)
       end
 </diff>
      <filename>lib/clearance/user.rb</filename>
    </modified>
    <modified>
      <diff>@@ -140,6 +140,22 @@ class UserTest &lt; ActiveSupport::TestCase
     end
   end
 
+  should &quot;not generate the same remember token for users with the same password at the same time&quot; do
+    password    = 'secret'
+    first_user  = Factory(:email_confirmed_user,
+                          :password              =&gt; password,
+                          :password_confirmation =&gt; password)
+    second_user = Factory(:email_confirmed_user,
+                          :password              =&gt; password,
+                          :password_confirmation =&gt; password)
+
+    Time.stubs(:now =&gt; Time.now)
+    first_user.remember_me!
+    second_user.remember_me!
+
+    assert_not_equal first_user.remember_token, second_user.remember_token
+  end
+
   # recovering forgotten password
 
   context &quot;An email confirmed user&quot; do</diff>
      <filename>test/models/user_test.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>5f13fcf7ac9abce1e8ec1a31d32416cdb46a980a</id>
    </parent>
  </parents>
  <author>
    <name>Joe Ferris</name>
    <email>jferris@metaphor.local</email>
  </author>
  <url>http://github.com/thoughtbot/clearance/commit/536828c06c146bb2122863fd175a6398c141f790</url>
  <id>536828c06c146bb2122863fd175a6398c141f790</id>
  <committed-date>2009-10-21T07:50:53-07:00</committed-date>
  <authored-date>2009-10-21T07:50:53-07:00</authored-date>
  <message>Fix for potential remember me token collisions</message>
  <tree>ab4e97ee59a2adbfee7f3ef47cde1163182ac120</tree>
  <committer>
    <name>Joe Ferris</name>
    <email>jferris@metaphor.local</email>
  </committer>
</commit>
