-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Made java-goof top level module. Moved all the todolist stuff into a …
…todolist-goof module.
Showing
290 changed files
with
2,538 additions
and
82 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,107 @@ | ||
<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/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<parent> | ||
<artifactId>java-goof</artifactId> | ||
<groupId>io.github.snyk</groupId> | ||
<version>1.0-SNAPSHOT</version> | ||
</parent> | ||
|
||
<groupId>io.github.snyk</groupId> | ||
<artifactId>todolist-mvc</artifactId> | ||
<version>1.0-SNAPSHOT</version> | ||
<name>Todolist MVC parent module</name> | ||
<description>A vulnerable demo application, initially based on Ben Hassine's TodoMVC.</description> | ||
<url>https://github.com/snyk/java-goof</url> | ||
|
||
<properties> | ||
<spring.version>3.2.6.RELEASE</spring.version> | ||
<hibernate.version>4.3.7.Final</hibernate.version> | ||
<tapestry.version>5.3.8</tapestry.version> | ||
<struts2.version>2.3.20</struts2.version> | ||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | ||
</properties> | ||
|
||
<modules> | ||
<module>todolist-core</module> | ||
<module>todolist-web-common</module> | ||
<module>todolist-web-struts</module> | ||
</modules> | ||
<packaging>pom</packaging> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>javax.xml.bind</groupId> | ||
<artifactId>jaxb-api</artifactId> | ||
<version>2.3.0</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.sun.xml.bind</groupId> | ||
<artifactId>jaxb-core</artifactId> | ||
<version>2.3.0</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.sun.xml.bind</groupId> | ||
<artifactId>jaxb-impl</artifactId> | ||
<version>2.3.0</version> | ||
</dependency> | ||
</dependencies> | ||
|
||
<licenses> | ||
<license> | ||
<name>MIT License</name> | ||
<url>http://opensource.org/licenses/mit-license.php</url> | ||
</license> | ||
</licenses> | ||
|
||
<build> | ||
<pluginManagement> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-compiler-plugin</artifactId> | ||
<version>3.2</version> | ||
<configuration> | ||
<verbose>true</verbose> | ||
<source>1.7</source> | ||
<target>1.7</target> | ||
<showWarnings>true</showWarnings> | ||
</configuration> | ||
</plugin> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-dependency-plugin</artifactId> | ||
<version>2.9</version> | ||
<executions> | ||
<execution> | ||
<id>install</id> | ||
<phase>install</phase> | ||
<goals> | ||
<goal>sources</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-war-plugin</artifactId> | ||
<version>3.2.3</version> | ||
<configuration> | ||
<warName>todolist</warName> | ||
</configuration> | ||
</plugin> | ||
<plugin> | ||
<groupId>org.apache.tomcat.maven</groupId> | ||
<artifactId>tomcat7-maven-plugin</artifactId> | ||
<version>2.2</version> | ||
<configuration> | ||
<warFile>target/todolist.war</warFile> | ||
<path>/</path> | ||
</configuration> | ||
</plugin> | ||
</plugins> | ||
</pluginManagement> | ||
</build> | ||
|
||
</project> |
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
15 changes: 15 additions & 0 deletions
15
todolist-goof/todolist-core/target/classes/META-INF/persistence.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
|
||
<persistence xmlns="http://java.sun.com/xml/ns/persistence" version="2.0"> | ||
|
||
<persistence-unit name="todolist_pu" transaction-type="RESOURCE_LOCAL"> | ||
<provider>org.hibernate.jpa.HibernatePersistenceProvider</provider> | ||
<properties> | ||
<property name="hibernate.dialect" value="org.hibernate.dialect.HSQLDialect"/> | ||
<property name="hibernate.connection.url" value="jdbc:hsqldb:mem:todolist"/> | ||
<property name="hibernate.connection.driver_class" value="org.hsqldb.jdbcDriver"/> | ||
<property name="hibernate.connection.username" value="sa"/> | ||
<property name="hibernate.connection.password" value=""/> | ||
</properties> | ||
</persistence-unit> | ||
</persistence> |
20 changes: 20 additions & 0 deletions
20
todolist-goof/todolist-core/target/classes/META-INF/spring/application-context.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
|
||
<beans xmlns="http://www.springframework.org/schema/beans" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://www.springframework.org/schema/beans | ||
http://www.springframework.org/schema/beans/spring-beans-3.2.xsd"> | ||
|
||
<import resource="infrastructure-context.xml"/> | ||
|
||
<!-- ========================== --> | ||
<!-- Business configuration --> | ||
<!-- ========================== --> | ||
|
||
<bean id="userRepository" class="io.github.todolist.core.repository.impl.UserRepositoryImpl"/> | ||
<bean id="todoRepository" class="io.github.todolist.core.repository.impl.TodoRepositoryImpl"/> | ||
|
||
<bean id="userService" class="io.github.todolist.core.service.impl.UserServiceImpl"/> | ||
<bean id="todoService" class="io.github.todolist.core.service.impl.TodoServiceImpl"/> | ||
|
||
</beans> |
51 changes: 51 additions & 0 deletions
51
todolist-goof/todolist-core/target/classes/META-INF/spring/infrastructure-context.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
|
||
<beans xmlns="http://www.springframework.org/schema/beans" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xmlns:jdbc="http://www.springframework.org/schema/jdbc" | ||
xmlns:context="http://www.springframework.org/schema/context" | ||
xmlns:tx="http://www.springframework.org/schema/tx" | ||
xsi:schemaLocation="http://www.springframework.org/schema/beans | ||
http://www.springframework.org/schema/beans/spring-beans-3.2.xsd | ||
http://www.springframework.org/schema/jdbc | ||
http://www.springframework.org/schema/jdbc/spring-jdbc-3.2.xsd | ||
http://www.springframework.org/schema/context | ||
http://www.springframework.org/schema/context/spring-context-3.2.xsd | ||
http://www.springframework.org/schema/tx | ||
http://www.springframework.org/schema/tx/spring-tx-3.2.xsd"> | ||
|
||
<context:property-placeholder location="classpath:config/*.properties"/> | ||
|
||
<context:annotation-config/> | ||
|
||
<!-- ======================================== --> | ||
<!-- embedded database configuration --> | ||
<!-- ======================================== --> | ||
|
||
<bean id="todolistDataSource" class="com.mchange.v2.c3p0.ComboPooledDataSource" destroy-method="close"> | ||
<property name="driverClass" value="${db.driver}"/> | ||
<property name="jdbcUrl" value="${db.url}"/> | ||
<property name="user" value="${db.username}"/> | ||
<property name="password" value="${db.password}"/> | ||
</bean> | ||
|
||
<jdbc:initialize-database data-source="todolistDataSource"> | ||
<jdbc:script location="classpath:config/schema.sql"/> | ||
<jdbc:script location="classpath:config/data.sql"/> | ||
</jdbc:initialize-database> | ||
|
||
<bean class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean" id="entityManagerFactory"> | ||
<property name="persistenceUnitName" value="todolist_pu"/> | ||
<property name="dataSource" ref="todolistDataSource"/> | ||
</bean> | ||
|
||
<bean id="transactionManager" class="org.springframework.orm.jpa.JpaTransactionManager"> | ||
<property name="entityManagerFactory" ref="entityManagerFactory"/> | ||
<property name="dataSource" ref="todolistDataSource"/> | ||
</bean> | ||
|
||
<tx:annotation-driven/> | ||
|
||
<bean class="org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor" /> | ||
|
||
</beans> |
16 changes: 16 additions & 0 deletions
16
todolist-goof/todolist-core/target/classes/config/data.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
--users | ||
INSERT INTO user VALUES (1,'Foo','[email protected]', 'foobar'); | ||
INSERT INTO user VALUES (2,'Bar','[email protected]', 'barfoo'); | ||
|
||
--todos | ||
|
||
INSERT INTO todo VALUES (1,1,'Prepare birthday party', true, 1,'2014-05-25'); | ||
INSERT INTO todo VALUES (2,1,'Wash the car', true, 1,'2014-02-02'); | ||
INSERT INTO todo VALUES (3,1,'Take out the trash', false, 2,'2014-10-11'); | ||
INSERT INTO todo VALUES (4,1,'Buy a gift for mom', true, 2,'2014-07-25'); | ||
INSERT INTO todo VALUES (5,1,'Remember the milk', false, 0,'2014-08-12'); | ||
INSERT INTO todo VALUES (6,1,'Prepare for interview', true, 0,'2014-08-12'); | ||
INSERT INTO todo VALUES (7,1,'Email David about project', true, 2,'2014-10-10'); | ||
INSERT INTO todo VALUES (8,1,'Feed the dog', false, 0,'2014-12-12'); | ||
INSERT INTO todo VALUES (9,1,'Change password', false, 1,'2014-04-30'); | ||
INSERT INTO todo VALUES (10,1,'Send weekly reports', false, 2,'2014-08-22'); |
5 changes: 5 additions & 0 deletions
5
todolist-goof/todolist-core/target/classes/config/database.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#HSQL in-memory db | ||
db.driver=org.hsqldb.jdbcDriver | ||
db.url=jdbc:hsqldb:mem:todolist | ||
db.username=sa | ||
db.password= |
4 changes: 4 additions & 0 deletions
4
todolist-goof/todolist-core/target/classes/config/hibernate.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
hibernate.dialect=org.hibernate.dialect.HSQLDialect | ||
hibernate.show_sql=false | ||
hibernate.format_sql=false | ||
hibernate.use_sql_comments=true |
19 changes: 19 additions & 0 deletions
19
todolist-goof/todolist-core/target/classes/config/schema.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
CREATE TABLE user ( | ||
id int IDENTITY NOT NULL PRIMARY KEY, | ||
name varchar(32) DEFAULT NULL, | ||
email varchar(32) NOT NULL, | ||
password varchar(32) DEFAULT NULL | ||
); | ||
|
||
ALTER TABLE user ADD CONSTRAINT unique_email UNIQUE (email); | ||
|
||
CREATE TABLE todo ( | ||
id int IDENTITY NOT NULL PRIMARY KEY, | ||
userId int NOT NULL, | ||
title varchar(512) DEFAULT NULL, | ||
done boolean DEFAULT FALSE NOT NULL, | ||
priority tinyint NOT NULL, | ||
dueDate date DEFAULT NULL | ||
); | ||
|
||
alter table todo add constraint user_fk foreign key (userId) references user(id); |
Binary file added
BIN
+867 Bytes
todolist-goof/todolist-core/target/classes/io/github/todolist/core/Statics.class
Binary file not shown.
Binary file added
BIN
+1.07 KB
todolist-goof/todolist-core/target/classes/io/github/todolist/core/domain/Priority.class
Binary file not shown.
Binary file added
BIN
+4.96 KB
todolist-goof/todolist-core/target/classes/io/github/todolist/core/domain/Todo.class
Binary file not shown.
Binary file added
BIN
+2.08 KB
todolist-goof/todolist-core/target/classes/io/github/todolist/core/domain/User.class
Binary file not shown.
Binary file added
BIN
+680 Bytes
.../todolist-core/target/classes/io/github/todolist/core/repository/api/TodoRepository.class
Binary file not shown.
Binary file added
BIN
+464 Bytes
.../todolist-core/target/classes/io/github/todolist/core/repository/api/UserRepository.class
Binary file not shown.
Binary file added
BIN
+2.82 KB
...list-core/target/classes/io/github/todolist/core/repository/impl/TodoRepositoryImpl.class
Binary file not shown.
Binary file added
BIN
+3.05 KB
...list-core/target/classes/io/github/todolist/core/repository/impl/UserRepositoryImpl.class
Binary file not shown.
Binary file added
BIN
+667 Bytes
...t-goof/todolist-core/target/classes/io/github/todolist/core/service/api/TodoService.class
Binary file not shown.
Binary file added
BIN
+455 Bytes
...t-goof/todolist-core/target/classes/io/github/todolist/core/service/api/UserService.class
Binary file not shown.
Binary file added
BIN
+1.92 KB
...f/todolist-core/target/classes/io/github/todolist/core/service/impl/TodoServiceImpl.class
Binary file not shown.
Binary file added
BIN
+1.59 KB
...f/todolist-core/target/classes/io/github/todolist/core/service/impl/UserServiceImpl.class
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
log4j.rootLogger=error, stderr | ||
|
||
#log messages to stderr | ||
log4j.appender.stderr=org.apache.log4j.ConsoleAppender | ||
log4j.appender.stderr.Target=System.err | ||
log4j.appender.stderr.layout=org.apache.log4j.PatternLayout | ||
log4j.appender.stderr.layout.ConversionPattern= %d{dd/MM/yyyy HH:mm:ss} [%-5p] %c:%L - %m%n |
5 changes: 5 additions & 0 deletions
5
todolist-goof/todolist-core/target/maven-archiver/pom.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#Generated by Maven | ||
#Tue Dec 14 22:38:34 EST 2021 | ||
version=1.0-SNAPSHOT | ||
groupId=io.github.snyk | ||
artifactId=todolist-core |
12 changes: 12 additions & 0 deletions
12
...t-core/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
io/github/todolist/core/Statics.class | ||
io/github/todolist/core/domain/User.class | ||
io/github/todolist/core/repository/api/TodoRepository.class | ||
io/github/todolist/core/service/api/TodoService.class | ||
io/github/todolist/core/domain/Priority.class | ||
io/github/todolist/core/repository/api/UserRepository.class | ||
io/github/todolist/core/service/impl/UserServiceImpl.class | ||
io/github/todolist/core/service/api/UserService.class | ||
io/github/todolist/core/repository/impl/UserRepositoryImpl.class | ||
io/github/todolist/core/repository/impl/TodoRepositoryImpl.class | ||
io/github/todolist/core/service/impl/TodoServiceImpl.class | ||
io/github/todolist/core/domain/Todo.class |
12 changes: 12 additions & 0 deletions
12
...ist-core/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
/Users/micahsilverman/Projects/snyk/goofs/java-goof/todolist-goof/todolist-core/src/main/java/io/github/todolist/core/service/api/UserService.java | ||
/Users/micahsilverman/Projects/snyk/goofs/java-goof/todolist-goof/todolist-core/src/main/java/io/github/todolist/core/repository/impl/TodoRepositoryImpl.java | ||
/Users/micahsilverman/Projects/snyk/goofs/java-goof/todolist-goof/todolist-core/src/main/java/io/github/todolist/core/service/impl/UserServiceImpl.java | ||
/Users/micahsilverman/Projects/snyk/goofs/java-goof/todolist-goof/todolist-core/src/main/java/io/github/todolist/core/repository/impl/UserRepositoryImpl.java | ||
/Users/micahsilverman/Projects/snyk/goofs/java-goof/todolist-goof/todolist-core/src/main/java/io/github/todolist/core/service/impl/TodoServiceImpl.java | ||
/Users/micahsilverman/Projects/snyk/goofs/java-goof/todolist-goof/todolist-core/src/main/java/io/github/todolist/core/domain/Todo.java | ||
/Users/micahsilverman/Projects/snyk/goofs/java-goof/todolist-goof/todolist-core/src/main/java/io/github/todolist/core/repository/api/TodoRepository.java | ||
/Users/micahsilverman/Projects/snyk/goofs/java-goof/todolist-goof/todolist-core/src/main/java/io/github/todolist/core/service/api/TodoService.java | ||
/Users/micahsilverman/Projects/snyk/goofs/java-goof/todolist-goof/todolist-core/src/main/java/io/github/todolist/core/domain/Priority.java | ||
/Users/micahsilverman/Projects/snyk/goofs/java-goof/todolist-goof/todolist-core/src/main/java/io/github/todolist/core/repository/api/UserRepository.java | ||
/Users/micahsilverman/Projects/snyk/goofs/java-goof/todolist-goof/todolist-core/src/main/java/io/github/todolist/core/Statics.java | ||
/Users/micahsilverman/Projects/snyk/goofs/java-goof/todolist-goof/todolist-core/src/main/java/io/github/todolist/core/domain/User.java |
2 changes: 2 additions & 0 deletions
2
...arget/maven-status/maven-compiler-plugin/testCompile/default-testCompile/createdFiles.lst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
io/github/todolist/core/TodoServiceTest.class | ||
io/github/todolist/core/UserServiceTest.class |
Oops, something went wrong.