commit/galaxy-central: martenson: honeypot trap for bot registering accounts
1 new commit in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/commits/2d78abc47928/ Changeset: 2d78abc47928 User: martenson Date: 2013-10-16 17:40:02 Summary: honeypot trap for bot registering accounts Affected #: 2 files diff -r d3d4210d0abee42c4c7cb8d66b8a325f340899c1 -r 2d78abc47928918a14f56711657696724cd9af72 lib/galaxy/webapps/galaxy/controllers/user.py --- a/lib/galaxy/webapps/galaxy/controllers/user.py +++ b/lib/galaxy/webapps/galaxy/controllers/user.py @@ -594,6 +594,12 @@ @web.expose def create( self, trans, cntrller='user', redirect_url='', refresh_frames=[], **kwd ): params = util.Params( kwd ) + + # If the honeypot field is not empty we are dealing with a bot. + honeypot_field = params.get( 'bear_field', '' ) + if honeypot_field != '': + return trans.show_error_message( "You are considered a bot. If you are not one please try registering again and follow the form's legend. <a target=\"_top\" href=\"%s\">Go to the home page</a>." ) % url_for( '/' ) + message = util.restore_text( params.get( 'message', '' ) ) status = params.get( 'status', 'done' ) use_panels = util.string_as_bool( kwd.get( 'use_panels', True ) ) diff -r d3d4210d0abee42c4c7cb8d66b8a325f340899c1 -r 2d78abc47928918a14f56711657696724cd9af72 templates/user/register.mako --- a/templates/user/register.mako +++ b/templates/user/register.mako @@ -162,7 +162,7 @@ %endif <div id="for_bears"> If you see this, please leave following field blank. - <input type="text" name="please leave this field blank" size="1" value=""/> + <input type="text" name="bear_field" size="1" value=""/></div><div class="form-row"><input type="submit" id="send" name="create_user_button" value="Submit"/> Repository URL: https://bitbucket.org/galaxy/galaxy-central/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email.
participants (1)
-
commits-noreply@bitbucket.org