Welcome Guest, Not a member yet? Register   Sign In
Security issue - redirect
#1

[eluser]Unknown[/eluser]
I am currently developing a cms system and I have coded my own simple Auth library.
Nothing fancy, but I wanted to check if things are secure enough.

When a user logs in, the lib sets some session attributes. One of them is "isLoggedIn" set to TRUE. This one I use in the "checkIfLoggedIn()" function.
Now; I have made a function which also checks if the user has logged in and if not; does a redirect to the login page:
Code:
function checkLogin() {
   if(!$this->isLoggedIn()) {
      $CI =& get_instance();
            
      $CI->load->helper('url');
      redirect('admin/login', 'refresh');
   }
}
On the page I want to secure I use this: (controller)
Code:
function index() {
   $this->load->library('authLib');

   $this->authLib->checkLogin();
        
    echo "Here goes the rest of the code if you have logged in.";
}
Is this way of working secure enough or do I need to provide some extra security?


Messages In This Thread
Security issue - redirect - by El Forum - 04-09-2008, 04:23 AM
Security issue - redirect - by El Forum - 04-09-2008, 06:17 AM
Security issue - redirect - by El Forum - 04-09-2008, 08:22 AM
Security issue - redirect - by El Forum - 04-09-2008, 08:34 AM



Theme © iAndrew 2016 - Forum software by © MyBB