[dev] [cvs] commit: horde login.php horde/templates/index frames_index.inc horde/templates/login header.inc login.inc mobile.inc horde/services changepassword.php facebook.php logintasks.php twitter.php twitterapi.php horde/services/portal edit.php ...

Michael Rubinsky mrubinsk at horde.org
Wed Jul 22 13:47:33 UTC 2009


Quoting Jan Schneider <jan at horde.org>:

> Zitat von Michael M Slusarz <slusarz at horde.org>:
>
>>> New unified Horde login page.
>
> Great!
>
>> * All necessary authentication checking should now be handled by   
>> Horde_Registry::pushApp() (if the second parameter is true).    
>> pushApp() will throw a Horde_Exception on 3 conditions:
>>  + Bad permissions
>>  + Bad authentication
>>  + Application not active (currently not caught, so will cause a   
>> fatal error)
>>
>>  The auth code in an app's base.php file looks like this:
>>
>> $registry = Horde_Registry::singleton();
>> try {
>>    $registry->pushApp($appname, $check_auth_and_perms?);
>> } catch (Horde_Exception $e) {
>>    Horde_Auth::authenticationFailureRedirect($app, $e);
>> }
>
> Shouldn't this rather be a Horde_Auth_Exception? This seems like a   
> perfect example why we should have special Exceptions in *any*  
> library  that throws them.

I would think that it would be Horde_Registry's job to catch a  
Horde_Auth_Exception and rethrow it as a Horde_Exception if it's a  
true exception.  i.e. Don't leak exceptions from other other libraries.



Thanks,
mike

--
The Horde Project (www.horde.org)
mrubinsk at horde.org

"Time just hates me. That's why it made me an adult." - Josh Joplin


More information about the dev mailing list