--- a/MoinMoin/action/newaccount.py 2012-06-03 15:34:20.000000000 +0200 +++ b/MoinMoin/action/newaccount.py 2012-06-03 15:39:43.000000000 +0200 @@ -12,6 +12,11 @@ from MoinMoin.security.textcha import TextCha from MoinMoin.auth import MoinAuth +### HACK SAUVAGE 1/2 +import sys +sys.path.append('/usr/scripts/gestion/') +from iptools import is_crans +### FIN HACK 1/2 def _create_user(request): _ = request.getText @@ -23,6 +28,15 @@ if not wikiutil.checkTicket(request, form.get('ticket', '')): return + ### HACK SAUVAGE 2/2 + try: + if not is_crans(request.remote_addr): + return _("La création de comptes n'est autorisée" + " que depuis le réseau du Cr@ns ou sur zamok.") + except: + pass + ### FIN HACK 2/2 + if not TextCha(request).check_answer_from_form(): return _('TextCha: Wrong answer! Go back and try again...')