coffeebank / coffee-maubot

Matrix bot plugins for Maubot 🍢 Add link previews, choose, and other tools to your Matrix chat ☕
https://coffeebank.github.io/coffee-maubot
11 stars 5 forks source link

urlpreview: Support URLs other than https #11

Closed coffeebank closed 1 year ago

coffeebank commented 1 year ago

Originally posted by @ajkessel in https://github.com/coffeebank/coffee-maubot/issues/9#issuecomment-1694699860

Thanks for fixing this so quickly. Is it necessary to limit URLs to https? In my copy, I added a ? after s in the regexp.

coffeebank commented 1 year ago

The initial reason for only supporting https is because URL and user blacklists have not been added yet, and http links are considered insecure.

Since URL and user blacklists are releasing soon, I would be open to adding support for http as well.

Do you happen to have the regex on hand? Edit: Added in https://github.com/coffeebank/coffee-maubot/commit/ae8298b43ad93065236d175d5883ebe34172d1b9