public
Description: The open source social networking platform in Ruby on Rails from the author of RailsSpace
Homepage: http://insoshi.com
Clone URL: git://github.com/insoshi/insoshi.git
Search Repo:
[#67] Fixed (I think) the source of the 
ActionController::InvalidAuthenticityToken exception
The problem was that new users were being logged in even if their emails
needed to be verified.
Michael Hartl (author)
Thu May 15 15:40:20 -0700 2008
commit  07c8dd3171541c29e4c929dc1a3599567b897ecc
tree    0e907aec7803d3d596382cfdd3b866561a2eb592
parent  945af19012d72245e2b2104b0ffc6ab485e23857
...
44
45
46
47
48
49
50
51
52
53
 
54
55
56
...
44
45
46
 
47
48
49
50
51
52
53
54
55
56
0
@@ -44,13 +44,13 @@
0
     respond_to do |format|
0
       @person.deactivated = true if global_prefs.email_verifications?
0
       if @person.save
0
- self.current_person = @person
0
         if global_prefs.email_verifications?
0
           @person.email_verifications.create
0
           flash[:notice] = %(Thanks for signing up! A verification email has
0
                              been sent to #{@person.email}.)
0
           format.html { redirect_to(home_url) }
0
         else
0
+ self.current_person = @person
0
           flash[:notice] = "Thanks for signing up!"
0
           format.html { redirect_back_or_default(home_url) }
0
         end
...
122
123
124
 
 
 
 
 
 
 
 
 
 
125
126
127
...
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
0
@@ -122,6 +122,16 @@
0
           response.should redirect_to(person_path(person))
0
         end
0
         
0
+ it "should not log the person in" do
0
+ person = create_person
0
+ controller.send(:logged_in?).should be_false
0
+ end
0
+
0
+ it "should not have an auth token" do
0
+ create_person
0
+ response.cookies["auth_token"].should == []
0
+ end
0
+
0
         it "should verify a person even if they're logged in" do
0
           person = create_person
0
           login_as(person)

Comments

    No one has commented yet.