codeigniter-restserver icon indicating copy to clipboard operation
codeigniter-restserver copied to clipboard

Release 3.0.0 has no authentication

Open mbates-tilson opened this issue 9 years ago • 3 comments

The version of the file REST_Controller.php that's avalible for download in the most recent tag (3.0.0) contains a bug that causes all authentication to be bypassed.

This bug is also present in the development branch.

As pointed out in issue #810, the 3.0.0 tag contains changes that are not present in the Master Branch. One of these changes is the removal of the optional argument 'continue' to the response() function, which would allow a user to tell the controller to continue executing after sending the HTTPS response. Regardless of why the optional argument is being removed, a mistake was made in removing it: the default value was FALSE, but the if/else statements it controlled were collapsed as if it were TRUE, meaning that a call to $this->response() no longer stops execution. The authentication methods in REST_Controller.php rely on response() to halt program execution.

At present, the most recent tag of the codebase will effectively ignore any authentication settings in the config file, and will respond to all HTTPS requests as if they were authentic.

mbates-tilson avatar Jul 17 '17 14:07 mbates-tilson

Hi @mbates-tilson,

I think its present now in master

https://github.com/chriskacerguis/codeigniter-restserver/blob/d3e39dbfd4d29d81e018396da0e5ea72ebd7face/application/libraries/REST_Controller.php#L817

and

https://github.com/chriskacerguis/codeigniter-restserver/blob/d3e39dbfd4d29d81e018396da0e5ea72ebd7face/application/libraries/REST_Controller.php#L882

fabianblum avatar Sep 23 '17 15:09 fabianblum

What's the latest on this issue? Is it fixed in later versions or is auth still broken?

michaelh99 avatar Sep 23 '17 16:09 michaelh99

Per @Hanisch-IT this should now be fixed in 3.0.3

chriskacerguis avatar Sep 23 '17 16:09 chriskacerguis