damko / freedommarks-browser-webextension

A cross-browser webextension for Nextcloud Bookmarks
https://addons.mozilla.org/en-US/firefox/addon/freedommarks/
GNU General Public License v2.0
106 stars 15 forks source link

"Wrong password for username ..." #4

Closed seanlynch closed 6 years ago

seanlynch commented 7 years ago

With NextCloud 12 and Firefox 55.0.2, just keeps giving "Wrong password for username" followed by my username. I'm using an app password, but the Passman extension is working fine. I've tried two separate app passwords and the URL with and without the / at the end. Using https with a LetsEncrypt certificate.

shtrom commented 6 years ago

Exactly the same issue here: app password (and U2F 2FA), and HTTPS/letsencrypt. Not using Passman, though, but everything else using an app password works well.

Looking at my access_log, I see my request coming in, and out with a 200

cloud.example.net 192.2.0.1 - - [20/Dec/2017:04:59:29 +0100] "GET /index.php/apps/bookmarks/public/rest/v1/bookmark HTTP/1.1" 200 59 "-" "User Agent"
cloud.example.net 192.2.0.1 - - [20/Dec/2017:04:59:29 +0100] "GET /index.php/apps/bookmarks/public/rest/v1/bookmark?user=shtrom&password=MY-APP-PASSWORD-HERE&select%5B%5D=id&select%5B%5D=url&select%5B%5D=title&select%5B%5D=tags&select%5B%5D=description&tags%5B%5D=development&conjunction=or HTTP/1.1" 200 61 "-" "User Agent"

Ah, but the response is actually an error:

{"status":"error","message":"Wrong password for user shtrom"}

DAV auth, which works with app passwords, seems to be using HTTP Auth in the backend. Could it be that the bookmarks app doesn't support app passwords?

shtrom commented 6 years ago

The OCBookmarks https://github.com/theScrabi/OCBookmarks Android app also seems to use HTTP Auth with the app password (against the v2 API).

cloud.example.net 192.2.0.1 - shtrom [20/Dec/2017:05:16:15 +0100] "GET /index.php/apps/bookmarks/public/rest/v2/bookmark?page=-1 HTTP/1.1" 200 419728 "-" "Dalvik/2.1.0 (Linux; U; Android 7.1.2; Nexus 5 Build/NJH47F)"
damko commented 6 years ago

There were some issue in the recent past with the API on server side mostly due to many many changes in the codebase. You've probably already noticed this but since a couple of months these issues are solved. Currently FreedomMarks 0.0.7 works quite well with NextCloud 12.0.4

shtrom commented 6 years ago

Ah! Nice! Thanks for that!

seanlynch commented 6 years ago

Unfortunately the version in the Chrome store is still 0.0.2. Are you planning on uploading a new build?