Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

wiki: Ensure spammed users cannot create. #770

Closed
wants to merge 1 commit into from

3 participants

@andre-d

No description provided.

@spladug
Owner

commit message nit: create what?

@spladug
Owner

:fish:

@Dominoed

Wiki pages I assume

@spladug
Owner

Well, yes, @Dominoed, but I was suggesting that the commit message should say that :P

@andre-d andre-d closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on May 9, 2013
  1. @andre-d
This page is out of date. Refresh to see the latest.
Showing with 2 additions and 1 deletion.
  1. +2 −1  r2/r2/controllers/wiki.py
View
3  r2/r2/controllers/wiki.py
@@ -289,7 +289,8 @@ def POST_wiki_edit(self, pageandprevious, content, page_name, reason):
error = c.errors.get(('WIKI_CREATE_ERROR', 'page'))
if error:
self.handle_error(403, **(error.msg_params or {}))
- page = WikiPage.create(c.site, page_name)
+ if not c.user._spam:
+ page = WikiPage.create(c.site, page_name)
if c.user._spam:
error = _("You are doing that too much, please try again later.")
self.handle_error(415, 'SPECIAL_ERRORS', special_errors=[error])
Something went wrong with that request. Please try again.