mirror of
https://github.com/reddit-archive/reddit.git
synced 2026-01-14 09:27:57 -05:00
Sharing: Remove CAPTCHA for email share
We're no longer requiring a CAPTCHA for the email share feature. Sharing by email/username requires login and is also rate limited.
This commit is contained in:
@@ -1906,7 +1906,6 @@ class ApiController(RedditController):
|
||||
@validatedForm(
|
||||
VUser(),
|
||||
VModhash(),
|
||||
VCaptcha(),
|
||||
VRatelimitImproved(prefix='share', max_usage=g.RL_SHARE_MAX_REQS,
|
||||
rate_user=True, rate_ip=True),
|
||||
share_from=VLength('share_from', max_length=100),
|
||||
@@ -1944,9 +1943,6 @@ class ApiController(RedditController):
|
||||
errors.TOO_MANY_EMAILS):
|
||||
shareform.find(".share-to-errors").children().hide()
|
||||
return
|
||||
# lastly, check the captcha.
|
||||
elif shareform.has_errors("captcha", errors.BAD_CAPTCHA):
|
||||
return
|
||||
elif shareform.has_errors("ratelimit", errors.RATELIMIT):
|
||||
return
|
||||
|
||||
|
||||
@@ -3287,7 +3287,6 @@ class NewLink(Templated):
|
||||
|
||||
class ShareLink(CachedTemplate):
|
||||
def __init__(self, link_name = "", emails = None):
|
||||
self.captcha = c.user.needs_captcha()
|
||||
self.username = c.user.name
|
||||
Templated.__init__(self, link_name=link_name)
|
||||
|
||||
|
||||
@@ -21,7 +21,6 @@
|
||||
###############################################################################
|
||||
|
||||
<%namespace file="utils.html" import="error_field"/>
|
||||
<%namespace file="captcha.html" import="captchagen"/>
|
||||
|
||||
<form onsubmit="return post_form(this, 'share')" method="post"
|
||||
id="sharelink_${thing.link_name}"
|
||||
@@ -106,9 +105,6 @@
|
||||
${error_field("TOO_LONG", "message")}
|
||||
</td>
|
||||
</tr>
|
||||
%if thing.captcha:
|
||||
${captchagen('', tabulate = False, size = 30)}
|
||||
%endif
|
||||
<tr>
|
||||
<td>
|
||||
</td>
|
||||
|
||||
Reference in New Issue
Block a user