From 6e757f9988545aa0afbf5b345f81cbfcc6bed7ab Mon Sep 17 00:00:00 2001 From: Mike Miller Date: Fri, 1 Feb 2013 15:33:18 +0200 Subject: #1987 g2_import module should redirect with a 301, not 302 As the g2_import process is generally assumed to be permanent, the redirect should be a 301, and not a 302. --- modules/g2_import/controllers/g2.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'modules') diff --git a/modules/g2_import/controllers/g2.php b/modules/g2_import/controllers/g2.php index 3641b342..c9b1d182 100644 --- a/modules/g2_import/controllers/g2.php +++ b/modules/g2_import/controllers/g2.php @@ -46,7 +46,7 @@ class G2_Controller extends Controller { } if (!$id) { - url::redirect("tag_name/$tag_name"); + url::redirect("tag_name/$tag_name", 301); } $tag = ORM::factory("tag")->where("name", "=", $tag_name)->find(); @@ -99,18 +99,18 @@ class G2_Controller extends Controller { // Redirect the user to the new url switch ($resource_type) { case "thumbnail": - url::redirect($item->thumb_url(true)); + url::redirect($item->thumb_url(true), 301); case "resize": - url::redirect($item->resize_url(true)); + url::redirect($item->resize_url(true), 301); case "file": case "full": - url::redirect($item->file_url(true)); + url::redirect($item->file_url(true), 301); case "item": case "album": - url::redirect($item->abs_url()); + url::redirect($item->abs_url(), 301); case "group": case "user": -- cgit v1.2.3 From bc0bf10643413ea1d952ea1472a6af914d0696c5 Mon Sep 17 00:00:00 2001 From: shadlaws Date: Sat, 2 Feb 2013 14:04:15 +0100 Subject: Follow-in to 314e2e67b1d52b7d01a715d7a6680862bf83b987 for #1986. - Update xss_test golden file (change line numbers). --- modules/gallery/tests/xss_data.txt | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'modules') diff --git a/modules/gallery/tests/xss_data.txt b/modules/gallery/tests/xss_data.txt index 4a7153e1..51347f86 100644 --- a/modules/gallery/tests/xss_data.txt +++ b/modules/gallery/tests/xss_data.txt @@ -299,17 +299,17 @@ modules/organize/views/organize_frame.html.php 116 DIRTY_JS url::s modules/organize/views/organize_frame.html.php 126 DIRTY_JS access::csrf_token() modules/organize/views/organize_frame.html.php 140 DIRTY_JS url::site("organize/delete") modules/organize/views/organize_frame.html.php 149 DIRTY_JS access::csrf_token() -modules/organize/views/organize_frame.html.php 262 DIRTY_JS url::site("organize/rearrange") -modules/organize/views/organize_frame.html.php 273 DIRTY_JS access::csrf_token() -modules/organize/views/organize_frame.html.php 312 DIRTY_JS $key -modules/organize/views/organize_frame.html.php 474 DIRTY_JS url::site("organize/tree/{$album->id}") -modules/organize/views/organize_frame.html.php 532 DIRTY_JS url::site("organize/reparent") -modules/organize/views/organize_frame.html.php 555 DIRTY_JS access::csrf_token() -modules/organize/views/organize_frame.html.php 571 DIRTY_JS access::can("edit",item::root()) -modules/organize/views/organize_frame.html.php 573 DIRTY_JS html::clean(item::root()->title) -modules/organize/views/organize_frame.html.php 575 DIRTY_JS item::root()->id -modules/organize/views/organize_frame.html.php 583 DIRTY_JS $album->id -modules/organize/views/organize_frame.html.php 584 DIRTY_JS $album->id +modules/organize/views/organize_frame.html.php 264 DIRTY_JS url::site("organize/rearrange") +modules/organize/views/organize_frame.html.php 275 DIRTY_JS access::csrf_token() +modules/organize/views/organize_frame.html.php 314 DIRTY_JS $key +modules/organize/views/organize_frame.html.php 476 DIRTY_JS url::site("organize/tree/{$album->id}") +modules/organize/views/organize_frame.html.php 534 DIRTY_JS url::site("organize/reparent") +modules/organize/views/organize_frame.html.php 557 DIRTY_JS access::csrf_token() +modules/organize/views/organize_frame.html.php 573 DIRTY_JS access::can("edit",item::root()) +modules/organize/views/organize_frame.html.php 575 DIRTY_JS html::clean(item::root()->title) +modules/organize/views/organize_frame.html.php 577 DIRTY_JS item::root()->id +modules/organize/views/organize_frame.html.php 585 DIRTY_JS $album->id +modules/organize/views/organize_frame.html.php 586 DIRTY_JS $album->id modules/recaptcha/views/admin_recaptcha.html.php 11 DIRTY $form modules/recaptcha/views/admin_recaptcha.html.php 23 DIRTY_JS $public_key modules/recaptcha/views/form_recaptcha.html.php 3 DIRTY_ATTR request::protocol() -- cgit v1.2.3