Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #865 from xael-fry/1937_routerImprovBr1.2.6.x
[#1937] fix(router): make some improvement in router
- Loading branch information
Showing
11 changed files
with
253 additions
and
56 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
language: java | ||
jdk: | ||
- openjdk6 | ||
script: ant -buildfile ./framework/build.xml test | ||
after_failure: | ||
cat ./samples-and-tests/just-test-cases/test-result/*.failed.html | ||
cat ./samples-and-tests/forum/test-result/*.failed.html | ||
cat ./samples-and-tests/zencontact/test-result/*.failed.html | ||
cat ./samples-and-tests/jobboard/test-result/*.failed.html | ||
cat ./samples-and-tests/yabe/test-result/*.failed.html | ||
notifications: | ||
email: | ||
on_success: change | ||
on_failure: always |
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
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
16 changes: 16 additions & 0 deletions
16
samples-and-tests/just-test-cases/app/controllers/security/XssAttempts.java
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,16 @@ | ||
package controllers.security; | ||
|
||
import play.mvc.Controller; | ||
|
||
|
||
|
||
/** | ||
* Test controller to check response to Xss attempt. | ||
*/ | ||
public class XssAttempts extends Controller { | ||
|
||
public static void testUrlParam(String url){ | ||
render(url); | ||
} | ||
|
||
} |
54 changes: 54 additions & 0 deletions
54
samples-and-tests/just-test-cases/app/views/Users/showAll.html
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,54 @@ | ||
#{extends 'main.html' /} | ||
<script src="@{'/public/jquery.js'}" type="text/javascript" charset="${_response_encoding}"></script> | ||
|
||
<script type="text/javascript" charset="${_response_encoding}" > | ||
var showUserAction = #{jsAction @Users.showId(':id')/} | ||
// check accents in keys | ||
var showUserNameAction = #{jsAction @Users.showName(':nâmë'), encodeURI:false, minimize:true /} | ||
var showUserNameActionEncodeURI = #{jsAction @Users.showName(':name'), encodeURI:true, minimize:false /} | ||
var showUserNameActionCustomScript= #{jsAction @Users.showName(':name'), customScript:"encodeURIComponent(val.replace('&', '&'))", minimize:false /} | ||
|
||
$(document).ready(function() { | ||
var html = "" | ||
var id = 1; | ||
|
||
#{list items:users, as:'user'} | ||
html ="<tr id=\"" + ${user_index} +"\">"; | ||
html += "<td>" + "${user.name}" + "</td>"; | ||
html += "<td></td>"; | ||
html += "<td></td>"; | ||
html += "<td></td>"; | ||
html += "<td></td>"; | ||
html += "</tr>"; | ||
$('#content tbody').append(html); | ||
|
||
$('#' + ${user_index} + ' td').eq(1).load( showUserAction({id: "${user?.id}"}) ); | ||
$('#' + ${user_index} + ' td').eq(2).load( showUserNameAction({nâmë: "${user?.name?.urlEncode()}"}) ); | ||
$('#' + ${user_index} + ' td').eq(3).load( showUserNameActionEncodeURI({name: "${user?.name}" }) ); | ||
$('#' + ${user_index} + ' td').eq(4).load( showUserNameActionCustomScript({name: "${user?.name}" }) ); | ||
id = "${user?.id}"; | ||
#{/list} | ||
|
||
// manual add | ||
html ="<tr id=\"javascript_add\">"; | ||
html += "<td>" + "name with special characters [c c ; %20 , / ? : @ & = + $ #]" + "</td>"; | ||
html += "<td></td>"; | ||
html += "<td></td>"; | ||
html += "<td></td>"; | ||
html += "<td></td>"; | ||
html += "</tr>"; | ||
$('#content tbody').append(html); | ||
$('#' + 'javascript_add' + ' td').eq(1).load( showUserAction({id: id}) ); | ||
$('#' + 'javascript_add' + ' td').eq(2).load( showUserNameAction({nâmë: encodeURIComponent("name with special characters [c c ; %20 , / ? : @ & = + $ #]") }) ); | ||
$('#' + 'javascript_add' + ' td').eq(3).load( showUserNameActionEncodeURI({name: "name with special characters [c c ; %20 , / ? : @ & = + $ #]" }) ); | ||
$('#' + 'javascript_add' + ' td').eq(4).load( showUserNameActionCustomScript({name: "name with special characters [c c ; %20 , / ? : @ & = + $ #]" }) ); | ||
}); | ||
|
||
</script> | ||
|
||
|
||
<table id="content"> | ||
<thead><tr><th>Name</th><th>Name From ID</th> <th>UrlEncode</th><th>jsAction urlEncode</th><th>jsAction customScript</th></tr></thead> | ||
<tbody></tbody> | ||
</table> | ||
|
Oops, something went wrong.