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:
parent
ff33126aba
commit
d44bfa496e
1 changed files with 1 additions and 1 deletions
|
@ -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'
|
||||
|
|
Loading…
Reference in a new issue