Last active
November 19, 2022 19:24
-
-
Save dllewellyn/1175143b487b3ac641de4995a1032ced to your computer and use it in GitHub Desktop.
Example of url verification code
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fun mySecureFunction(websiteUrl : String) { | |
val isSafe = websiteUrl.urlVerification { | |
"safetorun.com".allowHost() | |
} | |
if (isSafe) { | |
loadUrl(websiteUrl) | |
} | |
} | |
mySecureFunction("https://evil-website.com") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment