Changesets can be listed by changeset number.
The Git repository is here.
Changeset 427
Version 1.0.1 of the Hub application, which adds reCaptcha
verification to the sign-up form. Implemented after spambots
attacked the ROOL site and signed up hundreds of bogus users.
- Comitted by: rool
- Date: Tuesday August 30 11:48:22 2011 (over 13 years ago)
Affected files:
- rool/rails/hub/trunk/vendor/plugins/recaptcha/
- rool/rails/hub/trunk/vendor/plugins/recaptcha/lib/
- rool/rails/hub/trunk/vendor/plugins/recaptcha/lib/recaptcha/
- rool/rails/hub/trunk/vendor/plugins/recaptcha/tasks/
- rool/rails/hub/trunk/vendor/plugins/recaptcha/test/
- rool/rails/hub/trunk/config/initializers/01_recaptcha.rb
- rool/rails/hub/trunk/vendor/plugins/recaptcha/CHANGELOG
- rool/rails/hub/trunk/vendor/plugins/recaptcha/Gemfile
- rool/rails/hub/trunk/vendor/plugins/recaptcha/LICENSE
- rool/rails/hub/trunk/vendor/plugins/recaptcha/README.rdoc
- rool/rails/hub/trunk/vendor/plugins/recaptcha/Rakefile
- rool/rails/hub/trunk/vendor/plugins/recaptcha/VERSION
- rool/rails/hub/trunk/vendor/plugins/recaptcha/init.rb
- rool/rails/hub/trunk/vendor/plugins/recaptcha/lib/recaptcha.rb
- rool/rails/hub/trunk/vendor/plugins/recaptcha/lib/recaptcha/client_helper.rb
- rool/rails/hub/trunk/vendor/plugins/recaptcha/lib/recaptcha/configuration.rb
- rool/rails/hub/trunk/vendor/plugins/recaptcha/lib/recaptcha/merb.rb
- rool/rails/hub/trunk/vendor/plugins/recaptcha/lib/recaptcha/rails.rb
- rool/rails/hub/trunk/vendor/plugins/recaptcha/lib/recaptcha/railtie.rb
- rool/rails/hub/trunk/vendor/plugins/recaptcha/lib/recaptcha/verify.rb
- rool/rails/hub/trunk/vendor/plugins/recaptcha/recaptcha.gemspec
- rool/rails/hub/trunk/vendor/plugins/recaptcha/tasks/recaptcha_tasks.rake
- rool/rails/hub/trunk/vendor/plugins/recaptcha/test/recaptcha_test.rb
- rool/rails/hub/trunk/vendor/plugins/recaptcha/test/verify_recaptcha_test.rb
- rool/rails/hub/trunk/CHANGELOG (diff)
- rool/rails/hub/trunk/VERSION (diff)
- rool/rails/hub/trunk/app/controllers/account_controller.rb (diff)
- rool/rails/hub/trunk/app/views/account/signup.html.erb (diff)
rool/rails/hub/trunk/CHANGELOG:
prev. | current | |
1 | 1.0.1 (30-Aug-2011) | |
2 | =================== | |
3 | ||
4 | Added reCaptcha verification to the sign-up form via the following, installed | |
5 | as a plugin: | |
6 | ||
7 | https://github.com/ambethia/recaptcha | |
8 | ||
9 | This was required because the ROOL Hub installation started to get hit by | |
10 | literally hundreds of bogus signups from bots. JavaScript-free operation | |
11 | is *just about* possible but very confusing and awkward. | |
12 | ||
13 | ||
1.0.0 (31-Jan-2011) | ||
=================== | ||
rool/rails/hub/trunk/VERSION:
prev. | current | |
1 | ||
1 | 1.0.1 (30-Aug-2011) |
rool/rails/hub/trunk/app/controllers/account_controller.rb:
prev. | current | |
else | ||
114 | # Have to do the captcha verification explicitly before trying to save | |
115 | # the model, as verification is not done as part of validation and we | |
116 | # don't want to successfully save a model only to find that the captcha | |
117 | # text is incorrect. | |
118 | ||
119 | raise ActiveRecord::RecordInvalid.new(@user) if not verify_recaptcha( | |
120 | :model => @user, | |
121 | :message => "The \"prove you're a human\" response did not match the reCaptcha challenge images" | |
122 | ) | |
123 | ||
@user.roles = HubSsoLib::Roles.new(false).to_s | ||
@user.save! | ||
rool/rails/hub/trunk/app/views/account/signup.html.erb:
prev. | current | |
<th bgcolor="#eeeeee" align="left"><label for="password_confirmation">Confirm password</label></th> | ||
<td><%= f.password_field :password_confirmation, { :size => 40, :maxlength => 40 } %></td> | ||
</tr> | ||
34 | <tr> | |
35 | <td colspan="2"> | |
36 | <div align="center"> | |
37 | <br /> | |
38 | Please prove that you're a human! | |
39 | ||
40 | <br /> | |
41 | <br /> | |
42 | <%= recaptcha_tags( :ssl => true ) %> | |
43 | ||
44 | <br /> | |
45 | </div> | |
46 | </td> | |
47 | </tr> | |
</table> | ||
<p align="center" /> |