Skip to content
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

Enforce survey URL length in UI #18814

Open
wants to merge 1 commit into
base: 10.0/bugfixes
Choose a base branch
from

Conversation

cconard96
Copy link
Contributor

@cconard96 cconard96 commented Jan 27, 2025

Checklist before requesting a review

Please delete options that are not relevant.

  • I have read the CONTRIBUTING document.
  • I have performed a self-review of my code.

Description

Fixes #18804
Enforce the maximum length of an external survey URL in the UI

@trasher
Copy link
Contributor

trasher commented Jan 27, 2025

Tests are failing

Copy link
Member

@cedric-anne cedric-anne left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The max length of inline rows in MySQL is 65535 bytes. The glpi_entities table has many rows and using 8096 for 2 of them is not possible without riching this limit. I guess we could use TEXT datatype instead of VARCHAR. This field is unlikely to be used in search operations, and there is a cache on entities configuration that will mitigate any negative performance impact.

@trasher
Copy link
Contributor

trasher commented Jan 27, 2025

Also, +1 for using text type, I was wondering if initial proposed change was a good idea.

@cconard96 cconard96 force-pushed the enhance/longer_inquest_urls branch from 1d2b68c to 4ea60d5 Compare January 27, 2025 11:57
@cconard96 cconard96 changed the base branch from main to 10.0/bugfixes January 27, 2025 11:57
@cconard96 cconard96 changed the title Increase survey URL length Enforce survey URL length in UI Jan 27, 2025
@cconard96
Copy link
Contributor Author

PR has been changed to only enforce the max length in the UI to avoid user confusion

@trasher
Copy link
Contributor

trasher commented Jan 27, 2025

I'm not sure limiting an URL to 255 characters is the right solution.... Some URLs may be way longer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

External Survey URL limit to only 243 characters
3 participants