mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2025-09-26 14:56:21 +02:00
Removes wss://%2A%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00.isekco.re/
This commit is contained in:
@@ -93,8 +93,10 @@ class RelayUrlNormalizer {
|
||||
|
||||
@OptIn(ExperimentalContracts::class)
|
||||
fun fix(url: String): String? {
|
||||
if (url.length < 3) return null
|
||||
if (url.length > 100) {
|
||||
if (url.length < 4) return null
|
||||
if (url.length > 50) {
|
||||
if (url.indexOf("%00") > -1) return null
|
||||
|
||||
// removes multiple urls in the same line
|
||||
val schemeIdx = url.indexOf("://")
|
||||
val nextScheme = url.indexOf("://", schemeIdx + 3)
|
||||
|
Reference in New Issue
Block a user