neon icon indicating copy to clipboard operation
neon copied to clipboard

Support endpoints with password confirmation

Open provokateurin opened this issue 2 years ago • 7 comments

To use those endpoints the password has to be entered by the user and sent to https://github.com/nextcloud/server/blob/1612d025cf21ac0ae70327c46dd59be66c096627/core/Controller/LoginController.php#L362. This endpoint is currently not reachable for us and we would need to support CSRF endpoints too (which is some more work). The better approach would probably be to open up the endpoint and allow us to use it.

provokateurin avatar Jan 21 '24 18:01 provokateurin

Let's see where this goes https://github.com/nextcloud/server/pull/43000

provokateurin avatar Jan 21 '24 19:01 provokateurin

Ok, so this is actually a bug in the server auth logic. I will make a fix and then we have to wait for new releases of all the versions we support :/

provokateurin avatar Jan 22 '24 16:01 provokateurin

This will fix it https://github.com/nextcloud/server/pull/43034

provokateurin avatar Jan 22 '24 18:01 provokateurin

In the end we went with https://github.com/nextcloud/server/pull/43668. We will have to handle the errors in a generic way to display the dialog to do the password confirmation. On unsupported versions we will just have to say that it is not possible to execute the action.

provokateurin avatar Feb 20 '24 15:02 provokateurin

Is there any way we can unblock this? You meant that it is only an issue when sending cookies; we should be able to patch our client to not send them (at least on non web platforms).

I think #1580 should make this really easy.

Leptopoda avatar Feb 26 '24 18:02 Leptopoda

No this is different from the WebDAV thing. There is no way around this, it will only be available on server 29+.

provokateurin avatar Feb 26 '24 18:02 provokateurin

This can be implemented now (but only on 29+)

provokateurin avatar May 07 '24 15:05 provokateurin

I thought this would be not so easy to implement, but we can simply assume that only API endpoints called within wrapAction can trigger the password confirmation. We can simply catch the error there and show the dialog and afterwards retry. I first thought it would be necessary to mess around with the RequestManager so it also supports password confirmation for the cached endpoints, but that is simply not required.

provokateurin avatar Jun 05 '24 09:06 provokateurin

Actually done already, just not in the framework so far (I'm working on it).

provokateurin avatar Jul 28 '24 12:07 provokateurin