ianlandsman / honeypot Goto Github PK
View Code? Open in Web Editor NEWSpam catcher bundle for the Laravel framework
Spam catcher bundle for the Laravel framework
You write time_field_name and than field_name_time
Think rules should look like this
'honey_field_name' => 'honeypot',
'time_field_name' => 'required|honeytime:5'
and than form like this:
{{ Form::honeypot('honey_field_name', 'time_field_name') }}
When I add the honeypot fields to a view I get the following error when I try to load the page. Removing "{{ Form::honeypot('homepage', 'time') }}" from the view solves it.
Unhandled Exception
Message:
mcrypt_encrypt(): Size of key is too large for this algorithm
Changing the Application key in the config file to a shorter one solved the problem. Strange thing is that encrypting cookies and sessions haven't given me any problems.
hello
really need your help ... Honeypot work great on localhost but I upload to server it giving me error
http://www.shiateachings.com/public/ilm/article/20/3
when i remove this line of code from the page it works fine
" {{ Form::honeypot('honey_field_name', 'time_field_name') }} "
this is whole form
{{ Form::open('comments', 'POST', array('class' => 'adminf')) }}
name, email, text box field
{{ Form::submit('Post Comments') }}
{{ Form::honeypot('honey_field_name', 'time_field_name') }}
{{ Form::token() }}
{{ Form::close() }}
Unhandled Exception
Message:
Method [honeypot] does not exist.
Location:
/home/mirlabs/public_html/shiateachings/laravel/form.php on line 615
Stack Trace:
#0 /home/mirlabs/public_html/shiateachings/laravel/view.php(366) : eval()'d code(179): Laravel\Form::__callStatic('honeypot', Array)
#1 /home/mirlabs/public_html/shiateachings/laravel/view.php(366) : eval()'d code(179): Laravel\Form::honeypot('honey_field_nam...', 'time_field_name')
#2 /home/mirlabs/public_html/shiateachings/laravel/view.php(366): eval()
#3 /home/mirlabs/public_html/shiateachings/laravel/blade.php(71): Laravel\View->get()
#4 [internal function]: Laravel{closure}(Object(Laravel\View))
#5 /home/mirlabs/public_html/shiateachings/laravel/event.php(199): call_user_func_array(Object(Closure), Array)
#6 /home/mirlabs/public_html/shiateachings/laravel/event.php(138): Laravel\Event::fire('laravel.view.en...', Array, true)
#7 /home/mirlabs/public_html/shiateachings/laravel/view.php(337): Laravel\Event::until('laravel.view.en...', Array)
#8 /home/mirlabs/public_html/shiateachings/laravel/view.php(570): Laravel\View->render()
#9 /home/mirlabs/public_html/shiateachings/laravel/response.php(246): Laravel\View->__toString()
#10 /home/mirlabs/public_html/shiateachings/laravel/laravel.php(178): Laravel\Response->render()
#11 /home/mirlabs/public_html/shiateachings/public/index.php(34): require('/home/mirlabs/p...')
#12 {main}
Thank You..
I'll suggest shorter view html:
<div style="display: none !important">
{{ Form::text(Config::get('honeypot::default.honeypot_field'), '', array('id' => Config::get('honeypot::default.honeypot_field'))) }}
{{ Form::hidden(Config::get('honeypot::default.honeypot_field').'_time', time()) }}
There must be away to inform those users not to fill this hidden field.
I'm not really sure if using inline css to hide the honeypot is the best way to hide it to human users.
Might spambots parse the css, discover it's hidden from users, and leave it empty on purpose?
I think JS is less likely to be executed by spambots, so the solution might be more bulletproof.
What's your say?
Hi Ian,
It would be great to have the ability to set the name of the fields directly from the html declaration, something similar to this:
{{ Form::honeypot('fieldname', 'speed') }}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.