krille-chan / fluffychat

The cutest instant messenger in the [matrix]
https://fluffychat.im/
GNU Affero General Public License v3.0
907 stars 153 forks source link

FluffyChat should assume `m.change_password` capabilitiy is supported if not present per spec #948

Closed girlbossceo closed 3 months ago

girlbossceo commented 3 months ago

Bug Description

A user of my Conduit fork reported that it cannot change its password using FluffyChat. I verified that this behaviour happens on upstream Conduit too, but the button shows up on matrix.org (Synapse).

After digging into how FluffyChat determines the availability of the password change button, it checks /_matrix/client/v3/capabilities for mChangePassword (m.change_password) being explicitly present and true. However, per spec the client should assume this capability is supported if it's not present.

I don't necessarily agree with Ruma omitting these keys to begin with, but FluffyChat should still assume password changes are possible regardless of the lack of the presence of the key.

Steps to Reproduce

  1. Register an account on any Conduit server
  2. Login with FluffyChat
  3. Go to Settings
  4. Go to Security
  5. See that there is no way to change your password

Expected Behavior

Expected behaviour should be that I see the button to change my password.

App Version

All

Additional Platform Information

All

Additional Context

Example response body of capabilities from my fork of Conduit (they are relatively the same):

{
    "capabilities": {
        "m.room_versions": {
            "default": "10",
            "available": {
                "2": "unstable",
                "3": "unstable",
                "4": "unstable",
                "5": "unstable",
                "6": "stable",
                "7": "stable",
                "8": "stable",
                "9": "stable",
                "10": "stable",
                "11": "unstable"
            }
        },
        "m.3pid_changes": {
            "enabled": false
        }
    }
}
krille-chan commented 3 months ago

Thanks for the input. Has been fixed in latest commit :)