praeclarum / FuGetGallery

An alternative web UI for browsing nuget packages
https://www.fuget.org
MIT License
683 stars 121 forks source link

Special-case the MySql.Data GPL license #91

Closed bgrainger closed 4 years ago

bgrainger commented 4 years ago

FuGet incorrectly identifies MySql.Data as using the MIT license: https://www.fuget.org/packages/MySql.Data

This occurs because the license URL is https://downloads.mysql.com/docs/licenses/connector-net-8.0-gpl-en.pdf which doesn't match any known license. When this file is downloaded, its plain text (of the PDF source) arbitrarily matches "MIT License", which occurs in the file.

Rather than adding more sophisticated logic for (for example) only string matching on files <1KB or rejecting matches on multiple licenses, this simply hard-codes MySql.Data's license URL as matching GPL 2 (which is the license claimed by the package).

praeclarum commented 4 years ago

Oh my, what an odd failure case. Yeah, I think I would prefer better logic but will take this for now!