Security fixes

This commit is contained in:
2024-07-23 19:36:56 +10:00
parent 244999138c
commit 03bbc7a1dc
3 changed files with 10 additions and 10 deletions

View File

@@ -3,16 +3,16 @@ module Micropub
module Posts
class SyndicationUrlToSource
def call(url:)
if url.match("https://social.dnitza.com")
if url.match?(/https:\/\/((social)\.)dnitza.com/)
return :mastodon
end
if url.match("https://bsky.social")
if url.match?("https://bsky.social")
return :bluesky
end
if url.match("https://gist.github.com")
return :gist
if url.match?(/https:\/\/((gist)\.)?github\.com/)
:gist
end
end
end