1
0

400 when a path is entered

This commit is contained in:
Hubert Van De Walle 2020-09-10 23:26:32 +02:00
parent 94269c7a87
commit 658ac10375

View File

@ -33,6 +33,13 @@ class Server(
val projectName = inputs.find { it.name == "name" }!!.value!!
val basePackage = inputs.find { it.name == "basePackage" }!!.value!!
if (basePackage.contains("/") || basePackage.contains("..")) {
ctx.status(400)
ctx.result("Invalid Base Package")
return@post
}
val project = Project(projectName, basePackage, inputs, deps)
ctx.contentType("application/zip")