Here are two ways to disable the CSRF in Symfony 2 Forms:
And while creating the form:
If this has been helpful please donate, thanks!
http://www.craftitonline.com/2011/08/symfony-2-how-to-disable-csrf-on-a-per-form-basis/Development, Software, Hardware, System, Network, API, WebService, Programmation and co..
public function getDefaultOptions(array $options) { return array( 'data_class' => 'Acme\TaskBundle\Entity\Task', 'csrf_protection' => false, // <---- set this to false on a per Form Type basis //'csrf_field_name' => '_token', // a unique key to help generate the secret token //'intention' => 'task_item', ); } |
$form = $this->createFormBuilder($users, array( 'csrf_protection' => false, // <---- set this to false on a per Form Instance basis ))->add(...) ; |
String.prototype.sansAccent = function(){ var accent = [ /[\300-\306]/g, /[\340-\346]/g, // A, a /[\310-\313]/g, /[\350-\353]/g, // E, e /[\314-\317]/g, /[\354-\357]/g, // I, i /[\322-\330]/g, /[\362-\370]/g, // O, o /[\331-\334]/g, /[\371-\374]/g, // U, u /[\321]/g, /[\361]/g, // N, n /[\307]/g, /[\347]/g, // C, c ]; var noaccent = ['A','a','E','e','I','i','O','o','U','u','N','n','C','c']; var str = this; for(var i = 0; i < accent.length; i++){ str = str.replace(accent[i], noaccent[i]); } return str;}
http://www.finalclap.com/faq/257-javascript-supprimer-remplacer-accentservice ftp
{
disable = yes
socket_type = stream
protocol = tcp
wait = no
user = root
instances = UNLIMITED
server = /usr/sbin/in.proftpd
server_args = -c /etc/proftpd.conf
}
/etc/init.d/xinetd restart
BEGIN FOR c IN (SELECT c.owner, c.table_name, c.constraint_name FROM user_constraints c, user_tables t WHERE c.table_name = t.table_name AND c.status = 'ENABLED' ORDER BY c.constraint_type DESC) LOOP dbms_utility.exec_ddl_statement('alter table ' || c.owner || '.' || c.table_name || ' disable constraint ' || c.constraint_name); END LOOP; END;
BEGIN FOR c IN (SELECT c.owner, c.table_name, c.constraint_name FROM user_constraints c, user_tables t WHERE c.table_name = t.table_name AND c.status = 'DISABLED' ORDER BY c.constraint_type) LOOP dbms_utility.exec_ddl_statement('alter table ' || c.owner || '.' || c.table_name || ' enable constraint ' || c.constraint_name); END LOOP; END;
Source : http://www.silverlake.fr/index.php?post/2010/12/11/Lever-et-activer-les-contraintes-Oracle