url input with 256 characters max length is not enough #403

Closed
opened 2025-11-09 09:48:33 -06:00 by GiteaMirror · 2 comments
Owner

Originally created by @doceazedo on GitHub (Aug 28, 2024).

bug description

the url input has an artificial limit of maxlength="256" which is not enough for soundcloud links that can be up to 305 characters long:

  • 22 chars long base url (https://soundcloud.com)
  • slash + up to 25 chars long username
  • slash + up to 255 chars long track slug
  • trailing slash

reproduction steps

  1. go to cobalt.tools
  2. paste a valid soundcloud track url such as https://soundcloud.com/introspecboy/m13-me-maceta-me-maceta-me-maceta-me-maceta-me-maceta-me-maceta-me-maceta-me-maceta-me-maceta-me-maceta-me-maceta-me-maceta-me-maceta-me-maceta-me-maceta-me-maceta-me-maceta-me-maceta-me-maceta-me-maceta-me-maceta-me-maceta-me-maceta
  3. see the url is cut off

screenshots

CleanShot 2024-08-28 at 09 51 55@2x CleanShot 2024-08-28 at 09 51 28@2x
Max username length Max track slug length

platform information

  • os: macOS Sonoma 14.5
  • browser: ungoogled chromium
  • version: 120

additional context

changing the maxlength to "305" on #url-input-area fixes this issue. i suggest bumping it to "512" tho since it's the next power of two that works. happy to open a pr if maintainers agree on this.

Originally created by @doceazedo on GitHub (Aug 28, 2024). ### bug description the url input has an artificial limit of `maxlength="256"` which is not enough for soundcloud links that can be up to 305 characters long: - 22 chars long base url (`https://soundcloud.com`) - slash + up to 25 chars long username - slash + up to 255 chars long track slug - trailing slash ### reproduction steps 1. go to [cobalt.tools](https://cobalt.tools/) 2. paste a valid soundcloud track url such as `https://soundcloud.com/introspecboy/m13-me-maceta-me-maceta-me-maceta-me-maceta-me-maceta-me-maceta-me-maceta-me-maceta-me-maceta-me-maceta-me-maceta-me-maceta-me-maceta-me-maceta-me-maceta-me-maceta-me-maceta-me-maceta-me-maceta-me-maceta-me-maceta-me-maceta-me-maceta` 4. see the url is cut off ### screenshots | ![CleanShot 2024-08-28 at 09 51 55@2x](https://github.com/user-attachments/assets/70dac140-0dcf-492d-a871-d5969a777eea) | ![CleanShot 2024-08-28 at 09 51 28@2x](https://github.com/user-attachments/assets/2a0b2e3d-7d44-4ce4-ad63-faf165347dd0) | |---------------------|-----------------------| | Max username length | Max track slug length | ### platform information - os: macOS Sonoma 14.5 - browser: ungoogled chromium - version: 120 ### additional context changing the `maxlength` to "305" on `#url-input-area` fixes this issue. i suggest bumping it to "512" tho since it's the next power of two that works. happy to open a pr if maintainers agree on this.
GiteaMirror added the bug label 2025-11-09 09:48:33 -06:00
Author
Owner

@lostdusty commented on GitHub (Aug 29, 2024):

o nome da musica 😭

@lostdusty commented on GitHub (Aug 29, 2024): o nome da musica 😭
Author
Owner

@doceazedo commented on GitHub (Sep 13, 2024):

Fixed by f7da62e817

@doceazedo commented on GitHub (Sep 13, 2024): Fixed by https://github.com/imputnet/cobalt/commit/f7da62e817d36d05e2ec9ab9512931472869d3a5
Sign in to join this conversation.