godotengine / godot-asset-library

PHP frontend for Godot Engine's asset library
https://godotengine.org/asset-library
MIT License
292 stars 87 forks source link

Repo URL validation: raise error or strip trailing ".git" #148

Closed akien-mga closed 6 years ago

akien-mga commented 6 years ago

Recently I've had several edits where people put a GitHub or GitLab URL ending in .git, e.g. https://godotengine.org/asset-library/asset/edit/786

This is valid for the URL itself (redirects to the same URL without the .git ending), but it generates an invalid download link for the zip. So it would better to prevent submitting an asset with this .git URL, or to strip it automatically.

akien-mga commented 6 years ago

Bump, it's pretty tiresome to have to handle this manually when validating an asset with a wrong URL.

bojidar-bg commented 6 years ago

(forgot to mention in the commit) fixed by 1672826e19aa4a0c80d3340162b2981ed34e75dd.