mirror of
https://github.com/github/codeql.git
synced 2025-12-24 12:46:34 +01:00
195 lines
6.1 KiB
Java
195 lines
6.1 KiB
Java
package generatedtest;
|
|
|
|
import akka.util.ByteString;
|
|
import com.fasterxml.jackson.databind.JsonNode;
|
|
import java.io.File;
|
|
import java.util.List;
|
|
import java.util.Map;
|
|
import java.util.Optional;
|
|
import org.w3c.dom.Document;
|
|
import play.mvc.Http;
|
|
|
|
// Test case generated by GenerateFlowTestCase.ql
|
|
public class Test {
|
|
|
|
Object source() {
|
|
return null;
|
|
}
|
|
|
|
void sink(Object o) {}
|
|
|
|
public void test() throws Exception {
|
|
|
|
{
|
|
// "play.mvc;Http$Cookie;true;name;;;Argument[this];ReturnValue;taint;manual"
|
|
String out = null;
|
|
Http.Cookie in = (Http.Cookie) source();
|
|
out = in.name();
|
|
sink(out); // $ hasTaintFlow
|
|
}
|
|
{
|
|
// "play.mvc;Http$Cookie;true;value;;;Argument[this];ReturnValue;taint;manual"
|
|
String out = null;
|
|
Http.Cookie in = (Http.Cookie) source();
|
|
out = in.value();
|
|
sink(out); // $ hasTaintFlow
|
|
}
|
|
{
|
|
// "play.mvc;Http$Cookies;true;get;;;Argument[this];ReturnValue;taint;manual"
|
|
Http.Cookie out = null;
|
|
Http.Cookies in = (Http.Cookies) source();
|
|
out = in.get(null);
|
|
sink(out); // $ hasTaintFlow
|
|
}
|
|
{
|
|
// "play.mvc;Http$Cookies;true;getCookie;;;Argument[this];ReturnValue;taint;manual"
|
|
Optional out = null;
|
|
Http.Cookies in = (Http.Cookies) source();
|
|
out = in.getCookie(null);
|
|
sink(out); // $ hasTaintFlow
|
|
}
|
|
{
|
|
// "play.mvc;Http$MultipartFormData$FilePart;true;getContentType;;;Argument[this];ReturnValue;taint;manual"
|
|
String out = null;
|
|
Http.MultipartFormData.FilePart in = (Http.MultipartFormData.FilePart) source();
|
|
out = in.getContentType();
|
|
sink(out); // $ hasTaintFlow
|
|
}
|
|
{
|
|
// "play.mvc;Http$MultipartFormData$FilePart;true;getDispositionType;;;Argument[this];ReturnValue;taint;manual"
|
|
String out = null;
|
|
Http.MultipartFormData.FilePart in = (Http.MultipartFormData.FilePart) source();
|
|
out = in.getDispositionType();
|
|
sink(out); // $ hasTaintFlow
|
|
}
|
|
{
|
|
// "play.mvc;Http$MultipartFormData$FilePart;true;getFilename;;;Argument[this];ReturnValue;taint;manual"
|
|
String out = null;
|
|
Http.MultipartFormData.FilePart in = (Http.MultipartFormData.FilePart) source();
|
|
out = in.getFilename();
|
|
sink(out); // $ hasTaintFlow
|
|
}
|
|
{
|
|
// "play.mvc;Http$MultipartFormData$FilePart;true;getKey;;;Argument[this];ReturnValue;taint;manual"
|
|
String out = null;
|
|
Http.MultipartFormData.FilePart in = (Http.MultipartFormData.FilePart) source();
|
|
out = in.getKey();
|
|
sink(out); // $ hasTaintFlow
|
|
}
|
|
{
|
|
// "play.mvc;Http$MultipartFormData$FilePart;true;getRef;;;Argument[this];ReturnValue;taint;manual"
|
|
Object out = null;
|
|
Http.MultipartFormData.FilePart in = (Http.MultipartFormData.FilePart) source();
|
|
out = in.getRef();
|
|
sink(out); // $ hasTaintFlow
|
|
}
|
|
{
|
|
// "play.mvc;Http$MultipartFormData;true;asFormUrlEncoded;;;Argument[this];ReturnValue;taint;manual"
|
|
Map out = null;
|
|
Http.MultipartFormData in = (Http.MultipartFormData) source();
|
|
out = in.asFormUrlEncoded();
|
|
sink(out); // $ hasTaintFlow
|
|
}
|
|
{
|
|
// "play.mvc;Http$MultipartFormData;true;getFile;;;Argument[this];ReturnValue;taint;manual"
|
|
Http.MultipartFormData.FilePart out = null;
|
|
Http.MultipartFormData in = (Http.MultipartFormData) source();
|
|
out = in.getFile(null);
|
|
sink(out); // $ hasTaintFlow
|
|
}
|
|
{
|
|
// "play.mvc;Http$MultipartFormData;true;getFiles;;;Argument[this];ReturnValue;taint;manual"
|
|
List out = null;
|
|
Http.MultipartFormData in = (Http.MultipartFormData) source();
|
|
out = in.getFiles();
|
|
sink(out); // $ hasTaintFlow
|
|
}
|
|
{
|
|
// "play.mvc;Http$RawBuffer;true;asBytes;;;Argument[this];ReturnValue;taint;manual"
|
|
ByteString out = null;
|
|
Http.RawBuffer in = (Http.RawBuffer) source();
|
|
out = in.asBytes();
|
|
sink(out); // $ hasTaintFlow
|
|
}
|
|
{
|
|
// "play.mvc;Http$RawBuffer;true;asBytes;;;Argument[this];ReturnValue;taint;manual"
|
|
ByteString out = null;
|
|
Http.RawBuffer in = (Http.RawBuffer) source();
|
|
out = in.asBytes(0);
|
|
sink(out); // $ hasTaintFlow
|
|
}
|
|
{
|
|
// "play.mvc;Http$RawBuffer;true;asFile;;;Argument[this];ReturnValue;taint;manual"
|
|
File out = null;
|
|
Http.RawBuffer in = (Http.RawBuffer) source();
|
|
out = in.asFile();
|
|
sink(out); // $ hasTaintFlow
|
|
}
|
|
{
|
|
// "play.mvc;Http$RequestBody;true;as;;;Argument[this];ReturnValue;taint;manual"
|
|
Object out = null;
|
|
Http.RequestBody in = (Http.RequestBody) source();
|
|
out = in.as(null);
|
|
sink(out); // $ hasTaintFlow
|
|
}
|
|
{
|
|
// "play.mvc;Http$RequestBody;true;asBytes;;;Argument[this];ReturnValue;taint;manual"
|
|
ByteString out = null;
|
|
Http.RequestBody in = (Http.RequestBody) source();
|
|
out = in.asBytes();
|
|
sink(out); // $ hasTaintFlow
|
|
}
|
|
{
|
|
// "play.mvc;Http$RequestBody;true;asFormUrlEncoded;;;Argument[this];ReturnValue;taint;manual"
|
|
Map out = null;
|
|
Http.RequestBody in = (Http.RequestBody) source();
|
|
out = in.asFormUrlEncoded();
|
|
sink(out); // $ hasTaintFlow
|
|
}
|
|
{
|
|
// "play.mvc;Http$RequestBody;true;asJson;;;Argument[this];ReturnValue;taint;manual"
|
|
JsonNode out = null;
|
|
Http.RequestBody in = (Http.RequestBody) source();
|
|
out = in.asJson();
|
|
sink(out); // $ hasTaintFlow
|
|
}
|
|
{
|
|
// "play.mvc;Http$RequestBody;true;asMultipartFormData;;;Argument[this];ReturnValue;taint;manual"
|
|
Http.MultipartFormData out = null;
|
|
Http.RequestBody in = (Http.RequestBody) source();
|
|
out = in.asMultipartFormData();
|
|
sink(out); // $ hasTaintFlow
|
|
}
|
|
{
|
|
// "play.mvc;Http$RequestBody;true;asRaw;;;Argument[this];ReturnValue;taint;manual"
|
|
Http.RawBuffer out = null;
|
|
Http.RequestBody in = (Http.RequestBody) source();
|
|
out = in.asRaw();
|
|
sink(out); // $ hasTaintFlow
|
|
}
|
|
{
|
|
// "play.mvc;Http$RequestBody;true;asText;;;Argument[this];ReturnValue;taint;manual"
|
|
String out = null;
|
|
Http.RequestBody in = (Http.RequestBody) source();
|
|
out = in.asText();
|
|
sink(out); // $ hasTaintFlow
|
|
}
|
|
{
|
|
// "play.mvc;Http$RequestBody;true;asXml;;;Argument[this];ReturnValue;taint;manual"
|
|
Document out = null;
|
|
Http.RequestBody in = (Http.RequestBody) source();
|
|
out = in.asXml();
|
|
sink(out); // $ hasTaintFlow
|
|
}
|
|
{
|
|
// "play.mvc;Http$RequestBody;true;parseJson;;;Argument[this];ReturnValue;taint;manual"
|
|
Optional out = null;
|
|
Http.RequestBody in = (Http.RequestBody) source();
|
|
out = in.parseJson(null);
|
|
sink(out); // $ hasTaintFlow
|
|
}
|
|
|
|
}
|
|
|
|
}
|