-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: NC 26 overwrites storage_id
with mount_id
in mounts
table causing various issues with shares and mounts down the line
#37473
Comments
Cc @icewind1991 |
Is there any work/progress ongoing in this, which is not visible here? |
26.0.1 seems to fix it (at least for us) |
This is not fixed, but it is quite a breaking bug. A fix would be highly appreciated! |
After upgrade to NC 26.0.1 one user "userA" with external storage enabled now sees the activity stream of another user "user B"... I assume this must be caused by this issue. |
After double checking I got further feedback from users of my nextcloud instance who now see the activity of other nextcloud users. For those cases I can confirm that numeric_id (oc_storages) and storage_id and mount_id (oc_mounts) are identical. This issue seems to leak private data (activity stream) and can cause data lost (by means of lost shares). @icewind1991 isn't it required to raise the importance of this issue? |
@szaimen @icewind1991 what is the progress on this issue? |
I cannot reproduce this issue locally.
When the Can you try applying the following debug patch: 1ae6e04 And provide the generated log items from when the incorrect values are written. |
The Here's the logs:
|
Here's a snapshot of some lines of the
Edit: Just realized that I actually know where the change in the Edit 2: Updated the table to include another example from the DB where I didn't mess around with the share settings in recent months |
In case this helps: LogsMultiple variations of this log:
Multiple variations of this log:
Finally the log that changes the line back:
No new lines were actually added to the DB; |
After a couple of hours of digging through the code, I found the culprit! Commit e3bafcc from 3 months ago introduces this bug, but not for the reason you think: The commit adds a new variable HOWEVER: the class server/apps/files_external/lib/Lib/PersonalMount.php Lines 35 to 41 in fc371fa
The variable over there actually contains the server/apps/files_external/lib/Config/ConfigAdapter.php Lines 153 to 164 in e785ae3
This now causes the new "caching code" to suddenly return the To fix this issue on my instance, I just renamed the property I'm not sure if that is the correct way; it might actually be a good idea to completely drop the |
…unt.php so that it doesn't override `numericStorageId` in the `MountPoint` baseclass fixes nextcloud#37473 fixes nextcloud#37414 Signed-off-by: Daniel <7558512+DerGenaue@users.noreply.github.com>
I had the same problem. Renaming the var solved it, thanks |
Did anyone have a fix for it..? I've seen today this problem with NC28 Raspberry Pi 5 Ububtu Server 24 LTS.. I run Nextcloud via snap.. On the files in the external drive there's no sharing button, in the files uploaded on the SD is present and works regularly.. Thanks |
Bug description
After the update to Nextcloud 26, all
storage_id
fields in themounts
table are overridden with themount_id
value, if it exists.This causes a multitude of issues down the line:
numeric_id
of that storage happens to line up with amount_id
of an external storageI tried manually changing back the
storage_id
field back to the correct value, and it was changed back to the incorrect one immediatelySteps to reproduce
(Not tested)
Expected behavior
storage_id
fields in themounts
table contain thenumeric_id
of thestorages
table that they belong to.Installation method
Community Web installer on a VPS or web space
Nextcloud Server version
26
Operating system
Debian/Ubuntu
PHP engine version
PHP 8.1
Web server
Apache (supported)
Database engine version
MySQL
Is this bug present after an update or on a fresh install?
Updated to a major version (ex. 22.2.3 to 23.0.1)
Are you using the Nextcloud Server Encryption module?
None
What user-backends are you using?
Configuration report
No response
List of activated Apps
Nextcloud Signing status
No response
Nextcloud Logs
No response
Additional info
No response
The text was updated successfully, but these errors were encountered: