Skip to content

Commit

Permalink
update ognl test-case
Browse files Browse the repository at this point in the history
  • Loading branch information
tangyouyi1513 committed Oct 24, 2017
1 parent f4c8b9b commit 4052a81
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion integration-test/app/ognl.jsp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<%@ page import="java.io.*" %>
<%@ page import="ognl.Ognl" %>
<%
Object value = Ognl.parseExpression("java.lang.Runtime");
Object value = Ognl.parseExpression("@org.apache.commons.io.IOUtils@toString(@java.lang.Runtime@getRuntime().exec('whoami').getInputStream())");
out.println(value);
%>
2 changes: 1 addition & 1 deletion integration-test/rasp/plugins/plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ plugin.register('xxe', function (params, context) {
plugin.register('ognl', function (params, context) {
checkContext(context);
plugin.log('ognl', params);
if (params.expression === 'java.lang.Runtime') {
if (params.expression === "@org.apache.commons.io.IOUtils@toString(@java.lang.Runtime@getRuntime().exec('whoami').getInputStream())") {
return {
action: 'block'
}
Expand Down

0 comments on commit 4052a81

Please sign in to comment.