Skip to content

Commit

Permalink
add password
Browse files Browse the repository at this point in the history
  • Loading branch information
yuszuv committed Aug 30, 2013
1 parent bc4601b commit 9b8388a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app.rb
Expand Up @@ -5,6 +5,7 @@
require 'sinatra/base'
Dir.glob('lib/*').each { |file| require "#{file}" }
require 'riak'
require 'digest/sha1'

class Schulze < Sinatra::Base
include Sinatra::RenderPartial
Expand Down Expand Up @@ -124,7 +125,7 @@ def articles
end

post '/login' do
if params[:password] == "supersecretpassword"
if Digest::SHA1.hexdigest(params[:password]) == "0bf56c85644de843404becc3f03b89ee63d29ef4"
session[:logged_in] = "true"
redirect to('/admin/pressespiegel')
else
Expand Down

0 comments on commit 9b8388a

Please sign in to comment.