Difference between revisions of "Marspedia talk:Captcha"

From Marspedia
Jump to: navigation, search
(it works fine)
 
(20 intermediate revisions by 2 users not shown)
Line 32: Line 32:
 
:::Oops, sorry. I tried the nowiki-tag before, but I was not able to mark the new parts green this way. Thanks for installation. Unfortunately, the ''gibberish trigger'' is superimposed by the ''edit trigger'', making it impossible to test. -- [[User:Rfc|Rfc]] 10:36, 11 February 2008 (UTC)
 
:::Oops, sorry. I tried the nowiki-tag before, but I was not able to mark the new parts green this way. Thanks for installation. Unfortunately, the ''gibberish trigger'' is superimposed by the ''edit trigger'', making it impossible to test. -- [[User:Rfc|Rfc]] 10:36, 11 February 2008 (UTC)
  
----
 
  
 
::::Yes, you have to nest the nowiki tags inside the color tags.
 
::::Yes, you have to nest the nowiki tags inside the color tags.
Line 42: Line 41:
 
::::-- [[User:Mdelaney|Mdelaney]] 13:33, 11 February 2008 (UTC)
 
::::-- [[User:Mdelaney|Mdelaney]] 13:33, 11 February 2008 (UTC)
  
----
+
:::::Okay. Sweet dreams! -- [[User:Rfc|Rfc]] 14:13, 11 February 2008 (UTC)
 +
 
 +
 
 +
::::::Rfc, I've changed to triggers as you suggested. Please let me know how well the gibberish trigger is working.
 +
 
 +
::::::-- [[User:Mdelaney|Mdelaney]] 02:51, 12 February 2008 (UTC)
 +
 
 +
:::::Hi Mike, the captcha still pops up for any edit with the message ''"To edit this page, please enter the words that appear below in the box"''. I have tried on both Marspedia and Exoplatz. My impression is the 'edit' trigger is still active, because this is the message text from the array defined in file "ConfirmEdit.i18n.php" for 'captcha-edit'. The message for 'captcha-gibberish' would look different: ''"This is a test against a malicious ..."'' -- [[User:Rfc|Rfc]] 13:44, 12 February 2008 (UTC)
 +
 
 +
::::::Hi Rfc, the current settings are as follows.
 +
$wgCaptchaTriggers['edit']          = false;  // Would check on every edit
 +
$wgCaptchaTriggers['create']        = false;  // Check on page creation.
 +
$wgCaptchaTriggers['addurl']        = true;  // Check on edits that add URLs
 +
$wgCaptchaTriggers['gibberish']    = true;  // Check gibberish
 +
$wgCaptchaTriggers['createaccount'] = true;  // Special:Userlogin&type=signup
 +
$wgCaptchaTriggers['badlogin']      = true;  // Special:Userlogin after failure
 +
 
 +
::::::<s>Are you sure you were logged in when you tried it?</s> Hmm. never mind that. How about these errors?
 +
::::::Warning: preg_match() [function.preg-match]: Compilation failed: nothing to repeat at offset 2861 in /home/.oriole/<span style="background-color:#88FF88"><username-deleted></span>/scientifiction.org/extensions/SpamBlacklist/SpamBlacklist_body.php on line 210
 +
 
 +
::::::Warning: Missing argument 3 for SimpleCaptcha::gibberishCheck(), called in /home/.oriole/<span style="background-color:#88FF88"><username-deleted></span>/scientifiction.org/extensions/ConfirmEdit/ConfirmEdit_body.php on line 291 and defined in /home/.oriole/<span style="background-color:#88FF88"><username-deleted></span>/scientifiction.org/extensions/ConfirmEdit/ConfirmEdit_body.php on line 611
 +
 
 +
:::::: -- [[User:Mdelaney|Mdelaney]] 04:27, 13 February 2008 (UTC)
 +
 
 +
:::::Hi Mike, the first one is about ''SpamBlacklist_body.php'', which seems not related to the captcha thing, but I can not be sure. May be it is an inherited error from the second one, though I can not explain the wrong sequence.
 +
:::::The second one is definitely my fault:-( <small>Sorry about that.</small> I have corrected the fault in [http://www.marspedia.org/index.php?title=Marspedia%3ACaptcha&diff=3080&oldid=3067  Marspedia:Captcha]. Please correct the installation accordingly and try again. Hopefully the first error disappears with this correction as well. Unfortunately, I can not pre-test it. -- [[User:Rfc|Rfc]] 09:19, 13 February 2008 (UTC)
 +
 
 +
::::Hi Rfc, I've spent quite a bit of time working on this today and I just can't seem to get it to work right. However, I think the problem may have something to do with the fact that your code is only written for ConfirmEdit. While we use that, we also use the FancyCaptcha addon which calls the graphic captchas. I'm not looking to add to either of our workloads, I'll try the SimpleCaptcha later on and see if it delivers the right messages, the FancyCaptcha leaves me with no way of telling why a captcha has been called.
 +
::::For testing purposes I've been playing with it on Exoplatz. -- [[User:Mdelaney|Mdelaney]] 18:38, 13 February 2008 (UTC)
 +
 
 +
:::Changed to SimpleCaptcha on Exoplatz, and tried again. This time I got the following error:Warning: Missing argument 3 for SimpleCaptcha::gibberishCheck(), called in /home/.oriole/www_spacep/exoplatz.org/extensions/ConfirmEdit/ConfirmEdit_body.php on line 291 and defined in /home/.oriole/www_spacep/exoplatz.org/extensions/ConfirmEdit/ConfirmEdit_body.php on line 611
 +
 
 +
:::I also got this: [[Image:CaptchaTest_2008-02-13_18-44.png|thumb|right|120|CaptchaTest_2008-02-13_18-44.png]]
 +
 
 +
:::-- [[User:Mdelaney|Mdelaney]] 18:48, 13 February 2008 (UTC)
 +
 
 +
::::Okay, the message looks fine, but the error is still there. It looks as if my correction("$oldtext added") is not implemented. Please see my latest edit in [[Marspedia:Captcha]].
 +
::::The SimpleCaptcha is not as safe as the FancyCaptcha. Maybe I should find out how to do it with the latter... -- [[User:Rfc|Rfc]] 19:43, 13 February 2008 (UTC)
 +
 
 +
Well, I have given it another try on Exoplatz - and found it working perfectly fine. I will look for the FancyCaptcha php code and let you know what we can do with it. -- [[User:Rfc|Rfc]] 07:06, 14 February 2008 (UTC)
 +
 
 +
Hi Mike, there is a detailed instruction how to setup the ''FancyCaptcha addon extension'' in [http://www.mediawiki.org/wiki/Extension:ConfirmEdit#FancyCaptcha here]. I think it is compatible with the gibberish trigger.
 +
As far as I can see, you have already installed everything on Marspedia, except my correction("$oldtext added"). -- [[User:Rfc|Rfc]] 13:08, 14 February 2008 (UTC)
 +
 
 +
:Hi Rfc, perhaps I should have phrased things better. I deactivated FancyCaptcha on Exoplatz so I could see whether the gibberish trigger was working. As far as installing FancyCaptcha is concerned, I only need to change "''$wgCaptchaClass = 'SimpleCaptcha';''" back to "''$wgCaptchaClass = 'FancyCaptcha';''" in ConfirmEdit.php. Just as on our other wikis, I installed FancyCaptcha when I installed ConfirmEdit.
 +
 
 +
:FancyCaptcha doesn't deliver it's messages from ConfirmEdit.i18n.php but from FancyCaptcha.i18n.php. As a result we were not seeing the message for the gibberish trigger. I suspect the gibberish trigger would have to be added to the FancyCaptcha files.
 +
 
 +
:One thing Strangelv and I noticed is that the gibberish trigger is activated for ''all'' edits within the first 5 lines of a page. Even the text "This looks like an interesting test." on the second line of a page triggered a gibberish captcha. As did the phrase "Will this trigger a gibberish captcha?" at the bottom of a page. In both these cases I was logged in as a regular user. Is there any way to make the trigger less prone to false positives?
 +
 
 +
:-- [[User:Mdelaney|Mdelaney]] 16:43, 14 February 2008 (UTC)
 +
 
 +
Hi Mike, I did some test on Marspedia some minutes ago. The result was a captcha, combined with ''"Warning:  Missing argument 3 for SimpleCaptcha::gibberishCheck(), called ..."''. The result was the same, no matter where I inserted some text, and no matter if I edited a section or the whole text. As a conclusion I assume my correction("$oldtext added") is not implemented. Without the correction this result meets my expectations. Yes, the fault has the side effect to pop up the gibberish captcha for any edit.
 +
 
 +
I also did some test on Exoplatz. The result was as follows: When I edit a section no captcha pops up, which is as it should be. As a conclusion I assume my correction("$oldtext added") is implemented. But if I edit the whole page the gibberish captcha pops up, no matter where in the page I change the text. This is not as it should be. Instead, the captcha should only pop up, if I change the first character of the text. On Exoplatz a ''warning'' is never shown, which is another proof the correction is installed.
 +
 
 +
Are my conclusions correct? Still I do not really know, why the gibberish trigger on Exoplatz is behaving so peculiar. I should like to know what the first characters of $oldtext and $newtext really are. I will think it over. -- [[User:Rfc|Rfc]] 20:15, 14 February 2008 (UTC)
 +
 
 +
After some additional analyzing I suspect the contents of the variable ''$oldtext'' is not as I assumed, probably it is not initialized. Unfortunately I have no installed wikimedia system, making it hard to analyze the full source code. And, even worse, I can not test it. But I found that ''$oldtext'' is afterwards initialized by the existing addurl trigger, which proofs the initialization of this variable does not do any harm to the system. Hence, I can (and probably should) do the same initialization in the gibberish trigger. So I put an additional line into the gibberish trigger on [[Marspedia:Captcha]]. This makes sure ''$oldtext'' is filled appropriately. Please try ... -- [[User:Rfc|Rfc]] 08:36, 15 February 2008 (UTC)
 +
 
 +
The correction is ready for installation. Please try ... -- [[User:Rfc|Rfc]] 08:00, 20 February 2008 (UTC)
 +
 
 +
:I'll try to get to it this week Rfc, I've been otherwise occupied with real life stuff.<br />
 +
:-- [[User:Mdelaney|Mdelaney]] 00:33, 26 February 2008 (UTC)
 +
 
 +
::Rfc, I've installed the new version on [http://www.exoplatz.org Exoplatz] and set it to use "SimpleCaptcha" so you can see the prompts. Please check it out when you have a chance. -- [[User:Mdelaney|Mdelaney]] 04:53, 27 February 2008 (UTC)
 +
 
 +
:::Hi Mike, it works fine! Just like it is meant to work. Yippiyeah! Okay, testing is passed, you may install it on the other wikis, as well. Thanks for your help and your patience. -- [[User:Rfc|Rfc]] 07:35, 6 March 2008 (UTC)

Latest revision as of 23:35, 5 March 2008

Greetings,

Are these captchas already installed on Lunarpedia? If so, why are we still suffering from spambots? What can we do to improve the effectiveness of the captchas? Are there install instructions somewhere?

Thanks Charles F. Radley 19:50, 27 January 2008 (UTC)

Hi Charles, as far as I know the regular set of captcha triggers are active on both Marspedia and Lunarpedia, but these triggers only address the following events:
  • 'edit'
  • 'create'
  • 'addurl'
  • 'createaccount'
  • 'badlogin'
The new trigger 'gibberish' needs to be installed. I am not familiar with the wikimedia software installation process, but I think the green parts just need to be inserted in the files ConfirmEdit.php, ConfirmEdit.i18n.php and ConfirmEdit_body.php respectively. Someone with file write access permission on CGI level must do that, I suppose. --Rfc 09:05, 28 January 2008 (UTC)
Hi Rfc.
Sorry for taking so long to get back to you. I wasn't aware that the 'gibberish' trigger was available, it wasn't when I originally installed ConfirmEdit. I see the latest version has an additional file. I hope to look into installing the new version this weekend, but please bear with me, I need to upgrade all 5 wikis before I proceed to upgrading ConfirmEdit. Also, depending on the requirements, I can't promise to get the new version of ConfirmEdit to work. As it is, we're going to lose our US-EN spell checker.
- Mdelaney 06:03, 9 February 2008 (UTC)


Hi again Rfc,
This has now been implemented. Let me know whether it's working properly.
For future reference, when posting code to any mediawiki site, it's best to enclose the code inside <nowiki></nowiki> tags so the wiki doesn't misinterpret the code. This caused me a little trouble when I added your modifications as some characters were missing from the code I pasted to the file. The last green section isn't displaying properly in the wiki, the line
if( $section == '' ) { // do the check only for whole page edits
is showing up as
if( $section == ) { // do the check only for whole page edits
It took me a little while to spot that problem ;-)
-- Mdelaney 21:45, 9 February 2008 (UTC)
Oops, sorry. I tried the nowiki-tag before, but I was not able to mark the new parts green this way. Thanks for installation. Unfortunately, the gibberish trigger is superimposed by the edit trigger, making it impossible to test. -- Rfc 10:36, 11 February 2008 (UTC)


Yes, you have to nest the nowiki tags inside the color tags.
You make a valid point about testing the gibberish trigger, I'll set the first two triggers to false after I get some sleep. Disregard my plan to do this later in the week as mentioned on Lunarpedia. I think we can test it on the Scientifiction wiki first since we'll be restoring that to it's Sept 25 state.
I've done two all-nighters in a row, I need to get some sleep.
-- Mdelaney 13:33, 11 February 2008 (UTC)
Okay. Sweet dreams! -- Rfc 14:13, 11 February 2008 (UTC)


Rfc, I've changed to triggers as you suggested. Please let me know how well the gibberish trigger is working.
-- Mdelaney 02:51, 12 February 2008 (UTC)
Hi Mike, the captcha still pops up for any edit with the message "To edit this page, please enter the words that appear below in the box". I have tried on both Marspedia and Exoplatz. My impression is the 'edit' trigger is still active, because this is the message text from the array defined in file "ConfirmEdit.i18n.php" for 'captcha-edit'. The message for 'captcha-gibberish' would look different: "This is a test against a malicious ..." -- Rfc 13:44, 12 February 2008 (UTC)
Hi Rfc, the current settings are as follows.
$wgCaptchaTriggers['edit']          = false;  // Would check on every edit
$wgCaptchaTriggers['create']        = false;  // Check on page creation.
$wgCaptchaTriggers['addurl']        = true;   // Check on edits that add URLs
$wgCaptchaTriggers['gibberish']     = true;   // Check gibberish
$wgCaptchaTriggers['createaccount'] = true;   // Special:Userlogin&type=signup
$wgCaptchaTriggers['badlogin']      = true;   // Special:Userlogin after failure
Are you sure you were logged in when you tried it? Hmm. never mind that. How about these errors?
Warning: preg_match() [function.preg-match]: Compilation failed: nothing to repeat at offset 2861 in /home/.oriole/<username-deleted>/scientifiction.org/extensions/SpamBlacklist/SpamBlacklist_body.php on line 210
Warning: Missing argument 3 for SimpleCaptcha::gibberishCheck(), called in /home/.oriole/<username-deleted>/scientifiction.org/extensions/ConfirmEdit/ConfirmEdit_body.php on line 291 and defined in /home/.oriole/<username-deleted>/scientifiction.org/extensions/ConfirmEdit/ConfirmEdit_body.php on line 611
-- Mdelaney 04:27, 13 February 2008 (UTC)
Hi Mike, the first one is about SpamBlacklist_body.php, which seems not related to the captcha thing, but I can not be sure. May be it is an inherited error from the second one, though I can not explain the wrong sequence.
The second one is definitely my fault:-( Sorry about that. I have corrected the fault in Marspedia:Captcha. Please correct the installation accordingly and try again. Hopefully the first error disappears with this correction as well. Unfortunately, I can not pre-test it. -- Rfc 09:19, 13 February 2008 (UTC)
Hi Rfc, I've spent quite a bit of time working on this today and I just can't seem to get it to work right. However, I think the problem may have something to do with the fact that your code is only written for ConfirmEdit. While we use that, we also use the FancyCaptcha addon which calls the graphic captchas. I'm not looking to add to either of our workloads, I'll try the SimpleCaptcha later on and see if it delivers the right messages, the FancyCaptcha leaves me with no way of telling why a captcha has been called.
For testing purposes I've been playing with it on Exoplatz. -- Mdelaney 18:38, 13 February 2008 (UTC)
Changed to SimpleCaptcha on Exoplatz, and tried again. This time I got the following error:Warning: Missing argument 3 for SimpleCaptcha::gibberishCheck(), called in /home/.oriole/www_spacep/exoplatz.org/extensions/ConfirmEdit/ConfirmEdit_body.php on line 291 and defined in /home/.oriole/www_spacep/exoplatz.org/extensions/ConfirmEdit/ConfirmEdit_body.php on line 611
I also got this:
CaptchaTest_2008-02-13_18-44.png
-- Mdelaney 18:48, 13 February 2008 (UTC)
Okay, the message looks fine, but the error is still there. It looks as if my correction("$oldtext added") is not implemented. Please see my latest edit in Marspedia:Captcha.
The SimpleCaptcha is not as safe as the FancyCaptcha. Maybe I should find out how to do it with the latter... -- Rfc 19:43, 13 February 2008 (UTC)

Well, I have given it another try on Exoplatz - and found it working perfectly fine. I will look for the FancyCaptcha php code and let you know what we can do with it. -- Rfc 07:06, 14 February 2008 (UTC)

Hi Mike, there is a detailed instruction how to setup the FancyCaptcha addon extension in here. I think it is compatible with the gibberish trigger. As far as I can see, you have already installed everything on Marspedia, except my correction("$oldtext added"). -- Rfc 13:08, 14 February 2008 (UTC)

Hi Rfc, perhaps I should have phrased things better. I deactivated FancyCaptcha on Exoplatz so I could see whether the gibberish trigger was working. As far as installing FancyCaptcha is concerned, I only need to change "$wgCaptchaClass = 'SimpleCaptcha';" back to "$wgCaptchaClass = 'FancyCaptcha';" in ConfirmEdit.php. Just as on our other wikis, I installed FancyCaptcha when I installed ConfirmEdit.
FancyCaptcha doesn't deliver it's messages from ConfirmEdit.i18n.php but from FancyCaptcha.i18n.php. As a result we were not seeing the message for the gibberish trigger. I suspect the gibberish trigger would have to be added to the FancyCaptcha files.
One thing Strangelv and I noticed is that the gibberish trigger is activated for all edits within the first 5 lines of a page. Even the text "This looks like an interesting test." on the second line of a page triggered a gibberish captcha. As did the phrase "Will this trigger a gibberish captcha?" at the bottom of a page. In both these cases I was logged in as a regular user. Is there any way to make the trigger less prone to false positives?
-- Mdelaney 16:43, 14 February 2008 (UTC)

Hi Mike, I did some test on Marspedia some minutes ago. The result was a captcha, combined with "Warning: Missing argument 3 for SimpleCaptcha::gibberishCheck(), called ...". The result was the same, no matter where I inserted some text, and no matter if I edited a section or the whole text. As a conclusion I assume my correction("$oldtext added") is not implemented. Without the correction this result meets my expectations. Yes, the fault has the side effect to pop up the gibberish captcha for any edit.

I also did some test on Exoplatz. The result was as follows: When I edit a section no captcha pops up, which is as it should be. As a conclusion I assume my correction("$oldtext added") is implemented. But if I edit the whole page the gibberish captcha pops up, no matter where in the page I change the text. This is not as it should be. Instead, the captcha should only pop up, if I change the first character of the text. On Exoplatz a warning is never shown, which is another proof the correction is installed.

Are my conclusions correct? Still I do not really know, why the gibberish trigger on Exoplatz is behaving so peculiar. I should like to know what the first characters of $oldtext and $newtext really are. I will think it over. -- Rfc 20:15, 14 February 2008 (UTC)

After some additional analyzing I suspect the contents of the variable $oldtext is not as I assumed, probably it is not initialized. Unfortunately I have no installed wikimedia system, making it hard to analyze the full source code. And, even worse, I can not test it. But I found that $oldtext is afterwards initialized by the existing addurl trigger, which proofs the initialization of this variable does not do any harm to the system. Hence, I can (and probably should) do the same initialization in the gibberish trigger. So I put an additional line into the gibberish trigger on Marspedia:Captcha. This makes sure $oldtext is filled appropriately. Please try ... -- Rfc 08:36, 15 February 2008 (UTC)

The correction is ready for installation. Please try ... -- Rfc 08:00, 20 February 2008 (UTC)

I'll try to get to it this week Rfc, I've been otherwise occupied with real life stuff.
-- Mdelaney 00:33, 26 February 2008 (UTC)
Rfc, I've installed the new version on Exoplatz and set it to use "SimpleCaptcha" so you can see the prompts. Please check it out when you have a chance. -- Mdelaney 04:53, 27 February 2008 (UTC)
Hi Mike, it works fine! Just like it is meant to work. Yippiyeah! Okay, testing is passed, you may install it on the other wikis, as well. Thanks for your help and your patience. -- Rfc 07:35, 6 March 2008 (UTC)