27 Commits

Author SHA1 Message Date
shadlaws
9b9f1a7b07 #2031 - Add class_exists() before method_exists() if class existence is unknown.
- fixed all instances of this in core code
- deleted previous Zend Guard Loader workaround in MY_Kohana.php
- updated Bootstrap.php to reflect deleted MY_Kohana.php
2013-03-02 13:25:10 +01:00
Bharat Mediratta
d45a737779 Update copyright to 2013. Fixes #1953. 2013-01-21 01:22:01 -05:00
Bharat Mediratta
bf2bb3e1ea Update copyright to 2012. #1822 2012-02-27 09:48:23 -08:00
Bharat Mediratta
423daa52d5 Update copyright to 2011. 2011-01-21 23:01:06 -08:00
Tim Almdal
64eae641e5 When the admin controller redirects to the reauthenticate controller, the value of request::is_ajax() from the original request is lost. This patch stores its value in the session so the reauthenticate controller knows whether its in a dialog/panel or not. 2010-07-28 07:57:27 -07:00
Tim Almdal
48c2e73048 More patches as part of #1225. Change the 'core' modules to use the json::reply
method to set the content type header and encode the response as a json object
2010-07-23 23:05:39 -07:00
Bharat Mediratta
583950616e Improve the fix for #1176 to use request::is_ajax() instead of tacking
on a query param to urls that appear in dialogs.  This keeps things simpler.
2010-07-16 11:58:13 -07:00
Tim Almdal
155d2b809b Rename g-in-dialog to the naming standard for query parameters and give it something more representative... 'gallery_dialog_request' 2010-07-15 14:54:45 -07:00
Tim Almdal
9538b3888d Fix for ticket #1176. Have the gallery.dialog code add a g-in-dialog parameter to the url to let the controller know its in a dialog. The reauthenticate controller will format the password prompt as a page or a form content. If authentication is successful, then the original controller is called instead of being redirected to. 2010-07-07 08:58:38 -07:00
Bharat Mediratta
df3af7d521 Merge branch 'master' of github.com:gallery/gallery3 2010-07-05 19:17:30 -07:00
Tim Almdal
226d1f7146 Revert "If the admin request originates as a dialog link, don't display the entire page when reauthenticating the administrator. Just put the form in the dialog."
This reverts commit 8493a3d36f.
2010-07-05 08:58:36 -07:00
Bharat Mediratta
0977c31009 Merge branch 'master' of github.com:gallery/gallery3 2010-07-05 08:47:40 -07:00
Bharat Mediratta
45b210c287 Add maessage when we automatically log you out of the admin area. 2010-07-05 08:44:46 -07:00
Tim Almdal
8493a3d36f If the admin request originates as a dialog link, don't display the entire page when reauthenticating the administrator. Just put the form in the dialog. 2010-07-05 08:23:17 -07:00
Bharat Mediratta
87f8b6ff0a Bounce the user to the login page if they try to get to part of the
admin site as a guest.  Also, theme the login/html page.
2010-06-12 15:28:03 -07:00
Bharat Mediratta
b61b50604b Push the continue url into the form for consistency with other
login/continue code.
2010-06-12 15:09:16 -07:00
Bharat Mediratta
c3c2b45280 Update the copyright to 2010. It's only 3 months into the year :-) 2010-03-03 10:15:34 -08:00
Andy Staudacher
0f66db51ef Change JavaScript reauthentication check to check via XHR.
Benefit: Getting the real deadline this way, not interfering with an ongoing maintenance task.
2010-02-14 07:15:59 -08:00
Tim Almdal
f6c615c379 Use the helper ulr:current instead of manually creating the continue url. 2010-02-10 08:32:30 -08:00
Andy Staudacher
f9d00aa742 Fix for ticket 1008: Redirect to destination after re-auth. 2010-02-08 00:30:36 -08:00
Andy Staudacher
f93528ffab Last partial fix for ticket 585: Compartmentalize the admin area and require active authentication every 20 minutes to access the admin area.
Also renaming auth::validate_too_many_failed_password_changes to validate_too_many_failed_auth_attempts since it's used in this generalized way in 3 places now.
2010-02-07 15:37:32 -08:00
Bharat Mediratta
057e8d09af Convert a bunch of leftover kohana::show_404 calls to throw
Kohana_404_Exception instead.  These are the ones where we used a
lower-case 'k' so my previous filter didn't catch it.
2009-12-23 20:51:33 -08:00
Tim Almdal
3c936d661a Change the name of identity library from Identity to IdentityProvider. Create a helper class called identity to simplify call the Identity Provider. Move the contents of MY_Session.php to the new helper class and remove the MY_Session class 2009-10-22 13:11:03 -07:00
Tim Almdal
78ee4193b7 Remove all non Identity API methods from Identity.php. Created an MY_Session class to provide the user state changes in the session and a login.php helper that has the login form. 2009-10-16 10:06:58 -07:00
Tim Almdal
00eacd659f Start simplifying the interface by moving the static methods from user.php and group.php. Tried creating a identity helper, but the helper identity.php was confused with the library Identity.php. So got around this by making the methods on Identity static and calling the instance within the static methods. Also temporarily moved the user.php and group.php back into the user module. 2009-10-16 08:53:31 -07:00
Bharat Mediratta
43abcd9386 Security pass over all controller code. Mostly adding CSRF checking
and verifying user permissions, but there are several above-the-bar
changes:

1) Server add is now only available to admins.  This is a hard
   requirement because we have to limit server access (eg:
   server_add::children) to a user subset and the current permission
   model doesn't include that.  Easiest fix is to restrict to admins.
   Got rid of the server_add permission.

2) We now know check permissions at every level, which means in
   controllers AND in helpers.  This "belt and suspenders" approach will
   give us defense in depth in case we overlook it in one area.

3) We now do CSRF checking in every controller method that changes the
   code, in addition to the Forge auto-check.  Again, defense in depth
   and it makes scanning the code for security much simpler.

4) Moved Simple_Uploader_Controller::convert_filename_to_title to
   item:convert_filename_to_title

5) Fixed a bug in sending notification emails.

6) Fixed the Organize code to verify that you only have access to your
   own tasks.  In general, added permission checks to organize which had
   pretty much no validation code.

I did my best to verify every feature that I touched.
2009-06-01 22:40:22 -07:00
Bharat Mediratta
28b41056e3 Restructure things so that the application is now just another module.
Kohana makes this type of transition fairly straightforward in that
all controllers/helpers/etc are still located in the cascading
filesystem without any extra effort, except that I've temporarily
added a hack to force modules/gallery into the module path.

Rename what's left of "core" to be "application" so that it conforms
more closely to the Kohana standard (basically, just
application/config/config.php which is the minimal thing that you need
in the application directory)

There's still considerable work left to be done here.
2009-05-27 15:07:27 -07:00