summaryrefslogtreecommitdiff
path: root/modules/gallery/tests
AgeCommit message (Collapse)Author
2009-09-01Fix bug in XSS scanner for <script> block @ position 0 of inline_htmlAndy Staudacher
2009-08-31Update XSS test golden fileAndy Staudacher
2009-08-31Add XSS check for HTML attributesAndy Staudacher
2009-08-31Add XSS check to ensure that html::js_string() is not preceded by a quote.Andy Staudacher
2009-08-31Adding XSS test for href="javascript: and onclick="..."Andy Staudacher
2009-08-31Rename mark_safe() to mark_clean()Andy Staudacher
2009-08-30Updating golden XSS-test data fileAndy Staudacher
2009-08-30Check for href="<?= $foo ?>" (malicious "javascript:..." string)Andy Staudacher
2009-08-30Updating XSS golden fileAndy Staudacher
2009-08-30Tabs to spaces cleanupAndy Staudacher
2009-08-30Rename clean_js to js_string and have it return a complete JS string (with ↵Andy Staudacher
delimiters) instead of just the string contents. Benefits: Using json_encode(), which is very robust. And as a user, it's clearer how to use this API compared to what it was before.
2009-08-30Improve no_tabs test to print out a complete list of files + line numbers + ↵Andy Staudacher
line snippet.
2009-08-30Add $theme-> methods to Xss whitelist for HTML safety.Andy Staudacher
Updating XSS golden file.
2009-08-29Update all code to use helper method html::clean(), html::purify(), ... ↵Andy Staudacher
instead of SafeString directly.
2009-08-29Adding html::clean(), ::purify(), etc.Andy Staudacher
2009-08-29Undo url helper changes - url methods no longer return a SafeString.Andy Staudacher
Adding SafeString::of_safe_html() calls where urls are passed as parameters to t() and t2().
2009-08-29Merge commit 'upstream/master'Andy Staudacher
Conflicts: modules/akismet/views/admin_akismet.html.php modules/comment/helpers/comment_rss.php modules/gallery/helpers/gallery_rss.php modules/gallery/libraries/I18n.php modules/gallery/views/permissions_browse.html.php modules/gallery/views/simple_uploader.html.php modules/info/views/info_block.html.php modules/organize/controllers/organize.php modules/organize/views/organize.html.php modules/organize/views/organize_album.html.php themes/default/views/album.html.php themes/default/views/movie.html.php themes/default/views/photo.html.php
2009-08-29Fixing all detected XSS vectors in PHP->JS code.Andy Staudacher
Xss: Rename UNKNOWN back to DIRTY, JS_XSS to DIRTY_JS. (using a different flag value to highlight potential XSS vectors in JS)
2009-08-29Add more factory methods for convenience:Andy Staudacher
SafeString::purify() and SafeString::of_safe_html(). Removing SafeString::mark_html_safe() since it's no longer needed.
2009-08-29Clean up the test and get it working.Bharat Mediratta
2009-08-29Adding SafeString::for_html_attr()Andy Staudacher
2009-08-29Fix for 641... extend viewable functionality to comments. Viewable unit test ↵Tim Almdal
is not working.
2009-08-29Have url::site() and other methods return a SafeString, just as t() and t2().Andy Staudacher
Benefits: - url::site() is often used in views and we can ensure in the url class that returned strings are indeed safe for use in HTML. Makes the list of vars of unknown safety status shorter. - url::site() is often used as message parameter to t() and t2(). The parameter would be HTML-escaped if it wasn't marked as safe HTML already. Makes the usage simpler / shorter.
2009-08-29Standardize the access to the create_random_item methodTim Almdal
2009-08-29Adding SafeString which is going to replace p::clean() and p::purify().Andy Staudacher
Refactoring of Xss_Security_Test. t() and t2() return a SafeString instance. TODO: - Update all code to use SafeString where appropriate. - Update golden fole of Xss_Security_Test - Stop reporting CLEAN vars in Xss_Security_Test
2009-08-05Change the children and descendants APIs to be more consistent and toBharat Mediratta
remove Gallery3 concepts from ORM_MPTT. The following API methods: ORM_MPTT::children ORM_MPTT::children_count ORM_MPTT::descendants ORM_MPTT::descendants_count All now take a $where clause that allow you to pass through additional field parameters. old API: $album->children(10, 0, "photos") $album->children_count("photos") new API: $album->children(10, 0, array("type" => "photos")) $album->children_count(array("type" => "photos")) This gives us a more flexible API and simplifies the code. While I was in there, I changed the way we deal with default orderby values so that we just assign the default value in the function definition, which allows us to get rid of all conditionals in the implementation which results in simpler code.
2009-08-05Revert "Allow a theme to override the page refresh mechanism. Create a new"Tim Almdal
This reverts commit 1f014aae6c16bbda62d8f5937180f11ccb0eb1b1.
2009-08-03Merge branch 'master' of git@github.com:gallery/gallery3Tim Almdal
2009-08-02Change the API for getting to the original state of an ORM.Bharat Mediratta
Old API: $obj->original("field_name") New API: $obj->original()->field_name This allows us to revert the varous xxx_updated events back to passing an original ORM as well as the the updated one. This makes for a cleaner event API. Old API: comment_updated($comment) { $comment->original("field_name") } Old API: comment_updated($old, $new) { $old->field_name }
2009-07-30Merge branch 'master' of git@github.com:gallery/gallery3Tim Almdal
2009-07-30Remove debug statementsBharat Mediratta
2009-07-30Update golden fileBharat Mediratta
2009-07-28Revert commit 078c77a62b623322956457bfd7bfbdaf56203b00 and change theTim Almdal
tag_event:item_edit_form to use the new Form_Script library to inject script into a form. Signed-off-by: Tim Almdal <tnalmdal@shaw.ca>
2009-07-28Revert commit 078c77a62b623322956457bfd7bfbdaf56203b00 and change theTim Almdal
tag_event:item_edit_form to use the new Form_Script library to inject script into a form.
2009-07-28Create A Forge Script element. Form_Script allows the specificationTim Almdal
of either a url to a script file or in line text which will be included in a script block. Signed-off-by: Tim Almdal <tnalmdal@shaw.ca>
2009-07-27Create A Forge Script element. Form_Script allows the specificationTim Almdal
of either a url to a script file or in line text which will be included in a script block.
2009-07-27Allow a theme to override the page refresh mechanism. Create a newTim Almdal
javascript lib (gallery.reload.js) which defines the functions gallery_reload() and gallery_location(new_location). They just do a window.location.reload() and window.location = new_location. This change breaks the assumption that all themes will handle page reloads the same and allows the theme to customize the page refresh.
2009-07-27Updated.Bharat Mediratta
2009-07-27Back out the fix for ticket #452Tim Almdal
Revert "Changed access::user_can to force the owner of an item to have" This reverts commit 0b97cfd6f098be08be5f3cf1dbca1cce580ae330.
2009-07-26Merge branch 'master' of git://github.com/rledisez/gallery3 into rledisez/masterAndy Staudacher
2009-07-26Changed access::user_can to force the owner of an item to haveTim Almdal
view permission on the parent. Added a whitelist of allowable owner permissions. If the requested permission is view and the user requesting access is the owner, check that they have view permission to the parent.
2009-07-25Rename columns that use reserved SQL words : items.left and items.rightRomain LE DISEZ
2009-07-24Add tag autocomplete to the album and photo edit pop up dialogs.Tim Almdal
This required putting a wrapper view around the forms and passing this view as the parameter to the item_edit_form event. The view contains a $script variable that the modules can add script to be included in the form html when rendered as part of the ajax response.
2009-07-24Partial implementation of ticket #80. Provide auto complete and suggestions ↵Tim Almdal
on the tag add form in the tag sidebar block. Updated the xss golden file as well. Still to do figure out how toget it into the edit popup dialog
2009-07-23Updated golden fileBharat Mediratta
2009-07-22Add explicit unit tests for access::user_canTim Almdal
2009-07-21Updated for movieplayer.html.php updateBharat Mediratta
2009-07-17Fix a bug where moved items don't properly inherit permissions fromBharat Mediratta
their new target. After each move, recalculate the permissions for the new parent's hierarchy. Fixes ticket #552
2009-07-16Update golden file to match recent changes in event code.Bharat Mediratta
2009-07-16Non-trivial changes to the event handling code:Bharat Mediratta
1) The item_updated event no longer takes the old and new items. Instead we overload ORM to track the original data and make that available via the item. This will allow us to move event publishing down into the API methods which in turn will give us more stability since we won't require each controller to remember to do it. 2) ORM class now tracks the original values. It doesn't track the original relationships (no need for that, yet) 3) Added new events: item_deleted group_deleted user_deleted