Skip to content

Instantly share code, notes, and snippets.

View ksmithbaylor's full-sized avatar
🐻
Sic 'em Bears!

Kevin Smith ksmithbaylor

🐻
Sic 'em Bears!
View GitHub Profile

A fix for Ghost taking too long to authenticate due to some strange behavior in the bcrypt-nodejs library. This simply makes the passwords hash using Sha1 instead of bcrypt. Probably not the best/cleanest/most secure solution, but it works for most purposes.

INSTRUCTIONS:

  1. In the file core/server/models/user.js, replace the 'add' function with the contents of user-add.js.
  2. In the same file, replace the 'check' function with the contents of user-check.js.
  3. At the top, add the line 'sha1 = require('sha1'),' in the require section.
  4. In package.json, add the following line in the 'dependencies' section: "sha1": "1.1.0",
  5. You can remove references to the bcrypt library if you want. These are the only two places it is used.
  6. Remove all users from the databases in content/data/ by executing 'delete from users;' on the sqlite db (or delete the whole database if there's not anything important there yet).
@ksmithbaylor
ksmithbaylor / gist:3180048
Created July 26, 2012 03:20
Troubleshooting the jruby-rawr-swt-helloworld template
I actually just fixed it! Here's what was happening, in case the information is useful to you.
I am using OS X 10.7.4, rawr 1.4.5, and jruby 1.6.7.
After doing a git pull, I did the following:
$ ./bin/build-osx-app.sh
$ open package/osx/jruby-rawr-swt-helloworld.app
The app then launches for a split second and then quits.