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

checks the length of the title before saving(base: dev/10.3.0) #1604

Merged

Conversation

chrissolanilla
Copy link

@chrissolanilla chrissolanilla commented Sep 6, 2024

For issue #1598 , if a creator enters in a title with a length of 101 characters or more it will return a 403 error.

Changes:
In the const save = (instanceName, qset, version = 1) => { part of the code before it does anything I first get the length of instanceName and check if its greater than 100. If it is then I run the built in setAlertDialog({ function and return early notifying to the creator that the title length is too long.

Copy link
Member

@clpetersonucf clpetersonucf left a comment

Choose a reason for hiding this comment

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

Does the job. Just two small nit-picks, plus: Materia uses tabs, not spaces, please convert your indentation to tabs.

src/components/widget-creator.jsx Outdated Show resolved Hide resolved
src/components/widget-creator.jsx Outdated Show resolved Hide resolved
Copy link
Member

@clpetersonucf clpetersonucf left a comment

Choose a reason for hiding this comment

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

LGTM

@clpetersonucf clpetersonucf merged commit 549f736 into ucfopen:dev/10.3.0 Sep 9, 2024
2 checks passed
@chrissolanilla chrissolanilla deleted the 1598/title-length-limit branch September 25, 2024 12:39
@clpetersonucf clpetersonucf mentioned this pull request Oct 2, 2024
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.

2 participants