Commit 5389d426 authored by jerry73204's avatar jerry73204 Committed by Jeffrey Schiller

Fix ill-encoding of UriBuilder class (#1598)

This method misses URLEncode.encode() encapsulation, which leaves the
danger of URL injection.
parent 90bad32f
......@@ -11,6 +11,8 @@
package com.google.appinventor.server.util;
import java.net.URLEncoder;
public class UriBuilder {
private StringBuilder sb = new StringBuilder();
private boolean first = true;
......@@ -30,7 +32,7 @@ public class UriBuilder {
} else {
sb.append("&");
}
sb.append(key + "=" + value);
sb.append(URLEncoder.encode(key) + "=" + URLEncoder.encode(value));
return this;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment