nextcloud / passman

🔐 Open source password manager with Nextcloud integration
https://passman.cc
GNU Affero General Public License v3.0
786 stars 108 forks source link

Can't export vault or change master password #454

Open AmazingBeu opened 6 years ago

AmazingBeu commented 6 years ago

The Bug

If I try to export one vault, in CSV or JSON i have this error (in french) :

error

And if I try to change master password of a vault, the process crashes and a third of password is lost :

lost pass

Master password and stored password have special characters.

Configuration

Operating system:
Linux Manjaro Up to date

Browser:
Chrome and Firefox

Passman version:
2.1.4

Operating system: Debian 9

Web server: Apache 2.4

Database: Maria DB

PHP version: 7

cloud server: Nextcloud or ownCloud Nextcloud

cloud version: (see admin page or version.php) 13.0.1

Special infos: The Nextcloud is behind a reverse proxy apache.

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/56312130-can-t-export-vault-or-change-master-password?utm_campaign=plugin&utm_content=tracker%2F44880056&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F44880056&utm_medium=issues&utm_source=github).
animalillo commented 6 years ago

Do you get any errors on the browser or server console?

AmazingBeu commented 6 years ago

Nothing, but request at /index.php/apps/passman/api/v2/vaults/5AD93... with all password is good

roydenyates commented 6 years ago

(PHP Version: 7.0.29, nextcloud 13.1, debian testing) when trying to export I get this (repeatedly) in server logs (NB: I have obfuscated the username with "XXXXX":

Error index OCP\AppFramework\Db\DoesNotExistException: Did expect one result but found none when executing: query "SELECT FROM `PREFIXpassman_filesWHEREid= ? anduser_id` = ? "; parameters Array ( [0] => undefined [1] => XXXXXX ) ; limit ""; offset ""/var/www/nextcloud/lib/public/AppFramework/Db/Mapper.php - line 359: OCP\AppFramework\Db\Mapper->findOneQuery('SELECT FROM ...', Array, NULL, NULL)/var/www/nextcloud/apps/passman/lib/Db/FileMapper.php - line 55: OCP\AppFramework\Db\Mapper->findEntity('SELECT * FROM...', Array)/var/www/nextcloud/apps/passman/lib/Service/FileService.php - line 53: OCA\Passman\Db\FileMapper->getFile('undefined', 'XXXXX')/var/www/nextcloud/apps/passman/controller/filecontroller.php - line 58: OCA\Passman\Service\FileService->getFile('undefined', 'xxxxx')[internal function] OCA\Passman\Controller\FileController->getFile('undefined')/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php - line 161: call_user_func_array(Array, Array)/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php - line 91: OC\AppFramework\Http\Dispatcher->executeController(Object(OCA\Passman\Controller\FileController), 'getFile')/var/www/nextcloud/lib/private/AppFramework/App.php - line 115: OC\AppFramework\Http\Dispatcher->dispatch(Object(OCA\Passman\Controller\FileController), 'getFile')/var/www/nextcloud/lib/private/AppFramework/Routing/RouteActionHandler.php - line 47: OC\AppFramework\App main('OCA\Passman\Con...', 'getFile', Object(OC\AppFramework\DependencyInjection\DIContainer), Array)[internal function] OC\AppFramework\Routing\RouteActionHandler->__invoke(Array)/var/www/nextcloud/lib/private/Route/Router.php - line 297: call_user_func(Object(OC\AppFramework\Routing\RouteActionHandler), Array)/var/www/nextcloud/lib/base.php - line 998: OC\Route\Router->match('/apps/passman/a...')/var/www/nextcloud/index.php - line 37: OC handleRequest(){main}
roydenyates commented 6 years ago

The above errors persist even after applying the fix in the wiki about exporting.

AmazingBeu commented 6 years ago

Same error as @roydenyates when i try this workaround

animalillo commented 6 years ago

seems like it's looking for a file that is registered in some credential but is missing on the database, any idea @brantje ?

misterbridge commented 6 years ago

I have the same error, the workaround with uploading one little file in one credential is not working, and I still get this error, I cannot export my passwords ... :(

ScreamingDev commented 6 years ago

Seems to be the same when sharing a password. As soon as the other side accepts the password itself is destroyed in my vault but still working in the recipient vault.

misterbridge commented 5 years ago

I've managed to export my passwords, finally: https://github.com/nextcloud/passman/issues/264#issuecomment-449590034