CodeIgniter Forums
LogicException #403 - CSRF problem - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: CodeIgniter 4 (https://forum.codeigniter.com/forum-28.html)
+--- Forum: CodeIgniter 4 Support (https://forum.codeigniter.com/forum-30.html)
+--- Thread: LogicException #403 - CSRF problem (/thread-68671.html)



LogicException #403 - CSRF problem - puschie - 08-11-2017

Hey, sometimes i get a LogicException #403

LogicException #403 The action you requested is not allowed

error when i try to login. cant reproduce it reliable, it happend every week once i guess and is fixed after a reload ( the last few times it was right after a browser start with the login page as stored tab )

Login html :
PHP Code:
<?= form_openbase_admin_url() ) ?>
    <div class="input-field">
        <input type="text" name="username" size="45" <?php if( isset( $username ) ) echo 'value="'$username'"'?> required />
        <label>Username</label>
    </div>
    <div class="input-field">
        <input type="password" name="password" size="72" <?php if( isset( $password ) ) echo 'value="'$password'"'?> required />
        <label>Password</label>
    </div>
    <input class="btn" type="submit" value="Login" />
    </form> 

i do no redirect in the login check so i cant imangine how it can result in something like this


RE: LogicException #403 - CSRF problem - InsiteFX - 08-11-2017

PHP Code:
// Your username and password should be periods not commas!

<?php if( isset( $username ) ) echo 'value="'.$username.'"'?>

<?php if( isset( $password ) ) echo 'value="'.$password.'"'?>



RE: LogicException #403 - CSRF problem - puschie - 08-11-2017

yes, i know but it will not change the behaviour

i also noticed it in chrome and firefox ( didnt use/test edge often enoguh )


RE: LogicException #403 - CSRF problem - puschie - 08-11-2017

happend again - here is screenshot of the request


[Image: CSRF.jpg]