Skip to content

Conversation

@max-nextcloud
Copy link
Contributor

@max-nextcloud max-nextcloud commented Sep 2, 2025

This is the same limit we apply to authenticated user display names.

The text app stores guest names in a 64 char database field.

Note that this is counting characters - not bytes.
So languages with multi-byte characters can still use 64 chars in name.

@max-nextcloud max-nextcloud force-pushed the fix/guest-name-size-limit branch from cd62144 to 9d0220c Compare September 2, 2025 14:07
@max-nextcloud max-nextcloud force-pushed the fix/guest-name-size-limit branch from 9d0220c to 4801503 Compare September 2, 2025 14:08
@susnux
Copy link
Contributor

susnux commented Sep 2, 2025

The text app stores guest names in a 64 char database field.
Note that this is counting characters - not bytes.

Depending on the database used this will not work, it is only guaranteed to store 64 bytes then.

@max-nextcloud
Copy link
Contributor Author

max-nextcloud commented Sep 3, 2025

Depending on the database used this will not work, it is only guaranteed to store 64 bytes then.

Could you point me to the database in question? According to https://docs.oracle.com/en/database/oracle/oracle-database/19/refrn/datatype-limits.html oracle does not seem to be an issue:

CHAR: Maximum size: 2000 bytes

Same for Postgres: https://www.postgresql.org/docs/10/datatype-character.html

Both of these types can store strings up to n characters (not bytes) in length:

I also checked mysql and mariadb. sqlite does not have limited length data types afaik.

@max-nextcloud max-nextcloud requested a review from susnux September 3, 2025 06:38
@susnux
Copy link
Contributor

susnux commented Sep 3, 2025

Both of these types can store strings up to n characters (not bytes) in length:

But this depends on the encoding used on the database which is not always utf8 (see their mysql variants)

@max-nextcloud max-nextcloud force-pushed the fix/guest-name-size-limit branch from 4801503 to 6e98445 Compare September 3, 2025 15:12
This is the same limit we apply to authenticated user display names.

The text app stores guest names in a 64 char database field.

Note that this is counting characters - not bytes.
So languages with multi-byte characters can still use 64 chars in name.

Signed-off-by: Max <[email protected]>
@max-nextcloud max-nextcloud force-pushed the fix/guest-name-size-limit branch from 6e98445 to ab78849 Compare September 3, 2025 15:16
@max-nextcloud
Copy link
Contributor Author

@susnux adjusted according to your proposal.

@susnux susnux merged commit a422b67 into main Sep 3, 2025
12 checks passed
@susnux susnux deleted the fix/guest-name-size-limit branch September 3, 2025 16:28
@susnux susnux added bug Something isn't working 3. to review labels Sep 3, 2025
@susnux
Copy link
Contributor

susnux commented Sep 3, 2025

/backport to stable6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants