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

Very Long String for Slug Field Leads to HTTP Error 414 #188

Open
kmart-sgen opened this issue Jun 16, 2023 · 1 comment
Open

Very Long String for Slug Field Leads to HTTP Error 414 #188

kmart-sgen opened this issue Jun 16, 2023 · 1 comment
Labels

Comments

@kmart-sgen
Copy link

Bug Description
When creating a new blog post the user/author can select a slug name that is very long, leading to HTTP error 414. Occasionally, during testing, this led to an unstable website. Please note that this instability may have been browser side as the string input to the slug field is... large.

To Reproduce
Steps to reproduce the behavior:

  1. Sign in to Miniblog.Core
  2. Click on 'New post'
  3. Fill out all required fields, EXCEPT slug (save for last)
  4. Copy the very long string included in the attached file (very likely this string is much longer than necessary to trigger the bug)
  5. Paste the very long string in to the slug field
  6. Immediately start clicking on 'Save', keep clicking on it until the post is saved
  7. Once post is saved, HTTP Error 414 will show (see screenshot)

Expected behavior
The slug field should have a more reasonable character count enforcement/limitation. This restriction should be enforce both on the client side (the slug field itself) as well as server side (validation of the character count of the slug field).

Screenshots
Example screenshot of the error message displayed when a very long slug is provided.
miniblog core-http414-bug

"Payload" for slug field (really long string)
miniblog-core_slug_http414-bug.txt

@kmart-sgen kmart-sgen added the bug label Jun 16, 2023
@damlaYasarr
Copy link
Contributor

damlaYasarr commented Sep 18, 2023

hello! I try to figure out the problem and found some tips. If we put "[Route("/blog/{slug?:regex(^[[a-z0-9-]]+$)}")]" instead of "[Route("/blog/{slung?}]".. Does it work?

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

No branches or pull requests

2 participants