Page MenuHomePhabricator

Check for valid URLs in the file source text input for someone else's work
Open, Needs TriagePublic

Description

The input field in T347750: [M] Redesign entering the source of the file for someone else's work expects free text that may include a URL.
If we don’t enforce any validation besides the current text length, then there’s a risk that a user may input arbitrary text.

Tasks

  • search for a URL within the input
  • add an error message if it’s malformed

Event Timeline

@mfossati this sounds like a lot of work (parsing/regexing through the text, validating the URL(s), displaying an error message) for something that has very little possibility of actually happening, and very little negative impact if it does? Are we seeing issues with this somewhere?

@mfossati this sounds like a lot of work (parsing/regexing through the text, validating the URL(s), displaying an error message) for something that has very little possibility of actually happening, and very little negative impact if it does? Are we seeing issues with this somewhere?

Perhaps I made the task description too broad: what I essentially meant is just a regular expression that matches a website and a warning if none is found.
We're explicitly asking the user to enter a website, although I acknowledge a full URL might not occur often.

We're explicitly asking the user to enter a website, although I acknowledge a full URL might not occur often.

With T347750#9332285 we'll actually ask for a link, thus increasing the chance of a URL.

We're explicitly asking the user to enter a website, although I acknowledge a full URL might not occur often.

With T347750#9332285 we'll actually ask for a link, thus increasing the chance of a URL.

We're asking for a "website link, book, or other source", so requiring a URL and/or warning in case a URL isn't found doesn't seem like a good idea, unless I'm misunderstanding what's happening here.