Update to new version for develop

Move WebWolf to port 9090 easier since most of the time something is running on 8081
Add scripts for easy building Docker files etc
This commit is contained in:
Nanne Baars
2018-05-30 13:17:05 +02:00
parent 0de784eb32
commit ecb7688e08
46 changed files with 131 additions and 67 deletions

View File

@ -1,6 +1,6 @@
FROM openjdk:8-jre-slim
ARG webwolf_version=8.0-SNAPSHOT
ARG webwolf_version=v8.0.0.SNAPSHOT
RUN \
apt-get update && apt-get install && \
@ -9,6 +9,6 @@ RUN \
USER webwolf
COPY target/webwolf-${webwolf_version}.jar /home/webwolf/webwolf.jar
ENTRYPOINT ["java", "-Djava.security.egd=file:/dev/./urandom", "-jar", "/home/webwolf/webwolf.jar", "--server.address=0.0.0.0"]
ENTRYPOINT ["java", "-Djava.security.egd=file:/dev/./urandom", "-jar", "/home/webwolf/webwolf.jar", "--server.port=9090", "--server.address=0.0.0.0"]
EXPOSE 8081
EXPOSE 9090

View File

@ -21,7 +21,7 @@ At the moment WebWolf offers support for:
## 1. Run using Docker
If you use the Docker image of WebGoat this application will automatically be available. Use the following
URL: http://localhost:8081/WebWolf
URL: http://localhost:9090/WebWolf
## 2. Standalone
@ -36,7 +36,7 @@ Now we are ready to run the project. WebGoat 8.x is using Spring-Boot.
```Shell
mvn -pl webwolf spring-boot:run
```
... you should be running WebWolf on localhost:8081/WebWolf momentarily
... you should be running WebWolf on localhost:9090/WebWolf momentarily

View File

@ -6,7 +6,7 @@
<parent>
<groupId>org.owasp.webgoat</groupId>
<artifactId>webgoat-parent</artifactId>
<version>v8.0.0.M15</version>
<version>v8.0.0.SNAPSHOT</version>
</parent>
<dependencies>

View File

@ -32,6 +32,11 @@ public class FileServer {
@Value("${webwolf.fileserver.location}")
private String fileLocatation;
@Value("${server.address}")
private String server;
@Value("${server.port}")
private int port;
@PostMapping(value = "/WebWolf/fileupload")
@SneakyThrows
@ -84,6 +89,7 @@ public class FileServer {
}
modelAndView.addObject("files", uploadedFiles);
modelAndView.addObject("webwolf_url", "http://" + server +":" + port);
return modelAndView;
}
}

View File

@ -2,8 +2,8 @@ server.error.include-stacktrace=always
server.error.path=/error.html
server.session.timeout=6000
#server.contextPath=/WebWolf
server.port=8081
server.address=127.0.0.1
server.port=9090
server.address=localhost
server.session.cookie.name = WEBWOLFSESSION
spring.datasource.url=jdbc:hsqldb:hsql://${webgoat.server.address:localhost}:9001/webgoat

View File

@ -20,7 +20,7 @@
</p>
<p>
Each file will be available under the following url:
http://localhost:8081/files/{username}/{filename}.
<span th:text="${webwolf_url}">http://localhost:9090/</span>/files/{username}/{filename}.
</p>
<p>
You can copy and paste the location from the table below.
@ -33,7 +33,7 @@
</div>
<div class="panel-body">
<!-- Standar Form -->
<!-- Standard Form -->
<form th:action="@{/WebWolf/fileupload}" method="post" enctype="multipart/form-data">
<div class="form-inline">
<div class="form-group">