mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 09:07:52 +08:00
Fix link protocol allowlist allowing too much
This commit is contained in:
parent
a2df123c6d
commit
d3cc6dbaa0
@ -28,7 +28,7 @@ namespace osu.Game.Online.Chat
|
||||
// http[s]://<domain>.<tld>[:port][/path][?query][#fragment]
|
||||
private static readonly Regex advanced_link_regex = new Regex(
|
||||
// protocol
|
||||
@"(?<link>(https?|osu)[a-z]*?:\/\/" +
|
||||
@"(?<link>(https?|osu(mp)?):\/\/" +
|
||||
// domain + tld
|
||||
@"(?<domain>(?:[a-z0-9]\.|[a-z0-9][a-z0-9-]*[a-z0-9]\.)*[a-z0-9-]*[a-z0-9]" +
|
||||
// port (optional)
|
||||
|
Loading…
Reference in New Issue
Block a user