QnapClub/Plugmedia — Issue #52: Wrong authentication when cgi_auth.cgi not set
Author: toffee
Created: 2012-02-06 18:22:37+00:00
State: open

In class Session (from file web/system/libraries/Session.php) the method checkPasswordCgiAuth should return false (eg. no authenticated) when getting error from accessing cgi_auth.cgi URL.

After line

```PHP
log_message('debug', "Erreur Curl : " . curl_error($ch));
```
should insert

```PHP
curl_close($ch);
return false;
```

In current implementation, when cgi_auth.cgi URL is not set (or wrong set) any user is successfully authenticated and marked as embedded (that means that at next syncUsers function call this user will be deleted).