Package: release.debian.org Severity: normal User: [email protected] Usertags: unblock
Please unblock package moin Small changes to add extra features to help with anti-spam. Once it's in testing I'll do a backport again so that we can get the new code onto wiki.debian.org. Debdiff attached. unblock moin/1.9.4-5 -- System Information: Debian Release: wheezy/sid APT prefers testing APT policy: (500, 'testing') Architecture: amd64 (x86_64) Kernel: Linux 3.2.0-3-amd64 (SMP w/2 CPU cores) Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash
diff -Nru moin-1.9.4/debian/changelog moin-1.9.4/debian/changelog --- moin-1.9.4/debian/changelog 2012-05-03 12:55:51.000000000 +0100 +++ moin-1.9.4/debian/changelog 2012-07-29 23:23:02.000000000 +0100 @@ -1,3 +1,12 @@ +moin (1.9.4-5) unstable; urgency=low + + * Store date and host when a new account is created + * Add the option to call an external helper program at account creation + time to help with local account control policy (e.g. anti-spam) + * Make sending of email verification messages slightly more verbose. + + -- Steve McIntyre <[email protected]> Sun, 29 Jul 2012 11:40:28 +0100 + moin (1.9.4-4) unstable; urgency=low * Fix stupid typo in the mail verification patch. Closes: #671211 diff -Nru moin-1.9.4/debian/patches/mail-verification.patch moin-1.9.4/debian/patches/mail-verification.patch --- moin-1.9.4/debian/patches/mail-verification.patch 2012-05-03 12:59:44.000000000 +0100 +++ moin-1.9.4/debian/patches/mail-verification.patch 2012-07-29 15:50:58.000000000 +0100 @@ -1,15 +1,16 @@ Description: Add support for requiring new accounts to be verified by email Origin: http://moinmo.in/MoinMoinPatch/VerifyAccountCreationByEmail Author: Steve McIntyre -Last-Update: 2012-04-29 +Last-Update: 2012-07-29 --- a/MoinMoin/action/newaccount.py 2012-04-22 18:17:14.000000000 +0100 +++ b/MoinMoin/action/newaccount.py 2012-04-25 17:26:50.066917370 +0100 -@@ -12,7 +12,28 @@ +@@ -12,7 +12,29 @@ from MoinMoin.security.textcha import TextCha from MoinMoin.security.sec_recaptcha import ReCaptcha from MoinMoin.auth import MoinAuth +from MoinMoin.mail import sendmail ++import subprocess +def _send_verification_mail(request, user): + _ = request.getText @@ -55,7 +56,7 @@ # try to get the password and pw repeat password = form.get('password1', '') -@@ -77,18 +108,41 @@ +@@ -77,18 +108,48 @@ email = wikiutil.clean_input(form.get('email', '')) theuser.email = email.strip() if not theuser.email and 'email' not in request.cfg.user_form_remove: @@ -87,10 +88,17 @@ + + # Send verification links if desired + if request.cfg.require_email_verification: ++ if request.cfg.external_creation_check: ++ create_error = subprocess.check_output([request.cfg.external_creation_check, ++ theuser.name, ++ theuser.email, ++ theuser.account_creation_host]) ++ if create_error: ++ request.theme.add_msg(_("Unable to send verification mail, %s. Account creation aborted." % create_error), "error") + mailok, msg = _send_verification_mail(request, theuser) + if mailok: -+ result = _("User account created! Use the link in your email to verify your account" -+ " then you will be able to use this account to login...") ++ result = _("User account created! Use the link in your email (%s) to verify your account" ++ " then you will be able to use this account to login..." % theuser.email) + else: + request.theme.add_msg(_("Unable to send verification mail, %s. Account creation aborted." % msg), "error") + else: @@ -212,12 +220,14 @@ else: --- a/MoinMoin/config/multiconfig.py 2012-04-22 18:17:14.000000000 +0100 +++ b/MoinMoin/config/multiconfig.py 2012-04-23 14:26:10.035695888 +0100 -@@ -1040,6 +1040,8 @@ +@@ -1040,6 +1040,10 @@ ('userprefs_disabled', [], "Disable the listed user preferences plugins."), + ('require_email_verification', False , + "Require verification of new user accounts."), ++ ('external_creation_check', None, ++ "Name of external program to call for checking new account creation."), )), # ========================================================================== 'various': ('Various', None, ( @@ -231,10 +241,12 @@ try: import crypt -@@ -355,6 +356,10 @@ +@@ -355,6 +356,12 @@ self.id = self.make_id() if password is not None: self.enc_password = encodePassword(password) ++ self.account_creation_date = str(time.time()) ++ self.account_creation_host = self._request.remote_addr + if self._cfg.require_email_verification: + self.account_verification = uuid.uuid4() + else:

