hashview / hashview-old

A web front-end for password cracking and analytics
http://www.hashview.io
GNU General Public License v3.0
621 stars 134 forks source link

Internal server error when creating new user #385

Closed antonio-marino closed 6 years ago

antonio-marino commented 6 years ago

I recently installed hashview (using master branch), but I've have been getting an Internal Server Error whenever I try to add or edit a user. The beginning of the stack trace looks like this:

18:43:45 web.1 | 2018-01-11 18:43:45 - NoMethodError - undefined methodauth_secret' for #: 18:43:45 web.1 | /opt/hashview/routes/accounts.rb:62:in block in <top (required)>' 18:43:45 web.1 | /home/user/.rvm/gems/ruby-2.2.2/gems/sinatra-1.4.7/lib/sinatra/base.rb:1611:incall' 18:43:45 web.1 | /home/user/.rvm/gems/ruby-2.2.2/gems/sinatra-1.4.7/lib/sinatra/base.rb:1611:in block in compile!' 18:43:45 web.1 | /home/user/.rvm/gems/ruby-2.2.2/gems/sinatra-1.4.7/lib/sinatra/base.rb:975:in[]' 18:43:45 web.1 | /home/user/.rvm/gems/ruby-2.2.2/gems/sinatra-1.4.7/lib/sinatra/base.rb:975:in block (3 levels) in route!' 18:43:45 web.1 | /home/user/.rvm/gems/ruby-2.2.2/gems/sinatra-1.4.7/lib/sinatra/base.rb:994:inroute_eval' ` Any ideas on why this is happening?

i128 commented 6 years ago

Confirmed, working on it now.

i128 commented 6 years ago

Okay, its fixed in master. Unfortunately, since you've already did a db:setup, you'll need to do a quick manual alteration to a table that was missing the column

mysql -u <username> -p
# presuming you're using this in production
use hashview;
alter table users add column auth_secret varchar(50);
antonio-marino commented 6 years ago

That is not a problem! Thanks for the quick fix!