server icon indicating copy to clipboard operation
server copied to clipboard

Keep list of expired public shares

Open pjrobertson opened this issue 7 years ago • 6 comments

I'm not sure if I've got this 100% right, but it seems like the XX_share table in the database is being pruned to remove public links that have 'expired'. I can understand the reasoning for this (reduce the size of the XX_share table), however the negative usability impact is as follows:

  1. I share a public link with Person A outside my organisation, link expires in 30 days
  2. After 40 days, Person A gets back to me saying they've only just got round to checking my link, and it's expired. They are presented with a fairly unhelpful message The document could not be found on the server. Maybe the share was deleted or has expired? (or see image below):

Screenshot 2019-11-19 at 16 55 45

  1. I decide to re-share the folder with Person A, but I can't remember which folder I originally shared. Was it folder Super Secret No.1 or Super Secret No.2?

Solution

I think public links should not be removed from XX_share, or if pruning is really necessary, they should be put in a XX_share_expired table. Following this: a) I can now see expired links in the 'shares' section of my account, and restore links if need be (that would be to alter the expiration date to 'some time in the future' b) We can change the unhelpful message The document could not be found on the server. Maybe the share was deleted or has expired? to something like Access to the document you are trying to access has expired - since we know it's not a 'deleted' issue.

Other (potential) benefits:

  1. Helps avoid token collisions (Ok, the likelihood of this every happening is tiny): a) I share a folder with Person A for 30 days. Share token is ABCD b) Link expires and token ABCD is removed c) I share another folder with Person B. Share token is ABCD d) There's a chance that Person A might access the folder Person B by mistake.
  2. If I'm logged in and access the expired URL, Nextcloud can tell me "The file XXXX you previously shared expired on YYYY. Do you want to set a new expiration date? [big button for set new expiration date]"

Server: Nextcloud 16.0.4, running on CentOS/Apache (LAMP)

pjrobertson avatar Nov 19 '19 09:11 pjrobertson

cc @rullzer @jancborchardt does it make sense? It could coincide with the "request access to expired share feature request" (somewhre, can't find it)

skjnldsv avatar Dec 09 '19 07:12 skjnldsv

Seems reasonable to me, the use-case make sense. It’s a case for "Deleted shares".

jancborchardt avatar Jan 15 '20 00:01 jancborchardt

@pjrobertson thanks for this, exactly what a client asked me for. He has a lot of shared links with an expiration date. and especially benefit 2 is very helpfull also to extend a shared link.

alexbijma avatar Jun 03 '20 12:06 alexbijma

This would be very useful for our organisation. Sometimes I get tickets because of unaware users complaining "the cloud does not work". If there was a reason exactly why access was denied, this could also reduce the number of tickets for all admins.

tsueri avatar May 25 '22 09:05 tsueri

+1

is this is planned for some forseable future?

wonder-wanderer avatar May 01 '23 10:05 wonder-wanderer

Related: #20869

joshtrichards avatar Mar 26 '25 20:03 joshtrichards