Share Links: Change Token Length


I want to change the length of the token when creating share links, e.g. instead of https://mynextcloud/index.php/s/abcdefghijklmno I want https://mynextcloud/index.php/s/abcdefghijklmnopqrstuvwx


/lib/private/Share/Constants.php in line 82

You can find

const TOKEN_LENGTH = 15; // old (oc7) length is 32, keep token length in db at least that for compatibility

I want a token length of at least 24. Is it safe to change from 15 to 24? I must admit I don’t understand the comment what length should be kept for compatibility reasons. What are the risks when changing the token length?

Thanks for Your help in advance! Best regards…

Nextcloud version 18.0.6
Apache version 2.4
PHP version 7.3