hashview / hashview-old

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

ArgumentError for routes/analytics.rb #399

Closed Therindor closed 5 years ago

Therindor commented 6 years ago

I upgraded to the latest version, using Sequel. Passwords containing non-ascii characters then caused an internal server error when visiting the analytics page. The stacktrace revealed that it was throwing an error when doing the force_encoding('UTF-8') on the plaintext in routes/analytics.rb.

Some troubleshooting revealed that, adding to config/database.yml another line encoding: "utf8", solved the issue, and the password containing non-ascii was then printed to page and no internal server error occurred.

Has anyone experienced a similar issue?

i128 commented 6 years ago

Yes we have experienced this problem, I was hoping that the force_encoding would fix it. But clearly it didnt. Mind sharing where in the config/database.yml, you made that change?

Therindor commented 6 years ago

Certainly. I added this line: encoding: "utf8" to the config/database.yml , like this:

production:
  adapter: mysql
  host: "localhost"
  port: 3306
  user: "root"
  password: "CHANGEME"
  database: "hashview"
  encoding: "utf8"
i128 commented 5 years ago

KK this SHOULD be fixed with the latest version v0.7.4-beta