Commit Graph

9 Commits

Author SHA1 Message Date
unostar
e6768a4e97 Add string to localizer
Signed-off-by: Bharat Mediratta <bharat@menalto.com>
2009-06-09 14:11:32 +08:00
Bharat Mediratta
ac70a1b77a Fix internationalization to use one long string and placeholders.
Removed the <br/> though since we're trying to avoid structural HTML
in internationalized strings.
2009-06-04 18:49:45 -07:00
jhilden
81d20c79b6 fixed another bug with the filesize unit and added a better error message
Merge branch 'master' of git@github.com:gallery/gallery3

Conflicts:
	modules/gallery/views/simple_uploader.html.php
2009-06-04 21:32:45 -04:00
jhilden
8933a19f1f fixed stuff 2009-06-04 21:05:33 -04:00
Bharat Mediratta
5158a6f433 Add MY_num containing num::convert_to_bytes() which supports PHP's
size shorthand, and convert the simple_uploader code to use it.
2009-06-04 17:53:40 -07:00
jhilden
9306c178a8 set filesize limit of swfupload to the same value as upload_max_filesize
* now users get an error when they try to upload too big files
* this should fix bug #337
* maybe it also needs to check for max_post_size
2009-06-04 18:29:31 -04: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
708f27f483 Run p::clean() on any variables that contain data entered by users. 2009-05-31 00:11:48 -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