Skip to content

Commit

Permalink
add chess.com blacklist / replacement
Browse files Browse the repository at this point in the history
  • Loading branch information
Unihedro committed Feb 1, 2016
1 parent 00ae6d6 commit fb931f8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion modules/security/src/main/Spam.scala
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ object Spam {
* refer links grant the referrer money,
* effectively inducing spam */
"velocitychess.com/ref/",
"chess24.com?ref="
"chess24.com?ref=",
"chess.com/register?refId="
)

def replace(text: String) = replacements.foldLeft(text) {
Expand All @@ -22,5 +23,6 @@ object Spam {
private val replacements = List(
"""velocitychess.com/ref/\w+""".r -> "velocitychess.com",
"""chess24.com?ref=\w+""".r -> "chess24.com"
"""chess.com/register?refId=\w+""" -> "chess.com/register"
)
}

0 comments on commit fb931f8

Please sign in to comment.