Skip to content

Commit f4c296d

Browse files
authored
Merge pull request #3253 from metacpan/haarg/remove-captcha
remove captcha
2 parents dd53856 + 53b7030 commit f4c296d

File tree

13 files changed

+7
-119
lines changed

13 files changed

+7
-119
lines changed

app.psgi

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,7 @@ builder {
8888
"frame-ancestors 'self' *.metacpan.org",
8989

9090
# temporary 'unsafe-eval' because root/static/js/jquery.tablesorter.js
91-
"script-src 'self' 'unsafe-eval' 'unsafe-inline' *.metacpan.org https://*.googletagmanager.com https://www.google.com/recaptcha/ https://www.gstatic.com/recaptcha/",
92-
91+
"script-src 'self' 'unsafe-eval' 'unsafe-inline' *.metacpan.org https://*.googletagmanager.com",
9392
),
9493
'X-Frame-Options' => 'SAMEORIGIN',
9594
'X-XSS-Protection' => '1; mode=block',

lib/MetaCPAN/Web/Authentication/User.pm

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,8 @@ sub BUILDARGS {
4242

4343
sub for_session { $_[0]->token }
4444

45-
has id => ( is => 'ro' );
46-
has looks_human => ( is => 'ro' );
47-
has passed_captcha => ( is => 'ro' );
48-
has access_token => ( is => 'ro' );
45+
has id => ( is => 'ro' );
46+
has access_token => ( is => 'ro' );
4947
has identity => (
5048
is => 'ro',
5149
isa => HashRef->plus_coercions( ArrayToHash ['name'] ),
@@ -70,7 +68,6 @@ for my $method ( qw(
7068
get_profile
7169
add_favorite
7270
remove_favorite
73-
turing
7471
) )
7572
{
7673
no strict 'refs';

lib/MetaCPAN/Web/Controller/Account/Favorite.pm

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,7 @@ sub add : Local : Args(0) {
3232
}
3333
}
3434
else {
35-
$c->res->redirect(
36-
$res->{error}
37-
? $c->uri_for('/account/turing/index')
38-
: $c->req->referer
39-
);
35+
$c->res->redirect( $c->req->referer );
4036
}
4137
}
4238

lib/MetaCPAN/Web/Controller/Account/Turing.pm

Lines changed: 0 additions & 32 deletions
This file was deleted.

lib/MetaCPAN/Web/Model/API/User.pm

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -86,15 +86,6 @@ sub remove_favorite {
8686
undef, { access_token => $token }, 'DELETE' );
8787
}
8888

89-
sub turing {
90-
my ( $self, $token, $answer ) = @_;
91-
$self->request(
92-
'/user/turing',
93-
{ answer => $answer },
94-
{ access_token => $token },
95-
);
96-
}
97-
9889
__PACKAGE__->meta->make_immutable;
9990

10091
1;

metacpan_web.conf

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,6 @@ mark_unauthorized_releases = 0
1616
cache = 1
1717
</View::Xslate>
1818

19-
<Controller::Account::Turing>
20-
public_key 6LeH2MsSAAAAANwz3AA73Gw5OjCVjT6I51Ev-ior
21-
</Controller::Account::Turing>
22-
2319
<sitemap sitemap-authors.xml.gz>
2420
object_type = author
2521
field_name = pauseid

root/account/turing.tx

Lines changed: 0 additions & 24 deletions
This file was deleted.

root/base/account.tx

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,6 @@
33
%% }
44
%% override left_nav_classes -> { 'nav nav-pills nav-stacked' }
55
%% override left_nav_content -> {
6-
%% if !$user.looks_human {
7-
<li class="[% if $current['account/turing'] { 'active' } %]">
8-
<a href="/account/turing">Verify Account</a>
9-
</li>
10-
%% }
116
<li class="[% if $current['account/identities'] { 'active' } %]">
127
<a href="/account/identities">Identities</a>
138
</li>

root/static/js/cpan.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -236,9 +236,7 @@ for (const favForm of document.querySelectorAll('form[action="/account/favorite/
236236
body: formData,
237237
});
238238
if (!response.ok) {
239-
if (confirm("You have to complete a Captcha in order to ++.")) {
240-
document.location.href = "/account/turing";
241-
}
239+
alert("Error adding favorite!");
242240
}
243241

244242
const button = favForm.querySelector('button');

root/static/js/main.mjs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import './cpan.js';
55
import './github.js';
66
import './dropdown.js';
77
import './profile.js';
8-
import './recaptcha.mjs';
98
import './search.js';
109
import 'bootstrap/js/dropdown.js';
1110
import 'bootstrap/js/collapse.js';

0 commit comments

Comments
 (0)