cygri / prefix.cc

Source code to the prefix.cc website
http://prefix.cc/
The Unlicense
38 stars 10 forks source link

Namespace URIs longer than 100 characters are silently truncated #29

Closed cygri closed 4 years ago

cygri commented 4 years ago

The database column that stores namespace URIs is 100 characters long. When longer URIs are submitted, they get silently truncated to that length. See #28 for a report.

There should be a check that rejects those URIs with an error message pointing out the restriction.

One could also argue for a longer maximum length, but legitimate namespace URIs seem to almost never approach that length (judging from what we currently have in the database, and from the lack of complaints about the restriction), so I think leaving it at 100 is fine.