Welcome Guest, Not a member yet? Register   Sign In
Why if I allow C_I 4.1.8 csrf block post?
#1

(This post was last modified: 02-12-2022, 02:59 AM by luckmoshy.)

Hi guys If set csrf All
Code:
posting methods
not working

PHP Code:
public $globals = [
        
'before' => [
               
'honeypot',
               
//if allowed not working
               
'post' => ['csrf'],/*All posting methos not working*/

              // if not allowed  are working
               //'post' => ['csrf'] 
               
               
'invalidchars',
        ],
       
    ]; 
Codeigniter First, Codeigniter Then You!!
yekrinaDigitals

Reply
Reply
#3

What do you mean by "posting methods not working" ?
What did you see?
Reply
#4

(This post was last modified: 02-13-2022, 06:07 AM by luckmoshy.)

(02-13-2022, 01:39 AM)kenjis Wrote: What do you mean by "posting methods not working" ?
What did you see?

I mean In C_I 4.1.8 I have allowed
Code:
csrf
but all posting methods do not work

I have done like this

PHP Code:
public $globals = [
    
'before' => [
        
'csrf',/*All post methods do not work  */
       // 'csrf',/*If I disable csrf  work Why???  */
    
],
    
'after' => [],
]; 

eg
PHP Code:
public function post(){/*from from action*/
   
return view('create');/*here does not post any thing but if I desable csrf I works fine*/
/*$routes->post('create', 'CreatePost::methodPost');;*/

Codeigniter First, Codeigniter Then You!!
yekrinaDigitals

Reply
#5

Does the data being sent contain csrf token and hash?
Reply
#6

> but all posting methods do not work
> here does not post any thing

What happened?
What did you see? What did you get?

All you say is *not*, but I don't ask *not*.
Reply




Theme © iAndrew 2016 - Forum software by © MyBB