marius-wieschollek / passwords

A simple, yet feature rich password manager for Nextcloud
GNU Affero General Public License v3.0
202 stars 40 forks source link

[BUG]: Saves new values after changes but shows old values until refreshing browser page #581

Closed Walsonde closed 8 months ago

Walsonde commented 1 year ago

⚠️ This issue respects the following points: ⚠️

Server Information

since I don't have SSH access to the server, I had to do this via occweb. I don't know if that makes any difference.
Here's the output:

The current PHP memory limit is below the recommended value of 512MB.
{
    "version": {
        "server": "25.0.4.1",
        "app": "2023.2.22",
        "lsr": false,
        "php": "8.1.16",
        "cronPhp": "8.1.16"
    },
    "environment": {
        "os": "Linux",
        "architecture": "x86_64",
        "bits": 64,
        "database": "mysql",
        "cron": "cron",
        "proxy": false,
        "sslProxy": false,
        "subdirectory": false
    },
    "services": {
        "images": "imagick",
        "favicons": "ddg",
        "previews": "pageres",
        "security": "hibp",
        "words": "wo4snakes",
        "previewApi": false,
        "faviconApi": false
    },
    "status": {
        "autoBackupRestored": false
    },
    "settings": {
        "channel": "stable",
        "nightlies": false,
        "handbook": false,
        "performance": 5
    },
    "encryption": {
        "sse": {
            "SSEv1r1": false,
            "SSEv1r2": true,
            "SSEv2r1": false,
            "SSEv3r1": false,
            "none": false,
            "default": "SSEv1r2"
        },
        "cse": {
            "CSEv1r1": false,
            "none": true,
            "default": "none"
        }
    }
}

Client Information

Browser and Version: Firefox 110.0.1 Client OS and Version: Linux Mint 21.1 Vera

Bug description

I edit any value of a password entry like the password, the username or the details and hit save. Then I hit edit again and there are all the old values. I hit the "X" to close the entry and refresh the browser page by hitting F5 or the refresh icon. Then I have to login again. Now, when I open the entry again, there are all the new values. So obviously it does save but not show the changes.

Steps to reproduce

  1. open an entry with context-click and "Bearbeiten" (probably edit in the english version i suppose)
  2. change any values
  3. hit "Speichern" (save, i guess)
  4. open the same entry again like in 1.
  5. none of the changes are shown, the old values from prior to your changes are still there
  6. close with "X", do not save
  7. refresh browser with F5 or refresh icon
  8. login to passwords
  9. open said entry again like in 1.
  10. now the new values are shown like you changed them in 2.
  11. be confused and unsettled

Expected behavior

  1. open an entry with context-click and "Bearbeiten" (probably edit in the english version i suppose)
  2. change any values
  3. hit "Speichern" (save, i guess)
  4. open the same entry again like in 1.
  5. the new values are shown like you changed them in 2.
  6. be content and rest easy

Nextcloud Logs

none related

Browser Logs

TypeError: e.user is undefined
client.js:1:50171
Content Security Policy: Die Einstellungen der Seite haben das Laden einer Ressource auf inline blockiert ("script-src"). Use.js:17:29
Content Security Policy: Die Einstellungen der Seite haben das Laden einer Ressource auf inline blockiert ("script-src"). Use.js:12:29
GEThttps://wolke.kaiklang.eu/apps/dicomviewer/css/sidebar.css?v=08b3d4e3-56
[HTTP/2 404 Not Found 61ms]

Die Ressource von "https://wolke.kaiklang.eu/apps/dicomviewer/css/sidebar.css?v=08b3d4e3-56" wurde wegen eines MIME-Typ-Konfliktes ("text/html") blockiert (X-Content-Type-Options: nosniff).
passwords
Proxying an event bus of version 2.1.1 with 1.3.0 index.es.js:2337:14
Proxying an event bus of version 2.1.1 with 1.3.0 2 index.es.js:2337:14
Proxying an event bus of version 2.1.1 with 3.0.0 index.js:19:12
jQuery is deprecated: The global jQuery is deprecated. It will be removed in a later versions without another warning. Please ship your own. globals.js:60:15
$ is deprecated: The global jQuery is deprecated. It will be removed in a later versions without another warning. Please ship your own. globals.js:60:15
jQuery is deprecated: The global jQuery is deprecated. It will be removed in a later versions without another warning. Please ship your own. globals.js:60:15
$ is deprecated: The global jQuery is deprecated. It will be removed in a later versions without another warning. Please ship your own. globals.js:60:15
Handlebars is deprecated: please ship your own, this will be removed in Nextcloud 20 globals.js:60:15
Proxying an event bus of version 2.1.1 with 3.0.2 index.js:19:12
jQuery is deprecated: The global jQuery is deprecated. It will be removed in a later versions without another warning. Please ship your own. 2 globals.js:60:15
Proxying an event bus of version 2.1.1 with 3.0.2 ProxyBus.ts:16:20
Proxying an event bus of version 2.1.1 with 3.0.2 ProxyBus.ts:16:20
Proxying an event bus of version 2.1.1 with 1.3.0 index.es.js:2337:14
$ is deprecated: The global jQuery is deprecated. It will be removed in a later versions without another warning. Please ship your own. globals.js:60:15
$ is deprecated: The global jQuery is deprecated. It will be removed in a later versions without another warning. Please ship your own. 2 globals.js:60:15
Proxying an event bus of version 2.1.1 with 1.3.0 index.es.js:2337:14
Proxying an event bus of version 2.1.1 with 3.0.0 index.js:19:12
Proxying an event bus of version 2.1.1 with 3.0.2 app.js:2:21137
Proxying an event bus of version 2.1.1 with 3.0.2 app.js:2:22268
Diese Seite verwendet die nicht standardisierte Eigenschaft "zoom". Stattdessen sollte calc() in den entsprechenden Eigenschaftswerten oder "transform" zusammen mit "transform-origin: 0 0" verwendet werden. app.js:2:1212044
$ is deprecated: The global jQuery is deprecated. It will be removed in a later versions without another warning. Please ship your own.
ObedNyakundi commented 1 year ago

this looks interesting... let me have a look

marius-wieschollek commented 1 year ago

I think the problem may be in the PasswordActions class. It never updates the password after editing it: https://github.com/marius-wieschollek/passwords/blob/master/src/js/Actions/Password/PasswordActions.js#L53