Updated on 2026-08-14

This commit is contained in:
Tangem 2025-05-30 14:24:44 +05:00
commit e33bd4d849
13 changed files with 255 additions and 50 deletions

View file

@ -6,6 +6,7 @@ import android.content.Intent
* Key to pass deeplink via intent
*/
const val DEEPLINK_KEY = "deeplink"
const val WEBLINK_KEY = "link"
// TODO: Add tests
/**

View file

@ -0,0 +1,12 @@
package com.tangem.utils.extensions
private const val DEEPLINK_VALIDATION_REGEX = "['\";<>()+\\\\]"
/**
* Check for malicious symbol in uri part
*/
fun String.uriValidate(): Boolean {
val regex = DEEPLINK_VALIDATION_REGEX.toRegex()
return !regex.containsMatchIn(this)
}