1
0
Fork 0
mirror of https://github.com/sinatra/sinatra synced 2023-03-27 23:18:01 -04:00

'admin' == params[:password] looks strange, swap order

This commit is contained in:
Konstantin Haase 2011-05-02 13:10:40 +02:00
parent ff33126aba
commit d44bfa496e

View file

@ -1463,7 +1463,7 @@ application (Rails/Ramaze/Camping/...):
get('/login') { haml :login }
post('/login') do
if 'admin' == params[:name] && 'admin' == params[:password]
if params[:name] == 'admin' && params[:password] == 'admin'
session['user_name'] = params[:name]
else
redirect '/login'