Emufarmers has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/53124


Change subject: Add a default blacklist for FancyCaptcha.
......................................................................

Add a default blacklist for FancyCaptcha.

Bug 16166 indicates that Wikimedia already has a blacklist for this.
If someone wants to make it public, feel free to replace this with it.

Bug: 21025
Change-Id: I93eeaead4a86b38cf5aa0049ac5e61e5b4935b58
---
A blacklist
M captcha.py
2 files changed, 18 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ConfirmEdit 
refs/changes/24/53124/1

diff --git a/blacklist b/blacklist
new file mode 100644
index 0000000..92a0ce5
--- /dev/null
+++ b/blacklist
@@ -0,0 +1,17 @@
+shit
+piss
+fuck
+cunt
+cock
+fuck
+tit
+ass
+bitch
+whore
+dick
+twat
+pussy
+butt
+penis
+sex
+anus
diff --git a/captcha.py b/captcha.py
index 3d13c05..58637e3 100644
--- a/captcha.py
+++ b/captcha.py
@@ -191,7 +191,7 @@
        parser.add_option("--font", help="The font to use (required)", 
metavar="FONT.ttf")
        parser.add_option("--font-size", help="The font size (default 40)", 
metavar="N", type='int', default=40)
        parser.add_option("--count", help="The maximum number of images to make 
(default 20)", metavar="N", type='int', default=20)
-       parser.add_option("--blacklist", help="A blacklist of words that should 
not be used", metavar="FILE")
+       parser.add_option("--blacklist", help="A blacklist of words that should 
not be used", metavar="FILE", default="blacklist")
        parser.add_option("--fill", help="Fill the output directory to contain 
N files, overrides count, cannot be used with --dirs", metavar="N", type='int')
        parser.add_option("--dirs", help="Put the images into subdirectories N 
levels deep - $wgCaptchaDirectoryLevels", metavar="N", type='int')
        parser.add_option("--verbose", "-v", help="Show debugging information", 
action='store_true')

-- 
To view, visit https://gerrit.wikimedia.org/r/53124
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I93eeaead4a86b38cf5aa0049ac5e61e5b4935b58
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ConfirmEdit
Gerrit-Branch: master
Gerrit-Owner: Emufarmers <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to