6.0.0-beta1
7/5/25

[#6560] admin/setup/config.php doesn't trap invalid applicatione
Summary admin/setup/config.php doesn't trap invalid applicatione
Queue Horde Base
Queue Version HEAD
Type Bug
State Resolved
Priority 1. Low
Owners chuck (at) horde (dot) org
Requester php (at) ideacode (dot) com
Created 04/02/2008 (6303 days ago)
Due
Updated 04/03/2008 (6302 days ago)
Assigned
Resolved 04/03/2008 (6302 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch No

History
04/03/2008 02:44:19 AM php (at) ideacode (dot) com Comment #7 Reply to this comment
Committed, thanks!
My pleasure!
04/03/2008 02:39:14 AM Chuck Hagenbuch Comment #6
Assigned to Chuck Hagenbuch
Summary ⇒ admin/setup/config.php doesn't trap invalid applicatione
State ⇒ Resolved
Reply to this comment
Committed, thanks!
04/02/2008 05:43:35 PM php (at) ideacode (dot) com Comment #5 Reply to this comment
BTW, the Fatal Error I'm getting is:
Fatal error: Cannot use object of type stdClass as array in
/var/www/dev.horde.org/horde/whups/lib/Driver.php on line 393
Fixed
Wow, the color scheme is totally different. :)  Thanks for addressing.
04/02/2008 05:15:30 PM Jan Schneider Comment #4 Reply to this comment
BTW, the Fatal Error I'm getting is:
Fatal error: Cannot use object of type stdClass as array in
/var/www/dev.horde.org/horde/whups/lib/Driver.php on line 393
Fixed


04/02/2008 05:12:13 PM php (at) ideacode (dot) com Comment #3 Reply to this comment
BTW, the Fatal Error I'm getting is:

Fatal error: Cannot use object of type stdClass as array in 
/var/www/dev.horde.org/horde/whups/lib/Driver.php on line 393


04/02/2008 05:11:24 PM php (at) ideacode (dot) com Comment #2
New Attachment: issue.diff Download
Reply to this comment
Got a Fatal Error when uploading this file the first time, even though 
the ticket went in.  Retrying to send patch.
04/02/2008 05:09:17 PM php (at) ideacode (dot) com Comment #1
Priority ⇒ 1. Low
Type ⇒ Bug
Summary ⇒ admin/setup/config.php doesn't trap invalid application
Queue ⇒ Horde Base
Milestone ⇒
Patch ⇒ No
State ⇒ Unconfirmed
Reply to this comment
In admin/setup/config.php:29-39, there is:

$app = Util::getFormData('app');

$appname = $registry->get('name', $app);

$title = sprintf(_("%s Setup"), $appname);



if ($app === null &&

     in_array($app, $registry->listApps(array('inactive', 'hidden', 
'notoolbar', 'active', 'admin')))) {

     $notification->push(_("Invalid application."), 'horde.error');

     $url = Horde::applicationUrl('admin/setup/index.php', true);

     header('Location: ' . $url);

     exit;

}



The logic doesn't capture invalid applications correctly: the logic 
says throw an invalid application error when not given an app and 
"null" is a listed application.  In the field, if you manually alter 
the app GET line variable to something non-existent, you get the horde 
application setup, instead of the invalid application error.



I believe the logic should be throw an invalid application error when 
not given an app or the app is not a listed application.  Patch 
attached.

Saved Queries