Skip to main content
2 of 2
added 134 characters in body
Ja1024
  • 23.5k
  • 2
  • 59
  • 70

You should save all user-provided reference URLs in the database, but only display those whose target is known to be both non-malicious and accurate. For this purpose, create an (extensible) whitelist of trusted domains.

If you don't know the URL yet, then don't show it at all – for most people, not having a reference is likely preferable over ending up on a site that contains malicious, illegal or just nonsensical data. You should still save all user-provided URLs and check whether it's worth extendeding the whitlist of trusted domains. For example, if you see lots of URLs pointing to some popular dictionary which you weren't aware of, then you could simply re-classify those URLs, so that they will be shown from now on.

To make monitoring the submitted URLs easier, group and count them by domain. Then you can, for example, occasionally check the top 10.

Ja1024
  • 23.5k
  • 2
  • 59
  • 70