Skip to content

[Bug]: public shares: Over-length custom token: Fails silently #61416

@labor4

Description

@labor4

⚠️ This issue respects the following points: ⚠️

Bug description

In public shares,

  • setting a custom token
  • with too long a string
  • fails with error, but no info why

32 chars seems to be the limit.

Steps to reproduce

  1. create pub share
  2. set custom token (ie "skdcjiwddhvsdfjhsbjhb-ABC-WWWWWWW-INFO-COLLECTION"
  3. Save: Result: Error

Expected behavior

Should hint with "maximum characters of 32 reached"

Nextcloud Server version

33

Operating system

None

PHP engine version

None

Web server

None

Database engine version

PostgreSQL

Is this bug present after an update or on a fresh install?

Fresh Nextcloud Server install

Are you using the Nextcloud Server Encryption module?

Encryption is Disabled

What user-backends are you using?

  • Default user-backend (database)
  • LDAP/ Active Directory
  • SSO - SAML
  • Other

Configuration report

List of activated Apps

Nextcloud Signing status

Nextcloud Logs

An exception occurred while executing a query: SQLSTATE[22001]: String data, right truncated: 7 ERROR: value too long for type character varying(32)

Additional info

String Length Checks:

this 33 chars FAILS:

echo -n "skdcjiwddhvsdfjhsbjhb-ABC-WWWWWWW" |wc -c
      33

this 32 chars SUCCEEDS

echo -n "skdcjiwddhvsdfjhsbjhb-ABC-WWWWWW" |wc -c
      32

Metadata

Metadata

Assignees

No one assigned

    Labels

    0. Needs triagePending check for reproducibility or if it fits our roadmap33-feedbackbug

    Type

    No fields configured for Bug.

    Projects

    Status
    To triage

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions