Skip to content

Commit

Permalink
Remove decoding of just encoded value
Browse files Browse the repository at this point in the history
  • Loading branch information
agigleux committed Jan 8, 2021
1 parent 1693e31 commit 75b7c5b
Show file tree
Hide file tree
Showing 49 changed files with 137 additions and 97 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,9 @@ public void doPost(HttpServletRequest request, HttpServletResponse response) thr

String bar = "";
if (param != null) {
bar = new String( org.apache.commons.codec.binary.Base64.decodeBase64(
org.apache.commons.codec.binary.Base64.encodeBase64( param.getBytes() ) ));
//bar = new String( org.apache.commons.codec.binary.Base64.decodeBase64(
//org.apache.commons.codec.binary.Base64.encodeBase64( param.getBytes() ) ));
bar = new String( param.getBytes() );
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,9 @@ public void doPost(HttpServletRequest request, HttpServletResponse response) thr

String bar = "";
if (param != null) {
bar = new String( org.apache.commons.codec.binary.Base64.decodeBase64(
org.apache.commons.codec.binary.Base64.encodeBase64( param.getBytes() ) ));
//bar = new String( org.apache.commons.codec.binary.Base64.decodeBase64(
//org.apache.commons.codec.binary.Base64.encodeBase64( param.getBytes() ) ));
bar = new String( param.getBytes() );
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,9 @@ public void doPost(HttpServletRequest request, HttpServletResponse response) thr

String bar = "";
if (param != null) {
bar = new String( org.apache.commons.codec.binary.Base64.decodeBase64(
org.apache.commons.codec.binary.Base64.encodeBase64( param.getBytes() ) ));
//bar = new String( org.apache.commons.codec.binary.Base64.decodeBase64(
//org.apache.commons.codec.binary.Base64.encodeBase64( param.getBytes() ) ));
bar = new String( param.getBytes() );
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,9 @@ public void doPost(HttpServletRequest request, HttpServletResponse response) thr

String bar = "";
if (param != null) {
bar = new String( org.apache.commons.codec.binary.Base64.decodeBase64(
org.apache.commons.codec.binary.Base64.encodeBase64( param.getBytes() ) ));
//bar = new String( org.apache.commons.codec.binary.Base64.decodeBase64(
//org.apache.commons.codec.binary.Base64.encodeBase64( param.getBytes() ) ));
bar = new String( param.getBytes() );
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,9 @@ public void doPost(HttpServletRequest request, HttpServletResponse response) thr

String bar = "";
if (param != null) {
bar = new String( org.apache.commons.codec.binary.Base64.decodeBase64(
org.apache.commons.codec.binary.Base64.encodeBase64( param.getBytes() ) ));
//bar = new String( org.apache.commons.codec.binary.Base64.decodeBase64(
//org.apache.commons.codec.binary.Base64.encodeBase64( param.getBytes() ) ));
bar = new String( param.getBytes() );
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,9 @@ public String doSomething(HttpServletRequest request, String param) throws Servl

String bar = "";
if (param != null) {
bar = new String( org.apache.commons.codec.binary.Base64.decodeBase64(
org.apache.commons.codec.binary.Base64.encodeBase64( param.getBytes() ) ));
//bar = new String( org.apache.commons.codec.binary.Base64.decodeBase64(
//org.apache.commons.codec.binary.Base64.encodeBase64( param.getBytes() ) ));
bar = new String( param.getBytes() );
}

return bar;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,9 @@ public String doSomething(HttpServletRequest request, String param) throws Servl

String bar = "";
if (param != null) {
bar = new String( org.apache.commons.codec.binary.Base64.decodeBase64(
org.apache.commons.codec.binary.Base64.encodeBase64( param.getBytes() ) ));
//bar = new String( org.apache.commons.codec.binary.Base64.decodeBase64(
//org.apache.commons.codec.binary.Base64.encodeBase64( param.getBytes() ) ));
bar = new String( param.getBytes() );
}

return bar;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,9 @@ public String doSomething(HttpServletRequest request, String param) throws Servl

String bar = "";
if (param != null) {
bar = new String( org.apache.commons.codec.binary.Base64.decodeBase64(
org.apache.commons.codec.binary.Base64.encodeBase64( param.getBytes() ) ));
//bar = new String( org.apache.commons.codec.binary.Base64.decodeBase64(
//org.apache.commons.codec.binary.Base64.encodeBase64( param.getBytes() ) ));
bar = new String( param.getBytes() );
}

return bar;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,9 @@ public String doSomething(HttpServletRequest request, String param) throws Servl

String bar = "";
if (param != null) {
bar = new String( org.apache.commons.codec.binary.Base64.decodeBase64(
org.apache.commons.codec.binary.Base64.encodeBase64( param.getBytes() ) ));
//bar = new String( org.apache.commons.codec.binary.Base64.decodeBase64(
//org.apache.commons.codec.binary.Base64.encodeBase64( param.getBytes() ) ));
bar = new String( param.getBytes() );
}

return bar;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,9 @@ public String doSomething(HttpServletRequest request, String param) throws Servl

String bar = "";
if (param != null) {
bar = new String( org.apache.commons.codec.binary.Base64.decodeBase64(
org.apache.commons.codec.binary.Base64.encodeBase64( param.getBytes() ) ));
//bar = new String( org.apache.commons.codec.binary.Base64.decodeBase64(
//org.apache.commons.codec.binary.Base64.encodeBase64( param.getBytes() ) ));
bar = new String( param.getBytes() );
}

return bar;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,9 @@ public String doSomething(HttpServletRequest request, String param) throws Servl

String bar = "";
if (param != null) {
bar = new String( org.apache.commons.codec.binary.Base64.decodeBase64(
org.apache.commons.codec.binary.Base64.encodeBase64( param.getBytes() ) ));
//bar = new String( org.apache.commons.codec.binary.Base64.decodeBase64(
//org.apache.commons.codec.binary.Base64.encodeBase64( param.getBytes() ) ));
bar = new String( param.getBytes() );
}

return bar;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,9 @@ public String doSomething(HttpServletRequest request, String param) throws Servl

String bar = "";
if (param != null) {
bar = new String( org.apache.commons.codec.binary.Base64.decodeBase64(
org.apache.commons.codec.binary.Base64.encodeBase64( param.getBytes() ) ));
//bar = new String( org.apache.commons.codec.binary.Base64.decodeBase64(
//org.apache.commons.codec.binary.Base64.encodeBase64( param.getBytes() ) ));
bar = new String( param.getBytes() );
}

return bar;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,9 @@ private static String doSomething(HttpServletRequest request, String param) thro

String bar = "";
if (param != null) {
bar = new String( org.apache.commons.codec.binary.Base64.decodeBase64(
org.apache.commons.codec.binary.Base64.encodeBase64( param.getBytes() ) ));
//bar = new String( org.apache.commons.codec.binary.Base64.decodeBase64(
//org.apache.commons.codec.binary.Base64.encodeBase64( param.getBytes() ) ));
bar = new String( param.getBytes() );
}

return bar;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,9 @@ private static String doSomething(HttpServletRequest request, String param) thro

String bar = "";
if (param != null) {
bar = new String( org.apache.commons.codec.binary.Base64.decodeBase64(
org.apache.commons.codec.binary.Base64.encodeBase64( param.getBytes() ) ));
//bar = new String( org.apache.commons.codec.binary.Base64.decodeBase64(
//org.apache.commons.codec.binary.Base64.encodeBase64( param.getBytes() ) ));
bar = new String( param.getBytes() );
}

return bar;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,9 @@ public String doSomething(HttpServletRequest request, String param) throws Servl

String bar = "";
if (param != null) {
bar = new String( org.apache.commons.codec.binary.Base64.decodeBase64(
org.apache.commons.codec.binary.Base64.encodeBase64( param.getBytes() ) ));
//bar = new String( org.apache.commons.codec.binary.Base64.decodeBase64(
//org.apache.commons.codec.binary.Base64.encodeBase64( param.getBytes() ) ));
bar = new String( param.getBytes() );
}

return bar;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,9 @@ public String doSomething(HttpServletRequest request, String param) throws Servl

String bar = "";
if (param != null) {
bar = new String( org.apache.commons.codec.binary.Base64.decodeBase64(
org.apache.commons.codec.binary.Base64.encodeBase64( param.getBytes() ) ));
//bar = new String( org.apache.commons.codec.binary.Base64.decodeBase64(
//org.apache.commons.codec.binary.Base64.encodeBase64( param.getBytes() ) ));
bar = new String( param.getBytes() );
}

return bar;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,9 @@ public String doSomething(HttpServletRequest request, String param) throws Servl

String bar = "";
if (param != null) {
bar = new String( org.apache.commons.codec.binary.Base64.decodeBase64(
org.apache.commons.codec.binary.Base64.encodeBase64( param.getBytes() ) ));
//bar = new String( org.apache.commons.codec.binary.Base64.decodeBase64(
//org.apache.commons.codec.binary.Base64.encodeBase64( param.getBytes() ) ));
bar = new String( param.getBytes() );
}

return bar;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,9 @@ private static String doSomething(HttpServletRequest request, String param) thro

String bar = "";
if (param != null) {
bar = new String( org.apache.commons.codec.binary.Base64.decodeBase64(
org.apache.commons.codec.binary.Base64.encodeBase64( param.getBytes() ) ));
//bar = new String( org.apache.commons.codec.binary.Base64.decodeBase64(
//org.apache.commons.codec.binary.Base64.encodeBase64( param.getBytes() ) ));
bar = new String( param.getBytes() );
}

return bar;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,9 @@ private static String doSomething(HttpServletRequest request, String param) thro

String bar = "";
if (param != null) {
bar = new String( org.apache.commons.codec.binary.Base64.decodeBase64(
org.apache.commons.codec.binary.Base64.encodeBase64( param.getBytes() ) ));
//bar = new String( org.apache.commons.codec.binary.Base64.decodeBase64(
//org.apache.commons.codec.binary.Base64.encodeBase64( param.getBytes() ) ));
bar = new String( param.getBytes() );
}

return bar;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,9 @@ private static String doSomething(HttpServletRequest request, String param) thro

String bar = "";
if (param != null) {
bar = new String( org.apache.commons.codec.binary.Base64.decodeBase64(
org.apache.commons.codec.binary.Base64.encodeBase64( param.getBytes() ) ));
//bar = new String( org.apache.commons.codec.binary.Base64.decodeBase64(
//org.apache.commons.codec.binary.Base64.encodeBase64( param.getBytes() ) ));
bar = new String( param.getBytes() );
}

return bar;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* @created 2015
*/

package org.owasp.benchmark.testcode.pathtraver.issueexpected_discarded.bad_sink;
package org.owasp.benchmark.testcode.pathtraver.issueexpected;

import java.io.IOException;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* @created 2015
*/

package org.owasp.benchmark.testcode.pathtraver.issueexpected_discarded.bad_sink;
package org.owasp.benchmark.testcode.pathtraver.issueexpected;

import java.io.IOException;

Expand Down Expand Up @@ -51,8 +51,9 @@ public void doPost(HttpServletRequest request, HttpServletResponse response) thr

String bar = "";
if (param != null) {
bar = new String( org.apache.commons.codec.binary.Base64.decodeBase64(
org.apache.commons.codec.binary.Base64.encodeBase64( param.getBytes() ) ));
//bar = new String( org.apache.commons.codec.binary.Base64.decodeBase64(
//org.apache.commons.codec.binary.Base64.encodeBase64( param.getBytes() ) ));
bar = new String( param.getBytes() );
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* @created 2015
*/

package org.owasp.benchmark.testcode.pathtraver.issueexpected_discarded.bad_sink;
package org.owasp.benchmark.testcode.pathtraver.issueexpected;

import java.io.IOException;

Expand Down Expand Up @@ -47,8 +47,9 @@ public void doPost(HttpServletRequest request, HttpServletResponse response) thr

String bar = "";
if (param != null) {
bar = new String( org.apache.commons.codec.binary.Base64.decodeBase64(
org.apache.commons.codec.binary.Base64.encodeBase64( param.getBytes() ) ));
//bar = new String( org.apache.commons.codec.binary.Base64.decodeBase64(
//org.apache.commons.codec.binary.Base64.encodeBase64( param.getBytes() ) ));
bar = new String( param.getBytes() );
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* @created 2015
*/

package org.owasp.benchmark.testcode.pathtraver.issueexpected_discarded.bad_sink;
package org.owasp.benchmark.testcode.pathtraver.issueexpected;

import java.io.IOException;

Expand Down Expand Up @@ -49,8 +49,9 @@ public void doPost(HttpServletRequest request, HttpServletResponse response) thr

String bar = "";
if (param != null) {
bar = new String( org.apache.commons.codec.binary.Base64.decodeBase64(
org.apache.commons.codec.binary.Base64.encodeBase64( param.getBytes() ) ));
//bar = new String( org.apache.commons.codec.binary.Base64.decodeBase64(
//org.apache.commons.codec.binary.Base64.encodeBase64( param.getBytes() ) ));
bar = new String( param.getBytes() );
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* @created 2015
*/

package org.owasp.benchmark.testcode.pathtraver.issueexpected_discarded.bad_sink;
package org.owasp.benchmark.testcode.pathtraver.issueexpected;

import java.io.IOException;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* @created 2015
*/

package org.owasp.benchmark.testcode.pathtraver.issueexpected_discarded.bad_sink;
package org.owasp.benchmark.testcode.pathtraver.issueexpected;

import java.io.IOException;

Expand Down Expand Up @@ -60,8 +60,9 @@ public void doPost(HttpServletRequest request, HttpServletResponse response) thr

String bar = "";
if (param != null) {
bar = new String( org.apache.commons.codec.binary.Base64.decodeBase64(
org.apache.commons.codec.binary.Base64.encodeBase64( param.getBytes() ) ));
//bar = new String( org.apache.commons.codec.binary.Base64.decodeBase64(
//org.apache.commons.codec.binary.Base64.encodeBase64( param.getBytes() ) ));
bar = new String( param.getBytes() );
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* @created 2015
*/

package org.owasp.benchmark.testcode.pathtraver.issueexpected_discarded.bad_sink;
package org.owasp.benchmark.testcode.pathtraver.issueexpected;

import java.io.IOException;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* @created 2015
*/

package org.owasp.benchmark.testcode.pathtraver.issueexpected_discarded.bad_sink;
package org.owasp.benchmark.testcode.pathtraver.issueexpected;

import java.io.IOException;

Expand Down Expand Up @@ -83,8 +83,9 @@ public String doSomething(HttpServletRequest request, String param) throws Servl

String bar = "";
if (param != null) {
bar = new String( org.apache.commons.codec.binary.Base64.decodeBase64(
org.apache.commons.codec.binary.Base64.encodeBase64( param.getBytes() ) ));
//bar = new String( org.apache.commons.codec.binary.Base64.decodeBase64(
//org.apache.commons.codec.binary.Base64.encodeBase64( param.getBytes() ) ));
bar = new String( param.getBytes() );
}

return bar;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* @created 2015
*/

package org.owasp.benchmark.testcode.pathtraver.issueexpected_discarded.bad_sink;
package org.owasp.benchmark.testcode.pathtraver.issueexpected;

import java.io.IOException;

Expand Down
Loading

0 comments on commit 75b7c5b

Please sign in to comment.