richdocuments icon indicating copy to clipboard operation
richdocuments copied to clipboard

User multiplies like a rabbit when the connection of the mobile client is lost

Open noseshimself opened this issue 3 years ago • 8 comments

Describe the bug I was working on a spreadsheet using the Nextcloud Android client on ChromeOS -- usually a better combination than using the web UI. The link was not that stable and I had to reconnect a few times. Now I have multiple mes editing at once and can't get rid of them:

image

To Reproduce Steps to reproduce the behavior:

  1. Edit in the mobile client
  2. Crash the client
  3. Goto 1.
  4. Edit in the Web app.

Expected behavior I don't exactly know but I would expect that one of me is enough.

Screenshots See above

Client details:

  • OS: Android Client 3.22.3
  • Version 25
  • Device: Lenovo ThinkPad C13 Yoga

Server details

Operating system: Debian 11.5

Web server: nginx

**Database:**mariadb

**PHP version:**8.1

**Nextcloud version:**25

Version of the richdocuments app 7.0.1

Version of Collabora Online 22.5.702

Logs

Nextcloud log (data/nextcloud.log)

I have no access to the logs.

Insert your Nextcloud log here

Browser log

Insert your browser log here, this could for example include:

a) The javascript console log
b) The network log
c) ...

noseshimself avatar Nov 01 '22 13:11 noseshimself

Are you using the built-in CODE server or a dedicated installation of Collabora?

juliusknorr avatar Nov 02 '22 14:11 juliusknorr

Built-in.

I probably have to mention another fact: I'm using a mobile router that tries using a WLAN it is connected to another WLAN and losing that connection from time to time switching over to an LTE connection (with another IP address).

I guess you will need a mechanism to detect reconnections from a different IP address faster than now; it takes a few hours to get rid of all my minions.

noseshimself avatar Nov 03 '22 11:11 noseshimself

@timar @kendy Any idea what that could cause with the built-in CODE server? Is there maybe a timeout that could be decreased for considering users as inactive with the proxy?

juliusknorr avatar Nov 03 '22 12:11 juliusknorr

I would rather try to recognize reconnections.

Define a constant UserDocConnGRMBWRGS-ID (probably a random but eternally constant GUID would be fine)

If a user is showing up opening a document "who is already there", ask him for his UserDocConnGRMBWRGS-ID. If it is the predefined constant, he is a "real user" and will be assigned a unique ID by the (proxy) server. If he provides a valid/active ID, he will be reattached to his session. If he is providing an unkown ID you know something is wrong. Being paranoid I would lock out the user and wait for a written statement signed in blood.

All in all this is smelling of an ugly approach for a DoS attack...

noseshimself avatar Nov 04 '22 09:11 noseshimself

Looks like this is not only on mobile clients. Here someone mentioned this aswell. And I got the same Problem (using it in firefox, connected via ethernet). After some time editing the file the initial document loadscreen appears and the active users get +1.

I got the latest App and Nextcloud Version. Using the build in CODE Server and Saml-Plugin as auth-method.

cuthulino avatar Mar 29 '23 07:03 cuthulino

In our case it happens when the browser tab is closed, not pressing the X on the document. When pressing the X on the document it works as expected - so in our case it was user error.

But, would still be nice to drop the "connection" to the document even when the tab is closed.<

This is when when running the deb package installation with the Enterprise Collabora server.

enoch85 avatar Sep 05 '23 08:09 enoch85

In case you are having an active enterprise subscription, maybe you can reach out through support so we can get Collabora involved accordingly.

juliusknorr avatar Sep 05 '23 09:09 juliusknorr

In case you are having an active enterprise subscription, maybe you can reach out through support so we can get Collabora involved accordingly.

Collabora are now informed.

enoch85 avatar Sep 06 '23 09:09 enoch85