only http requests should be valid

This commit is contained in:
Aaron Bieber 2022-11-04 09:43:21 -06:00
parent f46694f8bb
commit 8f5785a591
No known key found for this signature in database

View File

@ -89,7 +89,7 @@ func hasService(s string, enabled bool) string {
func (s *Songwhip) Process(from, post string) string {
musicURL := s.fix(post)
if musicURL != "" {
_, err := url.Parse(musicURL)
_, err := url.ParseRequestURI(musicURL)
if err != nil {
return fmt.Sprintf("Please don't abuse this free service. that's not a real url: %q", musicURL)
}