first commit
Some checks failed
Vulhub Format Check and Lint / format-check (push) Has been cancelled
Vulhub Format Check and Lint / markdown-check (push) Has been cancelled
Vulhub Docker Image CI / longtime-images-test (push) Has been cancelled
Vulhub Docker Image CI / images-test (push) Has been cancelled
Some checks failed
Vulhub Format Check and Lint / format-check (push) Has been cancelled
Vulhub Format Check and Lint / markdown-check (push) Has been cancelled
Vulhub Docker Image CI / longtime-images-test (push) Has been cancelled
Vulhub Docker Image CI / images-test (push) Has been cancelled
This commit is contained in:
21
base/apache-cxf/3.2.14/Dockerfile
Normal file
21
base/apache-cxf/3.2.14/Dockerfile
Normal file
@@ -0,0 +1,21 @@
|
||||
FROM maven:3.9.9-eclipse-temurin-8 AS builder
|
||||
|
||||
LABEL maintainer="ReaJason <reajason1225@gmail.com>"
|
||||
|
||||
COPY ./ /usr/src
|
||||
|
||||
RUN set -ex \
|
||||
&& cd /usr/src \
|
||||
&& mvn clean package -DskipTests
|
||||
|
||||
FROM openjdk:8u342-jre
|
||||
|
||||
LABEL maintainer="ReaJason <reajason1225@gmail.com>"
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY --from=builder /usr/src/target/*.jar /app/cxf.jar
|
||||
|
||||
EXPOSE 8080
|
||||
|
||||
CMD java $JAVA_OPTS -jar /app/cxf.jar
|
71
base/apache-cxf/3.2.14/pom.xml
Normal file
71
base/apache-cxf/3.2.14/pom.xml
Normal file
@@ -0,0 +1,71 @@
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<groupId>io.github.reajason</groupId>
|
||||
<artifactId>CVE-2024-28752</artifactId>
|
||||
<version>1.0</version>
|
||||
|
||||
<properties>
|
||||
<cxf-version>3.2.14</cxf-version>
|
||||
<maven.compiler.source>8</maven.compiler.source>
|
||||
<maven.compiler.target>8</maven.compiler.target>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.apache.cxf</groupId>
|
||||
<artifactId>cxf-rt-frontend-jaxws</artifactId>
|
||||
<version>${cxf-version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.cxf</groupId>
|
||||
<artifactId>cxf-rt-databinding-aegis</artifactId>
|
||||
<version>${cxf-version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.cxf</groupId>
|
||||
<artifactId>cxf-rt-transports-http-jetty</artifactId>
|
||||
<version>${cxf-version}</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-api</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-shade-plugin</artifactId>
|
||||
<version>3.6.0</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<phase>package</phase>
|
||||
<goals>
|
||||
<goal>shade</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<finalName>cxf</finalName>
|
||||
<transformers>
|
||||
<transformer
|
||||
implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
|
||||
<manifestEntries>
|
||||
<Main-Class>ServerStarter</Main-Class>
|
||||
</manifestEntries>
|
||||
</transformer>
|
||||
<transformer
|
||||
implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
|
||||
<resource>META-INF/cxf/bus-extensions.txt</resource>
|
||||
</transformer>
|
||||
</transformers>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
41
base/apache-cxf/3.2.14/src/main/java/Model.java
Normal file
41
base/apache-cxf/3.2.14/src/main/java/Model.java
Normal file
@@ -0,0 +1,41 @@
|
||||
/**
|
||||
* @author ReaJason
|
||||
* @since 2025/5/10
|
||||
*/
|
||||
public class Model {
|
||||
private String text;
|
||||
private int count;
|
||||
private boolean you;
|
||||
|
||||
public int getCount() {
|
||||
return count;
|
||||
}
|
||||
|
||||
public void setCount(int count) {
|
||||
this.count = count;
|
||||
}
|
||||
|
||||
public String getText() {
|
||||
return text;
|
||||
}
|
||||
|
||||
public void setText(String text) {
|
||||
this.text = text;
|
||||
}
|
||||
|
||||
public boolean isYou() {
|
||||
return you;
|
||||
}
|
||||
|
||||
public void setYou(boolean you) {
|
||||
this.you = you;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "Model{" + "count=" + count +
|
||||
", text='" + text + '\'' +
|
||||
", you=" + you +
|
||||
'}';
|
||||
}
|
||||
}
|
13
base/apache-cxf/3.2.14/src/main/java/ServerStarter.java
Normal file
13
base/apache-cxf/3.2.14/src/main/java/ServerStarter.java
Normal file
@@ -0,0 +1,13 @@
|
||||
import org.apache.cxf.jaxws.JaxWsServerFactoryBean;
|
||||
|
||||
public class ServerStarter {
|
||||
public static void main(String[] args) {
|
||||
JaxWsServerFactoryBean factory = new JaxWsServerFactoryBean();
|
||||
factory.setServiceClass(Test.class);
|
||||
factory.setAddress("http://0.0.0.0:8080/test");
|
||||
factory.setServiceBean(new TestImpl());
|
||||
factory.create();
|
||||
System.out.println("Webservice: http://localhost:8080/test");
|
||||
System.out.println("Webservice WSDL: http://localhost:8080/test?wsdl");
|
||||
}
|
||||
}
|
6
base/apache-cxf/3.2.14/src/main/java/Test.java
Normal file
6
base/apache-cxf/3.2.14/src/main/java/Test.java
Normal file
@@ -0,0 +1,6 @@
|
||||
import javax.jws.WebService;
|
||||
|
||||
@WebService(name = "Test", targetNamespace = "http://service.namespace/")
|
||||
public interface Test {
|
||||
String test(Model model);
|
||||
}
|
7
base/apache-cxf/3.2.14/src/main/java/TestImpl.java
Normal file
7
base/apache-cxf/3.2.14/src/main/java/TestImpl.java
Normal file
@@ -0,0 +1,7 @@
|
||||
public class TestImpl implements Test {
|
||||
|
||||
@Override
|
||||
public String test(Model model) {
|
||||
return model.toString();
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user