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:
Vitor Pamplona
2025-09-02 12:37:38 -04:00
parent 35146cc794
commit 8db90728aa

View File

@@ -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)