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:
Florence Yeun
2015-06-05 16:32:07 -07:00
parent 7b37d04a1c
commit e12672018d
3 changed files with 0 additions and 9 deletions

View File

@@ -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

View File

@@ -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)

View File

@@ -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>