summaryrefslogtreecommitdiff
path: root/modules/watermark
AgeCommit message (Collapse)Author
2013-01-30Protect admins from themselves - in case an admin changed theBharat Mediratta
watermark.name setting to something terrible by accident via Admin > Advanced, we'll just use the basename. Fixes #1977.
2013-01-29#1970 - Make add watermarks more secure and add unit tests.shadlaws
This follows #1855 and #1951... - Ensured that invalid or illegal files are not added even if they have valid extensions. - Added unit tests (currently there aren't any...)
2013-01-26#1951 - Make metadata generation more flexible (photo and movie helpers).shadlaws
- added photo_get_file_metadata and movie_get_file_metadata events - modified photo::get_file_metadata and movie::get_file_metadata to use them - ensure that non-readable files throw exceptions - redirected other photo metadata calls in core to photo::get_file_metadata (the helper function already exists, but in many places getimagesize is still called directly) - added some unit tests (neither of the functions above had one)
2013-01-22gallery.menalto.com -> galleryproject.orgBharat Mediratta
codex.gallery2.org -> codex.galleryproject.org Fixes #1957.
2013-01-21Update copyright to 2013. Fixes #1953.Bharat Mediratta
2012-05-17Smash multiple extensions down into a single one when accepting fileBharat Mediratta
uploads. Fixes #1872.
2012-05-11Inject some sanity into watermark file extensions.Bharat Mediratta
2012-02-27Update copyright to 2012. #1822Bharat Mediratta
2011-04-23Oops, fix broken codex urls. For #1698.Bharat Mediratta
2011-04-23Oops, this is the rest of the modules and themes for #1696 and #1698.Bharat Mediratta
2011-01-21Update copyright to 2011.Bharat Mediratta
2010-08-01Force the response type for uploaded watermarks to text/html.Bharat Mediratta
// Override the application/json mime type. The dialog based HTML uploader uses an iframe to // buffer the reply, and on some browsers (Firefox 3.6) it does not know what to do with the // JSON that it gets back so it puts up a dialog asking the user what to do with it. So force // the encoding type back to HTML for the iframe. // See: http://jquery.malsup.com/form/#file-upload
2010-07-31Full pass over all the JSON encoding and JS dialog code. We now abideBharat Mediratta
by the following rules: 1) An initial dialog or panel load can take either HTML or JSON, but the mime type must accurately reflect its payload. 2) dialog form submits can handle a pure HTML response, but the mime type must also be correct. This properly resolves the problem where the reauth code gets a JSON response first from the reauth code, and then an HTML response when you reauth and continue on to a given form -- try it out with Admin > Settings > Advanced. 3) All JSON replies must set the mime type correctly. The json::reply convenience function does this for us. 4) By default, any HTML content sent back in the JSON response should be in the "html" field, no longer the "form" field. The combination of these allows us to stop doing boilerplate code like this in our controllers: // Print our view, JSON encoded json::reply(array("form" => (string) $view)); instead, controllers can just return HTML, eg: // Print our view print $view; That's much more intuitive for developers.
2010-07-31More patches as part of #1225. Change the 'core' modules to use the json::replyTim Almdal
method to set the content type header and encode the response as a json object
2010-07-20Localize the error strings in watermark::get_add_form(). Fix for ticket #1230.Bharat Mediratta
2010-07-06Fix for ticket #1181. Use $.getJSON to retrieve the json contents of the ↵Tim Almdal
dialog. Convert all the controllers that create the data to go into a dialog to return the html as part of a json object.
2010-06-11Fix for ticket #797Tim Almdal
When load a file is uploaded using a dialog box and the jquery plugin ajaxForm, the ajaxForm plugin uses an hidden iFrame element to send the multi-part form and this is where the response goes. The ajaxForm plugin then retrieves the document body and parses the result as a json string. If the file uploads properly everything is fine, but if it fails Gallery3 return the input form with the the error fields highlighted as part of the json response. As this response is returned to a hidden iframe, the browser attempts to manipulate it and all hell breaks loose. We lose the trailing brace, we start getting escaping of form tags. When the ajaxForm plugin retrieves the iFrame body its no longer a valid json frame and the parsing fails and the user sees no indication that it failed.
2010-04-30Add page_title to admin views. Closes #1038.ckieffer
2010-03-03Update the copyright to 2010. It's only 3 months into the year :-)Bharat Mediratta
2010-01-31Update the install version to 2 to match module.info.Bharat Mediratta
2010-01-16Use "(string) $form" instead of "$form->__toString()"Bharat Mediratta
2009-10-28Normalize capitalization ticket #596Tim Almdal
2009-10-18Wrap all admin views in g-block and g-block content. This provides the means ↵Chad Kieffer
to visually separate the view's title and description from everything else. Primary admin view title should always be h1, and only one h1 per view. Removed some unused admin CSS id's.
2009-10-04Renamed most, if not all css selectors from gName to g-name. Moved a few ↵Chad Kieffer
shared images from wind to lib. Deleted unused images in the admin_wind. This will likely break a few ajax features.
2009-09-30Convert gDialog and gCancel over to g-dialog and g-cancel. Refactor CSS id's ↵Chad Kieffer
and classes in the login/reset password dialog.
2009-09-30Replaced gButtonLink with g-button.Chad Kieffer
2009-09-27Change gallery installer to do a direct update to the database, preppending ↵Tim Almdal
gallery_graphics:: to each of the defined rules operations
2009-09-27This path requires the upgrader to be run and applies the following changes:Tim Almdal
* moves the composite method back into core * requires that the operation be fully qualified i.e. gallery_graphics::resize * caches the graphics rules on each request
2009-09-24Refactor the graphic rules processing to accomplish 2 goals: First separate ↵Tim Almdal
the grapics library from module supplied rules and secondly, allow for modules to provide new processing rules callbacks. graphics::generate will now look for <module_name>_graphics::<rule> methods.
2009-08-31Fix XSS vectors in HTML attributes (mostly t() calls)Andy Staudacher
2009-08-27Remove 'ENGINE=InnoDB' specification from tables that we create. UseBharat Mediratta
the system's default table specification. Fixes ticket #597.
2009-07-28Use events to generate menus, instead of having xxx_menu helpers.Bharat Mediratta
This is the first step towards having a simple, lightweight and unified API for module interaction.
2009-07-13Add quotes around all values that contain spaces in them, and add aBharat Mediratta
test to make sure that we continue to do so. This makes sure that we don't have problems with 5.3 which treats the literal "on" as a boolean.
2009-06-23Refactor the install/upgrade code to be more flexible.Bharat Mediratta
Add xxx_installer::upgrade($version) method so that upgrade stanzas are separate from install stanzas. In the old code, to do an upgrade meant that you had to re-evolve everything from the initial install because we'd step through each version's changes. But what we really want is for the initial install to start off in the perfect initial state, and the upgrades to do the work behind the scenes. So now the install() function gets things set up properly the first time, and the upgrade() function does any work to catch you up to the latest code. See gallery_installer.php for a good example.
2009-06-01Security pass over all controller code. Mostly adding CSRF checkingBharat Mediratta
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-05-26Restructure the module lifecycle.Bharat Mediratta
Install: <module>_installer::install() is called, any necessary tables are created. Activate: <module>_installer::activate() is called. Module controllers are routable, helpers are accessible, etc. The module is in use. Deactivate: <module>_installer::deactivate() is called. Module code is not accessible or routable. Module is *not* in use, but its tables are still around. Uninstall: <module>_installer::uninstall() is called. Module is completely removed from the database. Admin > Modules will install and activate modules, but will only deactivate (will NOT uninstall modules).
2009-05-13Gee it's May already. Update copyright to 2009.Bharat Mediratta
2009-05-13Set the default transparency to 1 (no transparency at all)Bharat Mediratta
2009-05-13Fix the logical inversion of the transparency field. Now, 100% is maxBharat Mediratta
transparency and 1% is min transparency (no transparency at all). Fixes ticket #204.
2009-03-16Ticket #97. Applied button css where missing. Minor form css improvements.Chad Kieffer
2009-02-28Change the pattern to identify tables that need prefix substitution toTim Almdal
mirror the drupal pattern of using braces {}.
2009-02-27This implement table prefix for the watermark notification modules (Ticket #68)Tim Almdal
2009-02-24remove the extension and just use the IMAGETYPE_xxx constantsTim Almdal
2009-02-23Include jpg as valid graphic filesTim Almdal
2009-02-23Revert to using IMAGETYPE_XXX constants (at least for now)Bharat Mediratta
2009-02-21Hardcode extensions instead of using Image::$allowed_types because weBharat Mediratta
don't support TIFF files. TIFF files are not viewable directly in most browsers
2009-02-20Use Image::$allowed_types instead of array(IMAGETYPE_GIF,Tim Almdal
IMAGETYPE_JPEG, IMAGETYPE_PNG) as IMAGETYPE_GIF, IMAGETYPE_JPEG and IMAGETYPE_PNG are not defined as constants
2009-01-25Undo the adding underscores to the id on forge generated formsTim Almdal
2009-01-24Supply a form id on all forms. This id can be used by modules otherTim Almdal
than the originating module to provide additional functionality to the form.
2009-01-15Changing t() placeholder syntax from {{replace_me}} to %replace_me.Andy Staudacher