| 1 | <?php defined('BASEPATH') OR exit('No direct script access allowed'); |
||
| 3 | class MY_Security extends CI_Security { |
||
| 4 | public function __construct() { |
||
| 7 | |||
| 8 | //FIXME: This is pretty much just a quick hack. Not too sure if this causes any security issues. |
||
| 9 | public function csrf_show_error() { |
||
|
|
|||
| 10 | header("Location: {$_SERVER['REQUEST_URI']}"); |
||
| 11 | } |
||
| 12 | } |
||
| 13 |
Instead of super-globals, we recommend to explicitly inject the dependencies of your class. This makes your code less dependent on global state and it becomes generally more testable: