nextcloud / nextcloud/passman

Cannot export passwords

Open
#532 26 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

help wanted Import/Export related
Dominant language
JavaScript
Stars
823
Forks
117
Avg merge
1d 21h
Merged PRs (30d)
8

Description

Bug report

Steps to reproduce
  1. Go to Passman
  2. Connect to vault
  3. Settings
  4. Export credentials
  5. CSV
  6. Enter password
  7. Hit Export
Expected behaviour

A file should start downloading

Actual behaviour

Export is stuck at:
Starting export
Decrypting credentials

Configuration

Operating system:
MacOS Mojave 10.14.1

Browser:
Tested on:

  • Firefox: Quantum 64.0 (64-bit)
  • Brave: Version 0.58.18 Chromium: 71.0.3578.98 (Official Build) (64-bit)
  • Safari: Version 12.0.1 (14606.2.104.1.1)

Passman version:
Tested on:

  • Passman 2.1.4
  • Passman 2.2.1

Cloud server: Nextcloud or ownCloud
Tested on:

  • NC 13
  • NC 14
  • NC 15
Note
Cloud log
Cloud log
{
  "reqId": "CENSORED",
  "level": 3,
  "time": "2018-12-24T16:22:46+00:00",
  "remoteAddr": "127.0.0.1",
  "user": "CENSORED",
  "app": "index",
  "method": "GET",
  "url": "\\/index.php\\/apps\\/passman\\/api\\/v2\\/file\\/undefined",
  "message": {
    "Exception": "OCP\\AppFramework\\Db\\DoesNotExistException",
    "Message": "Did expect one result but found none when executing: query \"SELECT * FROM `*PREFIX*passman_files` WHERE `id` = ? and `user_id` = ? \"; parameters Array\n(\n    [0] => undefined\n    [1] => CENSORED\n)\n; limit \"\"; offset \"\"",
    "Code": 0,
    "Trace": [
      {
        "file": "\\/snap\\/nextcloud\\/10255\\/htdocs\\/lib\\/public\\/AppFramework\\/Db\\/Mapper.php",
        "line": 372,
        "function": "findOneQuery",
        "class": "OCP\\AppFramework\\Db\\Mapper",
        "type": "->",
        "args": [
          "SELECT * FROM `*PREFIX*passman_files` WHERE `id` = ? and `user_id` = ? ",
          [
            "undefined",
            "CENSORED"
          ],
          null,
          null
        ]
      },
      {
        "file": "\\/var\\/snap\\/nextcloud\\/10255\\/nextcloud\\/extra-apps\\/passman\\/lib\\/Db\\/FileMapper.php",
        "line": 55,
        "function": "findEntity",
        "class": "OCP\\AppFramework\\Db\\Mapper",
        "type": "->",
        "args": [
          "SELECT * FROM `*PREFIX*passman_files` WHERE `id` = ? and `user_id` = ? ",
          [
            "undefined",
            "CENSORED"
          ]
        ]
      },
      {
        "file": "\\/var\\/snap\\/nextcloud\\/10255\\/nextcloud\\/extra-apps\\/passman\\/lib\\/Service\\/FileService.php",
        "line": 53,
        "function": "getFile",
        "class": "OCA\\Passman\\Db\\FileMapper",
        "type": "->",
        "args": [
          "undefined",
          "CENSORED"
        ]
      },
      {
        "file": "\\/var\\/snap\\/nextcloud\\/10255\\/nextcloud\\/extra-apps\\/passman\\/controller\\/filecontroller.php",
        "line": 58,
        "function": "getFile",
        "class": "OCA\\Passman\\Service\\FileService",
        "type": "->",
        "args": [
          "undefined",
          "CENSORED"
        ]
      },
      {
        "file": "\\/snap\\/nextcloud\\/10255\\/htdocs\\/lib\\/private\\/AppFramework\\/Http\\/Dispatcher.php",
        "line": 166,
        "function": "getFile",
        "class": "OCA\\Passman\\Controller\\FileController",
        "type": "->",
        "args": [
          "undefined"
        ]
      },
      {
        "file": "\\/snap\\/nextcloud\\/10255\\/htdocs\\/lib\\/private\\/AppFramework\\/Http\\/Dispatcher.php",
        "line": 99,
        "function": "executeController",
        "class": "OC\\AppFramework\\Http\\Dispatcher",
        "type": "->",
        "args": [
          {
            "__class__": "OCA\\Passman\\Controller\\FileController"
          },
          "getFile"
        ]
      },
      {
        "file": "\\/snap\\/nextcloud\\/10255\\/htdocs\\/lib\\/private\\/AppFramework\\/App.php",
        "line": 118,
        "function": "dispatch",
        "class": "OC\\AppFramework\\Http\\Dispatcher",
        "type": "->",
        "args": [
          {
            "__class__": "OCA\\Passman\\Controller\\FileController"
          },
          "getFile"
        ]
      },
      {
        "file": "\\/snap\\/nextcloud\\/10255\\/htdocs\\/lib\\/private\\/AppFramework\\/Routing\\/RouteActionHandler.php",
        "line": 47,
        "function": "main",
        "class": "OC\\AppFramework\\App",
        "type": "::",
        "args": [
          "OCA\\Passman\\Controller\\FileController",
          "getFile",
          {
            "__class__": "OC\\AppFramework\\DependencyInjection\\DIContainer"
          },
          {
            "file_id": "undefined",
            "_route": "passman.file.getFile"
          }
        ]
      },
      {
        "function": "__invoke",
        "class": "OC\\AppFramework\\Routing\\RouteActionHandler",
        "type": "->",
        "args": [
          {
            "file_id": "undefined",
            "_route": "passman.file.getFile"
          }
        ]
      },
      {
        "file": "\\/snap\\/nextcloud\\/10255\\/htdocs\\/lib\\/private\\/Route\\/Router.php",
        "line": 297,
        "function": "call_user_func",
        "args": [
          {
            "__class__": "OC\\AppFramework\\Routing\\RouteActionHandler"
          },
          {
            "file_id": "undefined",
            "_route": "passman.file.getFile"
          }
        ]
      },
      {
        "file": "\\/snap\\/nextcloud\\/10255\\/htdocs\\/lib\\/base.php",
        "line": 987,
        "function": "match",
        "class": "OC\\Route\\Router",
        "type": "->",
        "args": [
          "\\/apps\\/passman\\/api\\/v2\\/file\\/undefined"
        ]
      },
      {
        "file": "\\/snap\\/nextcloud\\/10255\\/htdocs\\/index.php",
        "line": 42,
        "function": "handleRequest",
        "class": "OC",
        "type": "::",
        "args": []
      }
    ],
    "File": "\\/snap\\/nextcloud\\/10255\\/htdocs\\/lib\\/public\\/AppFramework\\/Db\\/Mapper.php",
    "Line": 284,
    "CustomMessage": "--"
  },
  "userAgent": "Mozilla\\/5.0 (Macintosh; Intel Mac OS X 10_14_1) AppleWebKit\\/605.1.15 (KHTML, like Gecko) Version\\/12.0.1 Safari\\/605.1.15",
  "version": "15.0.0.10"
}```
</details>



<bountysource-plugin>

---
Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/67954348-cannot-export-passwords?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).
</bountysource-plugin>

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the CSV export flow and inspect the request to the passman.file.getFile route, especially the undefined file_id shown in the log. Read lib/Service/FileService.php, lib/Db/FileMapper.php, and controller/filecontroller.php; done means exporting credentials produces a downloadable CSV instead of remaining at “Starting export” and “Decrypting credentials”.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, php
Domain
api, backend, full-stack
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.