Description
OpenID server fails in 1.9:
2009-12-15 13:08:16: (mod_fastcgi.c.2698) FastCGI-stderr: Traceback (most recent call last): File "/usr/local/src/moin/MoinMoin/support/flup/server/fcgi_base.py", line 558, in run protocolStatus, appStatus = self.server.handler(self) File "/usr/local/src/moin/MoinMoin/support/flup/server/fcgi_base.py", line 1118, in handler result = self.application(environ, start_response) File "/usr/local/src/moin/MoinMoin/support/werkzeug/utils.py", line 248, in __call__ return self.app(environ, start_response) File "/usr/local/src/moin/MoinMoin/wsgiapp.py", line 263, in __call__ response = run(context) File "/usr/local/src/moin/MoinMoin/wsgiapp.py", line 70, in run response = dispatch(request, context, action_name) File "/usr/local/src/moin/MoinMoin/wsgiapp.py", line 118, in dispatch response = handle_action(context, pagename, action_name) File "/usr/local/src/moin/MoinMoin/wsgiapp.py", line 177, in handle_action handler(context.page.page_name, context) File "/usr/local/src/moin/MoinMoin/action/__init__.py", line 261, in do_show content_only=content_only, File "/usr/local/src/moin/MoinMoin/Page.py", line 1150, in send_page (openid_group_name in request.groups and openid_username in request.groups[openid_group_name]): File "/usr/local/src/moin/MoinMoin/datastruct/backends/wiki_groups.py", line 63, in __contains__ return self.is_group_name(group_name) and Page(self.request, group_name).exists() File "/usr/local/src/moin/MoinMoin/datastruct/backends/__init__.py", line 60, in is_group_name return self.page_group_regex.match(member) TypeError: expected string or buffer
Steps to reproduce
- enable openid server
Example
see above
Component selection
- Page.py -- openid server part
Details
MoinMoin Version |
1.9 from repo as of today |
OS and Version |
|
Python Version |
|
Server Setup |
|
Server Details |
|
Language you are using the wiki in (set in the browser/UserPreferences) |
|
Workaround
n/a
Discussion
Fix:
diff --git a/MoinMoin/Page.py b/MoinMoin/Page.py index f6064ff..d8b28b3 100644 --- a/MoinMoin/Page.py +++ b/MoinMoin/Page.py @@ -1146,8 +1146,9 @@ class Page(object): userid = user.getUserId(request, openid_username) openid_group_name = request.cfg.openid_server_restricted_users_group - if userid is not None and not openid_group_name or \ - (openid_group_name in request.groups and openid_username in request.groups[openid_group_name]): + if userid is not None and ( + not openid_group_name or \ + (openid_group_name in request.groups and openid_username in request.groups[openid_group_name])): html_head = '<link rel="openid2.provider" href="%s">' % \ wikiutil.escape(request.getQualifiedURL(self.url(request, querystr={'action': 'serveopenid'})), True)
Plan
- Priority:
- Assigned to:
Status: fixed by http://hg.moinmo.in/moin/1.9/rev/ff8bda185098