jcs / rubywarden

An unofficial, mostly Bitwarden-compatible API server written in Ruby (Sinatra and ActiveRecord)
ISC License
593 stars 49 forks source link

New Bitwarden 1.6.0 update breaks local connection #66

Closed Joshndroid closed 6 years ago

Joshndroid commented 6 years ago

Heads up/PSA

The new bitwarden update V 1.6.0 breaks connection with local rubywarden installation/database.

Popup window seem to say something about 'un expected toaken < within json at position 0' Within developer console im getting 'POST https:/ipaddress 404 bendor.js:93392 (not found)'

My other boxes with the older version still working flawlessly

Love your work, I'm assuming you maybe already know about this.

valantur commented 6 years ago

Yup, I'm also facing the same issue:

"POST /api/accounts/prelogin HTTP/1.1" 404 18 0.0006 And the Chrome extension says "unexpected token < in JSON at position 0" when I try to log in.

Thanks!

jcs commented 6 years ago

This should be fixed in 979849f if you want to confirm (make sure to run rake db:migrate).

jcs commented 6 years ago

@kspearrin Any hints on what the kdf field is for with the new kdfIterations field? It looks like it's just being sent as 0.

jcs commented 6 years ago

Ah, looks like it's a KDF type, with 0 being PBKDF2. I guess this will be configurable in future versions.

valantur commented 6 years ago

Thanks I can log on to the backend now! Howerver, I found another error when trying to import a csv file generated with my docker instance of bitwarden:

Traceback (most recent call last): 1: from tools/bitwarden_import.rb:87:in <main>' /opt/rubywarden/lib/bitwarden.rb:55:inhashPassword': wrong number of arguments (given 2, expected 3) (ArgumentError)

Is it possible this last change broke importing passwords? Thanks for looking into all of these issues!

Joshndroid commented 6 years ago

@jcs Thanks for your quick work

@valantur I had same issue and seems someone else did as well in #59 with bitwarden import

kspearrin commented 6 years ago

@jcs Yes, this will be configurable from the web vault in a future update. If the endpoint 404s the clients will handle it in a backwards compatible way.