]> git.openstreetmap.org Git - rails.git/blobdiff - app/views/site/edit.html.erb
Check that the token is valid before using it.
[rails.git] / app / views / site / edit.html.erb
index 3565b046816d41658434471f34efdedfd113d7e9..779abd352b659324992a20c4efd53fc924180066 100644 (file)
@@ -20,7 +20,7 @@
 <%= render :partial => 'search' %>
 
 <%
-session[:token] = @user.tokens.create.token unless session[:token]
+session[:token] = @user.tokens.create.token unless session[:token] and UserToken.find_by_token(session[:token])
 
 # Decide on a lat lon to initialise potlatch with. Various ways of doing this
 if params['lon'] and params['lat']