Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fixed added functional test for mobile, added gadget tests (refs #1746)
- Loading branch information
1 parent
91ae0b8
commit 9292c3b
Showing
7 changed files
with
158 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
SnsConfig: | ||
is_check_mobile_ip: | ||
name: "is_check_mobile_ip" | ||
value: 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<?php if (class_exists('BlogRssCache')): ?> | ||
Gadget: | ||
favorite_blog_news: | ||
type: "contents" | ||
name: "favoriteBlogNews" | ||
sort_order: 10 | ||
|
||
BlogRssCache: | ||
first_member_blog_rss_cache: | ||
Member: third_member | ||
title: "<&\"'>BlogRssCache.title ESCAPING HTML TEST DATA" | ||
description: "description" | ||
link: "http://localhost/" | ||
date: <?php echo date("Y-m-d H:i:s\n") ?> | ||
<?php endif ?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<?php if (class_exists('Diary')): ?> | ||
Gadget: | ||
favorite_diary_news: | ||
type: "contents" | ||
name: "favoriteDiaryNews" | ||
sort_order: 20 | ||
mobile_favorite_diary_news: | ||
type: "mobileContents" | ||
name: "favoriteDiaryNews" | ||
sort_order: 20 | ||
|
||
Diary: | ||
first_member_diary: | ||
Member: first_member | ||
title: "<&\"'>Diary.title ESCAPING HTML TEST DATA" | ||
body: "body" | ||
<?php endif ?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
<?php | ||
|
||
/** | ||
* This file is part of the OpenPNE package. | ||
* (c) OpenPNE Project (http://www.openpne.jp/) | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file and the NOTICE file that were distributed with this source code. | ||
*/ | ||
|
||
include dirname(__FILE__).'/../../bootstrap/functional.php'; | ||
include dirname(__FILE__).'/../../bootstrap/database.php'; | ||
|
||
$browser = new opTestFunctional(new opBrowser(), new lime_test(null, new lime_output_color())); | ||
$browser->setMobile(); | ||
$browser | ||
->info('Login') | ||
->login('sns@example.com', 'password') | ||
->isStatusCode(302) | ||
|
||
// CSRF | ||
->info('/favorite/add?id=2 - CSRF') | ||
->get('/favorite/add?id=2') | ||
->checkCSRF() | ||
|
||
->info('/favorite/delete/2 - CSRF') | ||
->get('/favorite/delete/2') | ||
->checkCSRF() | ||
|
||
// XSS | ||
->info('/favorite/list - XSS') | ||
->get('/favorite/list') | ||
->with('html_escape')->begin() | ||
->isAllEscapedData('Member', 'name') | ||
->end() | ||
; | ||
|
||
if (class_exists('Diary')) | ||
{ | ||
echo $browser | ||
->info('Login') | ||
->login('sns3@example.com', 'password') | ||
->isStatusCode(302) | ||
|
||
->info('/ diary gadget - XSS') | ||
->get('/') | ||
->getResponse()->getContent() | ||
/* | ||
->with('html_escape')->begin() | ||
->isAllEscapedData('Member', 'name') | ||
->countEscapedData(1, 'Diary', 'title', array('width' => 28)) | ||
->end() | ||
->info('/favorite/diary gadget - XSS') | ||
->get('/favorite/diary') | ||
->with('html_escape')->begin() | ||
->isAllEscapedData('Member', 'name') | ||
->countEscapedData(1, 'Diary', 'title', array('width' => 28)) | ||
->end() | ||
*/ | ||
; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters