summaryrefslogtreecommitdiff
path: root/www/moinmoin/files
diff options
context:
space:
mode:
authorRene Ladan <rene@FreeBSD.org>2021-01-01 00:57:23 +0000
committerRene Ladan <rene@FreeBSD.org>2021-01-01 00:57:23 +0000
commite095f78463023f59c04bdd21ffc95fada557410f (patch)
treeec5de6499c9c252b774be9acb5c807082d084bd2 /www/moinmoin/files
parentNew port, misc/timezonemap (diff)
Remove most expired ports that depend on Python 2.7:
Exceptions are: - mail/mailman, our listservers still use it - www/chromium, solely because of popular demand, upstream is (slowly) working on porting it to Python 3 - ports that have actual patches for Python 3 against them (Cinnamon and a few unrelated other ports) - llvm70 and qt5-webengine because they seem to have a lot of dependencies which need further analysis - sysutils/uefi-edk2-bhyve because bhyve seems to use them - python2 and python27 themselves I'm sure there will be complaints, but the nice thing about a version control system is that we can revert and adjust things. 2020-12-31 audio/ardour: Uses Python 2.7 version of scons, and Python 2.7 which is EOLed upstream 2020-12-31 audio/mixxx21: Uses Python 2.7 version of scons, and Python 2.7 which is EOLed upstream 2020-12-31 audio/xmms2: Uses Python 2.7 which is EOLed upstream 2020-12-31 chinese/sunpinyin: Uses Python 2.7 which is EOLed upstream 2020-12-31 databases/arangodb32: Uses Python 2.7 which is EOLed upstream 2020-12-31 databases/arangodb33: Uses Python 2.7 which is EOLed upstream 2020-12-31 devel/bzr: Uses Python 2.7 which is EOLed upstream 2020-12-31 devel/chromium-gn: Uses deprecated version of python, use devel/gn instead 2020-12-31 devel/electron4: Uses Python 2.7 which is EOLed upstream 2020-12-31 devel/electron5: Uses Python 2.7 which is EOLed upstream 2020-12-31 devel/electron6: Uses Python 2.7 which is EOLed upstream 2020-12-31 devel/electron7: Uses Python 2.7 which is EOLed upstream 2020-12-31 devel/gnatpython: Uses Python 2.7 which is EOLed upstream 2020-12-31 devel/godot2: Uses Python 2.7 version of scons, and Python 2.7 which is EOLed upstream 2020-12-31 devel/godot2-tools: Uses Python 2.7 version of scons, and Python 2.7 which is EOLed upstream 2020-12-31 devel/libhid: Uses Python 2.7 which is EOLed upstream 2020-12-31 devel/libosmocore: Uses Python 2.7 which is EOLed upstream 2020-12-31 devel/llvm60: Uses Python 2.7 which is EOLed upstream 2020-12-31 devel/mongo-cxx-driver: Uses Python 2.7 version of scons, and Python 2.7 which is EOLed upstream 2020-06-30 devel/p5-Log-Any-Adapter-Callback: Use devel/p5-Log-Any (Log::Any::Adapter::Capture) instead 2020-12-31 devel/py-backports.functools_lru_cache: Uses Python 2.7 which is EOLed upstream 2020-12-31 devel/py-backports.os: Python 2 is EOL upstream 2020-12-31 devel/py-backports.shutil_get_terminal_size: Python 2 is EOL upstream 2020-12-31 devel/py-backports_abc: Uses Python 2.7 which is EOLed upstream 2020-12-31 devel/py-cheetah: Uses Python 2.7 which is EOLed upstream 2020-12-31 devel/py-dis3: Python 2 only, backport of Python 3 2020-12-31 devel/py-enum34: Will be removed along with python27 2020-12-31 devel/py-functools32: Python 2 only, backport of Python 3 2020-12-31 devel/py-futures: Uses Python 2.7 which is EOLed upstream 2020-12-31 devel/py-more-itertools5: Uses Python 2.7 which is EOLed upstream 2020-12-31 devel/py-pathlib: Uses Python 2.7 which is EOLed upstream 2020-12-31 devel/py-selectors2: Python 2 is EOL upstream 2020-12-31 devel/py-should_dsl: Uses Python 2.7 which is EOLed upstream 2020-12-31 devel/py-singledispatch: Uses Python 2.7 which is EOLed upstream 2020-12-31 devel/py-subprocess32: Python 2 only, following EOL of lang/python27 2020-12-31 devel/py-total-ordering: Uses Python 2.7 which is EOLed upstream 2020-12-31 devel/py-typing: Python 2 only, backport of Python 3 2020-12-31 devel/py-weakrefmethod: Python 2 only, backport of Python 3 2020-12-31 devel/rbtools: Uses Python 2.7 which is EOLed upstream 2020-12-31 devel/subversion-lts: Uses Python 2.7 which is EOLed upstream 2020-12-31 devel/viewvc: Uses Python 2.7 which is EOLed upstream 2020-12-31 dns/py-dns: Uses Python 2.7 which is EOLed upstream 2020-12-31 editors/atom: Uses Python 2.7 which is EOLed upstream 2020-12-31 emulators/fceux: Uses Python 2.7 version of scons, and Python 2.7 which is EOLed upstream 2020-12-31 emulators/gem5: Uses Python 2.7 version of scons, and Python 2.7 which is EOLed upstream 2020-12-31 emulators/nonpareil: Uses Python 2.7 version of scons, and Python 2.7 which is EOLed upstream 2020-12-31 games/0ad: Uses deprecated version of python 2020-12-31 games/dangerdeep: Uses Python 2.7 version of scons, and Python 2.7 which is EOLed upstream 2020-12-31 games/freera: Uses Python 2.7 version of scons, and Python 2.7 which is EOLed upstream 2020-12-31 games/glob2: Uses Python 2.7 version of scons, and Python 2.7 which is EOLed upstream 2020-12-31 games/marsnomercy: Uses Python 2.7 version of scons, and Python 2.7 which is EOLed upstream 2020-12-31 games/netpanzer: Uses Python 2.7 version of scons, and Python 2.7 which is EOLed upstream 2020-12-31 games/pingus: Uses Python 2.7 version of scons, and Python 2.7 which is EOLed upstream 2020-12-31 games/renpy: Uses deprecated version of python 2020-12-31 graphics/goxel: Uses Python 2.7 version of scons, and Python 2.7 which is EOLed upstream 2020-12-31 graphics/py-pillow6: Uses Python 2.7 which is EOLed upstream 2020-12-31 graphics/sk1libs: Uses Python 2.7 which is EOLed upstream 2020-12-31 graphics/uniconvertor: Uses deprecated version of python 2020-12-31 lang/julia10: Uses Python 2.7 which is EOLed upstream 2020-12-31 lang/pypy: Uses Python 2.7 which is EOLed upstream 2020-12-31 lang/pypy3: Uses Python 2.7 which is EOLed upstream 2020-12-31 lang/spidermonkey185: Uses Python 2.7 which is EOLed upstream 2020-12-31 lang/spidermonkey24: Uses Python 2.7 which is EOLed upstream 2020-12-31 lang/spidermonkey52: Uses Python 2.7 which is EOLed upstream 2020-12-31 lang/spidermonkey60: Requires python2 to build 2020-12-31 lang/tolua++: Uses Python 2.7 version of scons, and Python 2.7 which is EOLed upstream 2020-12-31 mail/getmail: Uses deprecated version of python 2020-12-31 math/gringo: Uses Python 2.7 which is EOLed upstream 2020-12-31 multimedia/ffmpeg2theora: Uses Python 2.7 version of scons, and Python 2.7 which is EOLed upstream 2020-12-31 multimedia/mimms: Uses Python 2.7 which is EOLed upstream 2020-12-31 net/py-ipaddress: Uses Python 2.7 which is EOLed upstream 2020-12-31 net-p2p/linuxdcpp: Uses Python 2.7 version of scons, and Python 2.7 which is EOLed upstream 2020-12-31 security/broccoli: Depends lang/python27 which is EOLed upstream 2020-12-31 security/orthrus: Uses Python 2.7 version of scons, and Python 2.7 which is EOLed upstream 2020-12-31 security/py-backports.ssl_match_hostname: Uses Python 2.7 which is EOLed upstream 2020-12-31 security/sandsifter: Uses deprecated version of python, see https://github.com/rigred/sandsifter/issues/10 2020-12-31 sysutils/cinnamon-control-center: Uses Python 2.7 which is EOLed upstream 2020-12-31 sysutils/ori: Uses Python 2.7 version of scons, and Python 2.7 which is EOLed upstream 2020-12-31 sysutils/osquery: Uses Python 2.7 which is EOLed upstream 2020-12-31 sysutils/py-shutilwhich: Python 2 only, backport of Python 3 2020-12-31 sysutils/uefi-edk2-bhyve-csm: Uses Python 2.7 which is EOLed upstream 2020-12-31 www/cliqz: Uses deprecated version of python 2020-12-31 www/iridium: Uses Python 2.7 which is EOLed upstream 2020-12-31 www/moinmoin: Uses Python 2.7 which is EOLed upstream 2020-12-31 www/node10: Uses Python 2.7 which is EOLed upstream 2020-12-31 www/node12: Uses Python 2.7 which is EOLed upstream 2020-12-31 www/trac: Uses Python 2.7 which is EOLed upstream 2020-12-31 www/trac-OhlohWidgetsMacro: Uses Python 2.7 which is EOLed upstream 2020-12-31 www/trac-TracGoogleAnalytics: Uses Python 2.7 which is EOLed upstream 2020-12-31 www/trac-accountmanager: Uses Python 2.7 which is EOLed upstream 2020-12-31 www/trac-advancedticketworkflow: Uses Python 2.7 which is EOLed upstream 2020-12-31 www/trac-autocomplete: Uses Python 2.7 which is EOLed upstream 2020-12-31 www/trac-ccselector: Uses Python 2.7 which is EOLed upstream 2020-12-31 www/trac-customfieldadmin: Uses Python 2.7 which is EOLed upstream 2020-12-31 www/trac-datefield: Uses Python 2.7 which is EOLed upstream 2020-12-31 www/trac-defaultcc: Uses Python 2.7 which is EOLed upstream 2020-12-31 www/trac-devel: Uses Python 2.7 which is EOLed upstream 2020-12-31 www/trac-discussion: Uses Python 2.7 which is EOLed upstream 2020-12-31 www/trac-downloads: Uses Python 2.7 which is EOLed upstream 2020-12-31 www/trac-email2trac: Uses Python 2.7 which is EOLed upstream 2020-12-31 www/trac-email2trac-postfix: Uses Python 2.7 which is EOLed upstream 2020-12-31 www/trac-estimator: Uses Python 2.7 which is EOLed upstream 2020-12-31 www/trac-fivestarvote: Uses Python 2.7 which is EOLed upstream 2020-12-31 www/trac-fullblog: Uses Python 2.7 which is EOLed upstream 2020-12-31 www/trac-fullblognotification: Uses Python 2.7 which is EOLed upstream 2020-12-31 www/trac-graphviz: Uses Python 2.7 which is EOLed upstream 2020-12-31 www/trac-iniadmin: Uses Python 2.7 which is EOLed upstream 2020-12-31 www/trac-keywords: Uses Python 2.7 which is EOLed upstream 2020-12-31 www/trac-keywordsecretticket: Uses Python 2.7 which is EOLed upstream 2020-12-31 www/trac-ldap: Uses Python 2.7 which is EOLed upstream 2020-12-31 www/trac-ldapauthstore: Uses Python 2.7 which is EOLed upstream 2020-12-31 www/trac-math: Uses Python 2.7 which is EOLed upstream 2020-12-31 www/trac-mercurial: Uses Python 2.7 which is EOLed upstream 2020-12-31 www/trac-navadd: Uses Python 2.7 which is EOLed upstream 2020-12-31 www/trac-permredirect: Uses Python 2.7 which is EOLed upstream 2020-12-31 www/trac-privatetickets: Uses Python 2.7 which is EOLed upstream 2020-12-31 www/trac-pydotorgtheme: Uses Python 2.7 which is EOLed upstream 2020-12-31 www/trac-scrumburndown: Uses Python 2.7 which is EOLed upstream 2020-12-31 www/trac-spam-filter: Uses Python 2.7 which is EOLed upstream 2020-12-31 www/trac-subtickets: Uses Python 2.7 which is EOLed upstream 2020-12-31 www/trac-tags: Uses Python 2.7 which is EOLed upstream 2020-12-31 www/trac-themeengine: Uses Python 2.7 which is EOLed upstream 2020-12-31 www/trac-ticketimport: Uses Python 2.7 which is EOLed upstream 2020-12-31 www/trac-tickettemplate: Uses Python 2.7 which is EOLed upstream 2020-12-31 www/trac-timingandestimation: Uses Python 2.7 which is EOLed upstream 2020-12-31 www/trac-tocmacro: Uses Python 2.7 which is EOLed upstream 2020-12-31 www/trac-tweakui: Uses Python 2.7 which is EOLed upstream 2020-12-31 www/trac-vote: Uses Python 2.7 which is EOLed upstream 2020-12-31 www/trac-wikigoodies: Uses Python 2.7 which is EOLed upstream 2020-12-31 www/trac-wikinotification: Uses Python 2.7 which is EOLed upstream 2020-12-31 www/trac-wikitemplates: Uses Python 2.7 which is EOLed upstream 2020-12-31 www/trac-wikitopdf: Uses Python 2.7 which is EOLed upstream 2020-12-31 www/trac-wysiwyg: Uses Python 2.7 which is EOLed upstream 2020-12-31 www/trac-xmlrpc: Uses Python 2.7 which is EOLed upstream
Diffstat (limited to 'www/moinmoin/files')
-rw-r--r--www/moinmoin/files/extra-patch-recaptchav2299
-rw-r--r--www/moinmoin/files/extra-patch-verifyemail232
-rw-r--r--www/moinmoin/files/patch-setup.cfg10
-rw-r--r--www/moinmoin/files/patch-setup.py10
-rw-r--r--www/moinmoin/files/pkg-install.in148
5 files changed, 0 insertions, 699 deletions
diff --git a/www/moinmoin/files/extra-patch-recaptchav2 b/www/moinmoin/files/extra-patch-recaptchav2
deleted file mode 100644
index 60241b7cf0cf..000000000000
--- a/www/moinmoin/files/extra-patch-recaptchav2
+++ /dev/null
@@ -1,299 +0,0 @@
-# Based on https://gist.github.com/tfoote/675b98df53369e199dea
-
---- MoinMoin/action/AttachFile.py.orig 2016-10-31 20:44:01 UTC
-+++ MoinMoin/action/AttachFile.py
-@@ -44,6 +44,7 @@ from MoinMoin import config, packages
- from MoinMoin.Page import Page
- from MoinMoin.util import filesys, timefuncs
- from MoinMoin.security.textcha import TextCha
-+from MoinMoin.security.sec_recaptcha import ReCaptcha
- from MoinMoin.events import FileAttachedEvent, FileRemovedEvent, send_event
-
- action_name = __name__.split('.')[-1]
-@@ -654,6 +655,7 @@ def send_uploadform(pagename, request):
- <dd><input type="checkbox" name="overwrite" value="1" %(overwrite_checked)s></dd>
- </dl>
- %(textcha)s
-+%(recaptcha)s
- <p>
- <input type="hidden" name="action" value="%(action_name)s">
- <input type="hidden" name="do" value="upload">
-@@ -671,6 +673,7 @@ def send_uploadform(pagename, request):
- 'overwrite_checked': ('', 'checked')[request.form.get('overwrite', '0') == '1'],
- 'upload_button': _('Upload'),
- 'textcha': TextCha(request).render(),
-+ 'recaptcha': ReCaptcha(request).render(),
- 'ticket': wikiutil.createTicket(request),
- })
-
-@@ -728,6 +731,8 @@ def _do_upload(pagename, request):
- # but it could be extended to more/all attachment write access
- if not TextCha(request).check_answer_from_form():
- return _('TextCha: Wrong answer! Go back and try again...')
-+ if not ReCaptcha(request).check_answer_from_form():
-+ return _('ReCaptcha: Wrong answer! Go back and try again...')
-
- form = request.form
-
---- MoinMoin/action/CopyPage.py.orig 2016-10-31 20:44:01 UTC
-+++ MoinMoin/action/CopyPage.py
-@@ -14,6 +14,7 @@ from MoinMoin.Page import Page
- from MoinMoin.PageEditor import PageEditor
- from MoinMoin.action import ActionBase
- from MoinMoin.security.textcha import TextCha
-+from MoinMoin.security.sec_recaptcha import ReCaptcha
-
- class CopyPage(ActionBase):
- """ Copy page action
-@@ -45,11 +46,14 @@ class CopyPage(ActionBase):
-
- def do_action(self):
- """ copy this page to "pagename" """
-+ status = False
- _ = self._
- # Currently we only check TextCha for upload (this is what spammers ususally do),
- # but it could be extended to more/all attachment write access
- if not TextCha(self.request).check_answer_from_form():
- return False, _('TextCha: Wrong answer! Go back and try again...')
-+ if not ReCaptcha(self.request).check_answer_from_form():
-+ return status, _('ReCaptcha: Wrong answer! Go back and try again...')
-
- form = self.form
- newpagename = form.get('newpagename', u'')
-@@ -90,6 +94,7 @@ class CopyPage(ActionBase):
-
- d = {
- 'textcha': TextCha(self.request).render(),
-+ 'recaptcha': ReCaptcha(self.request).render(),
- 'subpage': subpages,
- 'subpages_checked': ('', 'checked')[self.request.args.get('subpages_checked', '0') == '1'],
- 'subpage_label': _('Copy all /subpages too?'),
-@@ -105,6 +110,7 @@ class CopyPage(ActionBase):
- <br>
- <br>
- %(textcha)s
-+%(recaptcha)s
- <table>
- <tr>
- <dd>
-@@ -140,6 +146,7 @@ class CopyPage(ActionBase):
- else:
- d = {
- 'textcha': TextCha(self.request).render(),
-+ 'recaptcha': ReCaptcha(self.request).render(),
- 'pagename': wikiutil.escape(self.pagename, True),
- 'newname_label': _("New name"),
- 'comment_label': _("Optional reason for the copying"),
-@@ -147,6 +154,7 @@ class CopyPage(ActionBase):
- }
- return '''
- %(textcha)s
-+%(recaptcha)s
- <table>
- <tr>
- <td class="label"><label>%(newname_label)s</label></td>
---- MoinMoin/action/edit.py.orig 2016-10-31 20:44:01 UTC
-+++ MoinMoin/action/edit.py
-@@ -163,6 +163,9 @@ def execute(pagename, request):
- from MoinMoin.security.textcha import TextCha
- if not TextCha(request).check_answer_from_form():
- raise pg.SaveError(_('TextCha: Wrong answer! Try again below...'))
-+ from MoinMoin.security.sec_recaptcha import ReCaptcha
-+ if not ReCaptcha(request).check_answer_from_form():
-+ raise pg.SaveError(_('ReCaptcha: Wrong answer! Try again below...'))
- if request.cfg.comment_required and not comment:
- raise pg.SaveError(_('Supplying a comment is mandatory. Write a comment below and try again...'))
- savemsg = pg.saveText(savetext, rev, trivial=trivial, comment=comment)
---- MoinMoin/action/Load.py.orig 2016-10-31 20:44:01 UTC
-+++ MoinMoin/action/Load.py
-@@ -14,6 +14,7 @@ from MoinMoin.action import ActionBase, AttachFile
- from MoinMoin.PageEditor import PageEditor
- from MoinMoin.Page import Page
- from MoinMoin.security.textcha import TextCha
-+from MoinMoin.security.sec_recaptcha import ReCaptcha
-
- class Load(ActionBase):
- """ Load page action
-@@ -40,6 +41,8 @@ class Load(ActionBase):
- # but it could be extended to more/all attachment write access
- if not TextCha(request).check_answer_from_form():
- return status, _('TextCha: Wrong answer! Go back and try again...')
-+ if not ReCaptcha(request).check_answer_from_form():
-+ return _('ReCaptcha: Wrong answer! Go back and try again...')
-
- comment = form.get('comment', u'')
- comment = wikiutil.clean_input(comment)
-@@ -97,6 +100,7 @@ class Load(ActionBase):
- <dd><input type="text" name="comment" size="80" maxlength="200"></dd>
- </dl>
- %(textcha)s
-+%(recaptcha)s
- <p>
- <input type="hidden" name="action" value="%(action_name)s">
- <input type="hidden" name="do" value="upload">
-@@ -115,6 +119,7 @@ class Load(ActionBase):
- 'buttons_html': buttons_html,
- 'action_name': self.form_trigger,
- 'textcha': TextCha(self.request).render(),
-+ 'recaptcha': ReCaptcha(self.request).render(),
- }
-
- def execute(pagename, request):
---- MoinMoin/action/newaccount.py.orig 2016-10-31 20:44:01 UTC
-+++ MoinMoin/action/newaccount.py
-@@ -10,6 +10,7 @@ from MoinMoin import user, wikiutil
- from MoinMoin.Page import Page
- from MoinMoin.widget import html
- from MoinMoin.security.textcha import TextCha
-+from MoinMoin.security.sec_recaptcha import ReCaptcha
- from MoinMoin.auth import MoinAuth
-
-
-@@ -26,6 +27,9 @@ def _create_user(request):
- if not TextCha(request).check_answer_from_form():
- return _('TextCha: Wrong answer! Go back and try again...')
-
-+ if not ReCaptcha(request).check_answer_from_form():
-+ return _('ReCaptcha: Wrong answer! Go back and try again...')
-+
- # Create user profile
- theuser = user.User(request, auth_method="new-user")
-
-@@ -141,6 +145,17 @@ def _create_form(request):
- if textcha:
- td.append(textcha.render())
- row.append(td)
-+
-+ recaptcha = ReCaptcha(request)
-+ if recaptcha.is_enabled():
-+ row = html.TR()
-+ tbl.append(row)
-+ row.append(html.TD().append(html.STRONG().append(
-+ html.Text(_('ReCaptcha (required)')))))
-+ td = html.TD()
-+ if recaptcha:
-+ td.append(recaptcha.render())
-+ row.append(td)
-
- row = html.TR()
- tbl.append(row)
---- MoinMoin/PageEditor.py.orig 2016-10-31 20:44:01 UTC
-+++ MoinMoin/PageEditor.py
-@@ -422,6 +422,9 @@ If you don't want that, hit '''%(cancel_button_text)s'
- from MoinMoin.security.textcha import TextCha
- request.write(TextCha(request).render())
-
-+ from MoinMoin.security.sec_recaptcha import ReCaptcha
-+ request.write(ReCaptcha(request).render())
-+
- # Add textarea with page text
- self.sendconfirmleaving()
-
---- MoinMoin/PageGraphicalEditor.py.orig 2016-10-31 20:44:01 UTC
-+++ MoinMoin/PageGraphicalEditor.py
-@@ -305,6 +305,9 @@ If you don't want that, hit '''%(cancel_button_text)s'
- from MoinMoin.security.textcha import TextCha
- request.write(TextCha(request).render())
-
-+ from MoinMoin.security.sec_recaptcha import ReCaptcha
-+ request.write(ReCaptcha(request).render())
-+
- self.sendconfirmleaving() # TODO update state of flgChange to make this work, see PageEditor
-
- # Add textarea with page text
---- MoinMoin/security/sec_recaptcha.py.orig 2018-05-02 03:24:23 UTC
-+++ MoinMoin/security/sec_recaptcha.py
-@@ -0,0 +1,93 @@
-+# -*- coding: iso-8859-1 -*-
-+"""
-+ MoinMoin - recaptcha support
-+
-+ Based heavily on the textcha support in textcha.py
-+
-+ @copyright: 2011 by Steve McIntyre
-+ @copyright: 2018 by d42
-+ @license: GNU GPL, see COPYING for details.
-+"""
-+import json
-+import urllib
-+import urllib2
-+from textwrap import dedent
-+
-+from MoinMoin import log
-+
-+logging = log.getLogger(__name__)
-+
-+
-+class ReCaptcha(object):
-+ """ Recaptcha support """
-+
-+ VERIFY_URL = "https://www.google.com/recaptcha/api/siteverify"
-+
-+ def __init__(self, request):
-+ """ Initialize the Recaptcha setup.
-+
-+ @param request: the request object
-+ """
-+ self.request = request
-+ self.user_info = request.user.valid and request.user.name or request.remote_addr
-+
-+ self.site_key = getattr(request.cfg, "recaptcha_site_key", None)
-+ self.secret_key = getattr(request.cfg, "recaptcha_secret_key", None)
-+
-+ def is_enabled(self):
-+ """ check if we're configured, i.e. we have a key
-+ """
-+ return self.site_key and self.secret_key
-+
-+ def check_answer_from_form(self, form=None):
-+ form = self.request.form if form is None else form
-+
-+ if not self.is_enabled():
-+ return True
-+
-+ return self._submit(
-+ response=form.get("g-recaptcha-response"),
-+ remoteip=self.request.remote_addr
-+ )
-+
-+ def _submit(self, response, remoteip):
-+
-+ def encode_if_necessary(s):
-+ return s.encode("utf-8") if isinstance(s, unicode) else s
-+
-+ data = urllib.urlencode({
-+ "secret": encode_if_necessary(self.secret_key),
-+ "response": encode_if_necessary(response),
-+ "remoteip": encode_if_necessary(remoteip),
-+ })
-+
-+ request = urllib2.Request(
-+ url=self.VERIFY_URL,
-+ data=data,
-+ headers={"Content-type": "application/x-www-form-urlencoded"}
-+ )
-+
-+ try:
-+ resp = urllib2.urlopen(request)
-+ http_code = resp.getcode()
-+ resp_json = json.loads(resp.read())
-+ return resp_json["success"] if http_code == 200 else False
-+ except urllib2.URLError as e:
-+ logging.exception(e)
-+ return False
-+ finally:
-+ resp.close()
-+
-+ def render(self, form=None):
-+ """ Checks if ReCaptchas are enabled and returns HTML for one,
-+ or an empty string if they are not enabled.
-+
-+ @return: unicode result html
-+ """
-+ if not self.is_enabled():
-+ return u""
-+
-+ return dedent(u"""
-+ <script src='//www.google.com/recaptcha/api.js'></script>
-+ <div class="g-recaptcha" data-sitekey="{SITE_KEY}"></div>
-+ """.format(SITE_KEY=self.site_key))
diff --git a/www/moinmoin/files/extra-patch-verifyemail b/www/moinmoin/files/extra-patch-verifyemail
deleted file mode 100644
index 0b5da29c741a..000000000000
--- a/www/moinmoin/files/extra-patch-verifyemail
+++ /dev/null
@@ -1,232 +0,0 @@
-Description: Add support for requiring new accounts to be verified by email
-Origin: http://moinmo.in/MoinMoinPatch/VerifyAccountCreationByEmail
-Author: Steve McIntyre
-Last-Update: 2013-09-04
-
---- ./MoinMoin/action/newaccount.py 2014-10-17 12:45:32.000000000 -0700
-+++ ./MoinMoin/action/newaccount.py 2016-01-15 13:53:33.209638000 -0800
-@@ -12,5 +12,27 @@
- from MoinMoin.security.textcha import TextCha
- from MoinMoin.auth import MoinAuth
-+from MoinMoin.mail import sendmail
-+import subprocess
-
-+def _send_verification_mail(request, user):
-+ _ = request.getText
-+ querystr = {'action': 'verifyaccount',
-+ 'i': user.id,
-+ 'v': user.account_verification}
-+ page = Page(request, "FrontPage")
-+ pagelink = "%(link)s" % {'link': request.getQualifiedURL(page.url(request, querystr))}
-+ subject = _('[%(sitename)s] account verification check for new user %(username)s') % {
-+ 'sitename': request.page.cfg.sitename or request.url_root,
-+ 'username': user.name,
-+ }
-+
-+ text = "Please verify your account by visiting this URL:\n\n %(link)s\n\n" % {
-+ 'link': pagelink}
-+
-+ mailok, msg = sendmail.sendmail(request, user.email, subject, text, request.cfg.mail_from)
-+ if mailok:
-+ return (1, _("Verification message sent to %(email)s" % {'email': user.email}))
-+ else:
-+ return (mailok, msg)
-
- def _create_user(request):
-@@ -43,6 +65,16 @@
-
- # Name required to be unique. Check if name belong to another user.
-- if user.getUserId(request, theuser.name):
-- return _("This user name already belongs to somebody else.")
-+ userid = user.getUserId(request, theuser.name)
-+ if userid:
-+ if request.cfg.require_email_verification and theuser.account_verification:
-+ resendlink = request.page.url(request, querystr={
-+ 'action': 'newaccount',
-+ 'i': userid,
-+ 'resend': '1'})
-+ return _('This user name already belongs to somebody else. If this is a new account'
-+ ' and you need another verification link, try <a href="%s">'
-+ 'sending another one</a>. ' % resendlink)
-+ else:
-+ return _("This user name already belongs to somebody else.")
-
- # try to get the password and pw repeat
-@@ -73,16 +105,39 @@
- theuser.email = email.strip()
- if not theuser.email and 'email' not in request.cfg.user_form_remove:
-- return _("Please provide your email address. If you lose your"
-- " login information, you can get it by email.")
-+ if request.cfg.require_email_verification:
-+ return _("Please provide your email address. You will need it"
-+ " to be able to confirm your registration.")
-+ else:
-+ return _("Please provide your email address. If you lose your"
-+ " login information, you can get it by email.")
-
- # Email should be unique - see also MoinMoin/script/accounts/moin_usercheck.py
- if theuser.email and request.cfg.user_email_unique:
-- if user.get_by_email_address(request, theuser.email):
-- return _("This email already belongs to somebody else.")
-+ emailuser = user.get_by_email_address(request, theuser.email)
-+ if emailuser:
-+ if request.cfg.require_email_verification and theuser.account_verification:
-+ resendlink = request.page.url(request, querystr={
-+ 'action': 'newaccount',
-+ 'i': emailuser.id,
-+ 'resend': '1'})
-+ return _('This email already belongs to somebody else. If this is a new account'
-+ ' and you need another verification link, try <a href="%s">'
-+ 'sending another one</a>. ' % resendlink)
-+ else:
-+ return _("This email already belongs to somebody else.")
-+
-+ # Send verification links if desired
-+ if request.cfg.require_email_verification:
-+ mailok, msg = _send_verification_mail(request, theuser)
-+ if mailok:
-+ 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:
-+ result = _("User account created! You can use this account to login now...")
-
- # save data
- theuser.save()
--
-- result = _("User account created! You can use this account to login now...")
- return result
-
-@@ -171,7 +226,18 @@
- submitted = form.has_key('create')
-
-+ uid = request.values.get('i', None)
-+ resend = request.values.get('resend', None)
-+
- if submitted: # user pressed create button
- request.theme.add_msg(_create_user(request), "dialog")
- return page.send_page()
-+ if resend and uid:
-+ theuser = user.User(request, id=uid)
-+ mailok, msg = _send_verification_mail(request, theuser)
-+ if mailok:
-+ request.theme.add_msg(_("Verification message re-sent to %s" % theuser.email), "dialog")
-+ else:
-+ request.theme.add_msg(_("Unable to re-send verification message, %s" % msg), "dialog")
-+ return page.send_page()
- else: # show create form
- request.theme.send_title(_("Create Account"), pagename=pagename)
---- ./MoinMoin/action/verifyaccount.py 1969-12-31 16:00:00.000000000 -0800
-+++ ./MoinMoin/action/verifyaccount.py 2016-01-15 13:53:33.209957000 -0800
-@@ -0,0 +1,64 @@
-+# -*- coding: iso-8859-1 -*-
-+"""
-+ MoinMoin - verify account action
-+
-+ @copyright: 2012 Steve McIntyre
-+ @license: GNU GPL, see COPYING for details.
-+"""
-+
-+from MoinMoin import user, wikiutil
-+from MoinMoin.Page import Page
-+from MoinMoin.widget import html
-+from MoinMoin.auth import MoinAuth
-+
-+def execute(pagename, request):
-+ found = False
-+ for auth in request.cfg.auth:
-+ if isinstance(auth, MoinAuth):
-+ found = True
-+ break
-+
-+ if not found:
-+ # we will not have linked, so forbid access
-+ request.makeForbidden(403, 'No MoinAuth in auth list')
-+ return
-+
-+ page = Page(request, "FrontPage")
-+ _ = request.getText
-+
-+ if not request.cfg.require_email_verification:
-+ result = _("Verification not configured!")
-+ request.theme.add_msg(result, "error")
-+ return page.send_page()
-+
-+ uid = request.values.get('i', None)
-+ verify = request.values.get('v', None)
-+
-+ # Grab user profile
-+ theuser = user.User(request, id=uid)
-+
-+ # Compare the verification code
-+ if not theuser.valid:
-+ result = _("Unable to verify user account i=%s v=%s") % (uid, verify)
-+ request.theme.add_msg(result, "error")
-+ return page.send_page()
-+
-+ if not theuser.account_verification:
-+ result = _("User account has been verified!")
-+ request.theme.add_msg(result, "error")
-+ return page.send_page()
-+
-+ if theuser.account_verification != verify:
-+ result = _("Unable to verify user account i=%s v=%s") % (uid, verify)
-+ request.theme.add_msg(result, "error")
-+ return page.send_page()
-+
-+ # All looks sane. Mark verification as done, save data
-+ theuser.account_verification = ""
-+ theuser.save()
-+
-+ loginlink = request.page.url(request, querystr={'action': 'login'})
-+ result = _('User account verified! You can use this account to <a href="%s">login</a> now...' % loginlink)
-+ request.theme.add_msg(result, "dialog")
-+ return page.send_page()
-+
---- ./MoinMoin/auth/__init__.py 2014-10-17 12:45:32.000000000 -0700
-+++ ./MoinMoin/auth/__init__.py 2016-01-15 13:53:33.210285000 -0800
-@@ -250,6 +250,13 @@
- check_surge_protect(request, action='auth-name', username=username)
-
-- u = user.User(request, name=username, password=password, auth_method=self.name)
-+ u = user.User(request, name=username, password=password, auth_method=self.name)
- if u.valid:
-+ try:
-+ verification = u.account_verification
-+ except:
-+ verification = False
-+ if request.cfg.require_email_verification and verification:
-+ logging.debug("%s: could not authenticate user %r (not verified yet)" % (self.name, username))
-+ return ContinueLogin(user_obj, _("User account not verified yet."))
- logging.debug("%s: successfully authenticated user %r (valid)" % (self.name, u.name))
- log_attempt("auth/login (moin)", True, request, username)
---- ./MoinMoin/config/multiconfig.py 2014-10-17 12:45:32.000000000 -0700
-+++ ./MoinMoin/config/multiconfig.py 2016-01-15 13:53:33.210918000 -0800
-@@ -1097,4 +1097,6 @@
- ('userprefs_disabled', [],
- "Disable the listed user preferences plugins."),
-+ ('require_email_verification', False ,
-+ "Require verification of new user accounts."),
- )),
- # ==========================================================================
---- ./MoinMoin/user.py 2014-10-17 12:45:32.000000000 -0700
-+++ ./MoinMoin/user.py 2016-01-15 13:53:33.211435000 -0800
-@@ -24,4 +24,5 @@
- from copy import deepcopy
- import md5crypt
-+import uuid
-
- try:
-@@ -523,4 +524,10 @@
- if password is not None:
- self.enc_password = encodePassword(self._cfg, 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:
-+ self.account_verification = ""
-
- # "may" so we can say "if user.may.read(pagename):"
-
diff --git a/www/moinmoin/files/patch-setup.cfg b/www/moinmoin/files/patch-setup.cfg
deleted file mode 100644
index 3255dbcefa1c..000000000000
--- a/www/moinmoin/files/patch-setup.cfg
+++ /dev/null
@@ -1,10 +0,0 @@
---- setup.cfg.orig 2018-09-09 18:10:20 UTC
-+++ setup.cfg
-@@ -1,6 +1,6 @@
- # MoinMoin - Distutils config
- #
--# Copyright (c) 2001 by Jürgen Hermann <jh@web.de>
-+# Copyright (c) 2001 by Jurgen Hermann <jh@web.de>
- # All rights reserved, see COPYING for details.
-
- [bdist_rpm]
diff --git a/www/moinmoin/files/patch-setup.py b/www/moinmoin/files/patch-setup.py
deleted file mode 100644
index 18960d14d2ca..000000000000
--- a/www/moinmoin/files/patch-setup.py
+++ /dev/null
@@ -1,10 +0,0 @@
---- setup.py.orig 2016-10-31 20:44:02 UTC
-+++ setup.py
-@@ -26,6 +26,7 @@ def isbad(name):
- return (name.startswith('.') or
- name.startswith('#') or
- name.endswith('.pickle') or
-+ name.endswith('.orig') or
- name == 'CVS')
-
- def isgood(name):
diff --git a/www/moinmoin/files/pkg-install.in b/www/moinmoin/files/pkg-install.in
deleted file mode 100644
index 601cf963bff0..000000000000
--- a/www/moinmoin/files/pkg-install.in
+++ /dev/null
@@ -1,148 +0,0 @@
-#! /bin/sh
-
-destdir=%%MOINDEST%%
-htdocs=%%HTDOCS%%
-moinver=%%MOINVER%%
-
-case "x$2" in
-
-"xINSTANCE")
-
- echo "************************************************************"
-
- case "x$3" in
-
- "xMOD_PYTHON")
-
- echo "Since you chose MOINTYPE=MOD_PYTHON, you may want to"
- echo "add something like that to your Apache configuration."
- echo ""
- echo ",-----"
- echo " Alias /moin_static$moinver/ \"$htdocs/\""
- echo " <Directory \"$htdocs/\">"
- echo " Order deny,allow"
- echo " Allow from all"
- echo " </Directory>"
- echo " Alias /mywiki $destdir"
- echo " <Location \"/mywiki\">"
- echo " SetHandler python-program"
- echo " PythonPath \"['$destdir'] + sys.path\""
- echo " PythonHandler MoinMoin.request.request_modpython::Request.run"
- echo " PythonAutoReload On"
- echo " PythonDebug On"
- echo " </Location>"
- echo "\`-----"
- echo ""
-
- ;;
-
- "xCGI")
-
- echo "Since you chose MOINTYPE=CGI, you may want to"
- echo "add something like that to your Apache configuration."
- echo ""
-
- echo ",-----"
- echo " Alias /moin_static$moinver/ \"$htdocs/\""
- echo " <Directory \"$htdocs/\">"
- echo " Order deny,allow"
- echo " Allow from all"
- echo " </Directory>"
- echo " ScriptAlias /mywiki \"$destdir/moin.cgi\""
- echo " <Directory \"$destdir/\">"
- echo " Order deny,allow"
- echo " Allow from all"
- echo " </Directory>"
- echo "\`-----"
- echo ""
-
- ;;
-
- "xWSGI")
-
- echo "Since you chose MOINTYPE=WSGI, you should "
- echo "add something like that to your Apache configuration."
- echo ""
-
- echo ",-----"
- echo " Alias /moin_static$moinver/ \"$htdocs/\""
- echo " <Directory \"$htdocs/\">"
- echo " Order deny,allow"
- echo " Allow from all"
- echo " </Directory>"
- echo " WSGIScriptAlias /mywiki \"$destdir/moin.wsgi\""
- echo "#If you use HTTP authorization enable the following also"
- echo "#WSGIPassAuthorization On"
- echo " <Directory \"$destdir/\">"
- echo " Order deny,allow"
- echo " Allow from all"
- echo " </Directory>"
- echo "\`-----"
- echo ""
-
- ;;
-
- *)
-
- ;;
-
- esac
-
- echo "You may need to modify wikiconfig.py in your wiki instance"
- echo "directory (eg. $destdir)."
- echo ""
- echo "If you want to install additional wiki instances"
- echo "call 'make instance' with appriopriate arguments."
- echo "E.g.: make MOINTYPE=FCGI MOINDEST=%%PREFIX%%/www/wiki instance"
- echo "************************************************************"
-
- ;;
-
-"xPOST-INSTALL")
-
- echo "************************************************************"
- echo "Important: You have currently no wiki instance installed."
- echo ""
- echo "If you're installing from ports, just run 'make instance'"
- echo "with appriopriate arguments."
- echo "eg. make MOINTYPE=FCGI MOINDEST=%%PREFIX%%/www/wiki instance"
- echo ""
- echo "If you're installing from package, run these commands."
- echo ""
- echo "# Choose here one script depending on the type of wiki you"
- echo "# want : moin.py (standalone), moin.fcg (FCGI), moin.wsgi (WSGI) or moin.cgi."
- echo 'export MOINSCRIPT="moin.cgi"'
- echo '# Defaults should be fine but you may want to modify these.'
- echo 'export MOINDIR="%%MOINDIR%%"'
- echo 'export MOINDEST="%%MOINDEST%%"'
- echo '# Set this to your apache user and group.'
- echo 'export CGIUSER="www"'
- echo 'export CGIGROUP="www"'
- echo ''
- echo 'mkdir -p ${MOINDEST}/data'
- echo 'mkdir -p ${MOINDEST}/underlay'
- echo 'cp -R ${MOINDIR}/data ${MOINDEST}'
- echo 'cp -R ${MOINDIR}/underlay ${MOINDEST}'
- echo 'chmod -R u+rw,go-ws ${MOINDEST}/data'
- echo 'install -m 0555 ${MOINDIR}/config/wikiconfig.py ${MOINDEST}'
- echo 'test -z "${MOINSCRIPT}" || \'
- echo ' install -m 0555 ${MOINDIR}/server/${MOINSCRIPT} ${MOINDEST}'
- echo 'chown -R ${CGIUSER}:${CGIGROUP} ${MOINDEST}'
- echo ""
- echo "Note: export might not work with your shell, use"
- echo "# setenv VAR 'value' instead"
- echo "************************************************************"
-
- ;;
-
-"xDEINSTALL")
-
- echo "************************************************************"
- echo "All shared files have been removed."
- echo "To complete deinstallation, please remove all the wiki"
- echo "instances you have created."
- echo "************************************************************"
-
- ;;
-
-esac