Permalink
Browse files

add password

  • Loading branch information...
1 parent bc4601b commit 9b8388ab39311af83e7d4f5c8484ed668a9471ec @yuszuv committed Aug 30, 2013
Showing with 2 additions and 1 deletion.
  1. +2 −1 app.rb
View
3 app.rb
@@ -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
@@ -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

0 comments on commit 9b8388a

Please sign in to comment.