From 7689840966b2d0cf169f1627ddc7bb3ca8d45332 Mon Sep 17 00:00:00 2001 From: Jesse Farinacci Date: Wed, 8 Jun 2011 22:58:20 -0400 Subject: [PATCH 1/4] [FIXED JENKINS-9915] Make captcha support optional; remove LGPL jcaptcha This change is largely based on changes made by Winston Prakash for Hudson. The main details about his changes can be found here: http://issues.hudson-ci.org/browse/HUDSON-8844 I deviated a bit from his changes where it was appropriate (e.g. the description for allow-signup.html was just plain wrong). Also, there was a lot of collateral damage from formatting in his changeset, which I have factored out. I tested the basic functionality of this change and it seems to be OK. --- changelog.html | 3 + core/pom.xml | 43 ------------ core/src/main/java/hudson/Functions.java | 5 ++ .../security/HudsonPrivateSecurityRealm.java | 26 +++++++- .../java/hudson/security/SecurityRealm.java | 51 +++++++++------ .../security/captcha/CaptchaSupport.java | 65 +++++++++++++++++++ .../captcha/CaptchaSupportDescriptor.java | 37 +++++++++++ .../HudsonPrivateSecurityRealm/config.jelly | 26 ++++++-- .../HudsonPrivateSecurityRealm/signup.jelly | 4 +- .../security/private-realm/allow-signup.html | 7 +- 10 files changed, 192 insertions(+), 75 deletions(-) create mode 100644 core/src/main/java/hudson/security/captcha/CaptchaSupport.java create mode 100644 core/src/main/java/hudson/security/captcha/CaptchaSupportDescriptor.java diff --git a/changelog.html b/changelog.html index b351cb7610..267fcc3109 100644 --- a/changelog.html +++ b/changelog.html @@ -55,6 +55,9 @@ Upcoming changes \ No newline at end of file +

+ By default, Jenkins does not use captcha verification if the user creates an account by themself. + If you'd like to enable captcha verification, install a captcha support plugin, e.g. the Jenkins + JCaptcha Plugin. + From 760b9bb49e2f20975516c8ef2f58e39e2f73d098 Mon Sep 17 00:00:00 2001 From: Jesse Farinacci Date: Thu, 9 Jun 2011 11:10:20 -0400 Subject: [PATCH 2/4] set a more appropriate @since --- .../java/hudson/security/captcha/CaptchaSupportDescriptor.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/main/java/hudson/security/captcha/CaptchaSupportDescriptor.java b/core/src/main/java/hudson/security/captcha/CaptchaSupportDescriptor.java index 99e5b7b5d7..980fc70306 100644 --- a/core/src/main/java/hudson/security/captcha/CaptchaSupportDescriptor.java +++ b/core/src/main/java/hudson/security/captcha/CaptchaSupportDescriptor.java @@ -29,7 +29,7 @@ import hudson.model.Descriptor; * {@link Descriptor} for {@link CaptchaSupport}. * * @author Winston Prakash - * @since 2.0.1 + * @since 1.416 */ public abstract class CaptchaSupportDescriptor extends Descriptor { // so far nothing different from plain Descriptor From 59eb3b0f8c5a94968d93b1ad18253706b53397dc Mon Sep 17 00:00:00 2001 From: Jesse Farinacci Date: Thu, 9 Jun 2011 11:10:42 -0400 Subject: [PATCH 3/4] fix sing->sign typographical error --- .../hudson/security/HudsonPrivateSecurityRealm/config.jelly | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/main/resources/hudson/security/HudsonPrivateSecurityRealm/config.jelly b/core/src/main/resources/hudson/security/HudsonPrivateSecurityRealm/config.jelly index 8cc15a8f9e..a60438f425 100644 --- a/core/src/main/resources/hudson/security/HudsonPrivateSecurityRealm/config.jelly +++ b/core/src/main/resources/hudson/security/HudsonPrivateSecurityRealm/config.jelly @@ -31,7 +31,7 @@ THE SOFTWARE. + title="${%Enable captcha on sign up}" /> From 17a835d505eb415aeca9431db459c527f4c15c83 Mon Sep 17 00:00:00 2001 From: Jesse Farinacci Date: Thu, 9 Jun 2011 15:43:28 -0400 Subject: [PATCH 4/4] fix misleading comment, thank you orrc --- .../main/java/hudson/security/HudsonPrivateSecurityRealm.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/src/main/java/hudson/security/HudsonPrivateSecurityRealm.java b/core/src/main/java/hudson/security/HudsonPrivateSecurityRealm.java index 34b586dca3..d2553e4e08 100644 --- a/core/src/main/java/hudson/security/HudsonPrivateSecurityRealm.java +++ b/core/src/main/java/hudson/security/HudsonPrivateSecurityRealm.java @@ -125,9 +125,9 @@ public class HudsonPrivateSecurityRealm extends AbstractPasswordBasedSecurityRea } /** - * Checks if captcha is disabled on signup. + * Checks if captcha is enabled on user signup. * - * @return true if captcha is disabled on signup. + * @return true if captcha is enabled on signup. */ public boolean isEnableCaptcha() { return enableCaptcha;