Commit Graph

282 Commits

Author SHA1 Message Date
857f646678 Upgrade Spring Boot version to address many security vulnerabilities (#52)
All checks were successful
Build and test / build-and-test (push) Successful in 7m13s
Fixes #28 ([CVE-2024-38809](https://spring.io/security/cve-2024-38809)), #29 ([CVE-2024-38816](https://spring.io/security/cve-2024-38816)), and #46 ([CVE-2024-38820](https://spring.io/security/cve-2024-38820))

Chose to stay on the 3.2 Spring Boot train despite 3.4 being out. Waiting for a more conscious to do the upgrade in case there are other changes required.

Luckily none of the preconditions of the vulnerabilities were true for SciPro so they could not be exploited.

Reviewed-on: #52
Reviewed-by: Tom Zhao <tom.zhao@dsv.su.se>
Co-authored-by: Andreas Svanberg <andreass@dsv.su.se>
Co-committed-by: Andreas Svanberg <andreass@dsv.su.se>
2024-12-03 10:55:28 +01:00
1554d4bc27 Enforce code formatting via Prettier (#44)
All checks were successful
Build and test / build-and-test (push) Successful in 11m55s
Fixes #43 by introducing [Prettier](https://prettier.io/).

Prettier is an extremely opinionated formatter. It will reformat every single line according to its style. There are virtually no configuration options so there can be no discussion about formatting rules.

There are two parameters that are configurable; indent length and line length. Indent length has been set to 4 because that's the Java standard.

Line length defaults to 80 but has been increased to 100. The rational for this is that Prettier was created for JavaScript which is much less verbose than Java. Not only does every Java line start with 8 spaces of indentation vs. JavaScripts 0 or 2, it also has types wile JavaScript does not and uses `const` for variable declarations. Compare the two below examples as well as an actual example from the source code that is too long for the default 80 characters. I have no problem dropping down to the default 80 if that is preferred I just felt that with the average length of a line of Java code being pretty long, excessive wrapping would reduce readability.

```javascript
  const attributes = {
    ...
  };
```
```java
        Map<String, String> attributes = Map.of(
            ...
        );
```

Or the following real code which is 97 characters long.
```java
        Set<ProjectParticipant> contributors = daisyAPI.getContributors(project.getIdentifier());
```

Reviewed-on: #44
Reviewed-by: Tom Zhao <tom.zhao@dsv.su.se>
Co-authored-by: Andreas Svanberg <andreass@dsv.su.se>
Co-committed-by: Andreas Svanberg <andreass@dsv.su.se>
2024-12-02 14:17:59 +01:00
ccac2c1cf8 Enable creating an API using Spring Web (#5)
All checks were successful
Build and test / build-and-test (push) Successful in 6m54s
SciPro will have to provide information to the upcoming student portal. Wicket does not have the ability to serve JSON in the usual REST way and is only able to serve HTML. The most common way to write JSON over HTTP API:s in Java is using Spring Web, but currently SciPro uses Guice for dependency injection rather than Spring which makes adding Spring Web a bit more tricky.

This pull request attempts to solve this by doing the following;
* Replacing Guice with Spring
* Adding a new API module that uses Spring Web
* Turning the entire system into a standard Spring Boot web application

The hope is that these changes will bring the following benefits;
* Harmonize our web stack (Daisy uses Spring and the new lecture hall system is full Spring Boot)
* Enable easy development of a traditional JSON over HTTP API
* Ease future recruitment by using the most common Java web frameworks

Reviewed-on: #5
Reviewed-by: niat8586 <nico@dsv.su.se>
Co-authored-by: Andreas Svanberg <andreass@dsv.su.se>
Co-committed-by: Andreas Svanberg <andreass@dsv.su.se>
2024-11-06 11:23:28 +01:00
e300323135 Update pom.xml (#10)
changed the wicket version due to security scan

Reviewed-on: #10
Reviewed-by: niat8586 <nico@dsv.su.se>
Co-authored-by: wwest <wayne@dsv.su.se>
Co-committed-by: wwest <wayne@dsv.su.se>
2024-07-25 14:20:24 +02:00
e8e8bf8a68 3376 Upgrade Hibernate 2024-05-07 12:23:48 +02:00
7e0d0a8558 3351 Downgrade servlet to match version used by Tomcat 2024-04-22 12:39:32 +02:00
c376554530 Merge branch 'develop' into wicket-10
# Conflicts:
#	pom.xml
2024-04-22 12:35:23 +02:00
0ebd179201 Upgrade Jackson and Jersey 2024-04-22 12:18:12 +02:00
d440956525 3351 Wicket uses ByteBuddy by default now 2024-04-22 10:38:43 +02:00
0c9b167100 3351 Wicketstuff 10 released 2024-04-22 10:20:21 +02:00
f072429753 3351 Upgrade to Wicket 10
Related Jakarta migration upgrades as well
2024-03-14 15:09:49 +01:00
d71173ac02 Update Maven plugin versions to fix validation warnings 2023-11-29 15:50:34 +01:00
d389b40b9e Upgrade to Wicket 9.16.0 2023-11-29 14:52:17 +01:00
0e6f80d111 3092 Switch to MariaDB JDBC driver 2023-11-02 09:54:08 +01:00
nikos dimitrakas
c5ee204a3c Uppgraderade några maven-plugins och exkluderade p12 från valideringen. 2023-08-25 12:08:43 +02:00
nikos dimitrakas
5136880c60 Uppgraderade guava 2023-06-13 12:04:37 +02:00
nikos dimitrakas
e713f055d1 Uppgraderade wicket 2023-06-13 11:54:23 +02:00
1bfdccd093 3083 Upgrade Flyway 2023-05-25 16:38:59 +02:00
7eae863a10 Upgrade maven-surefire-plugin 2023-05-22 12:52:37 +02:00
nikos dimitrakas
bc74a0700e 3080 Uppgraderade hibernate 2023-04-28 12:23:38 +02:00
nikos dimitrakas
76756610ad 3080 Uppgraderade maven-dependencies förslf4j, log4j, wicket (implicit file-upload som hade vulnerability), mysql (fick bort protobuf som mysql hade uppgraderat), junit, mockito, jersey, jackson, surefire, maven-compiler. Lade till versions-plugin. 2023-04-28 12:13:28 +02:00
f09ddd85b1 Upgrade Jackson 2023-03-02 12:55:54 +01:00
dba133176a Midway point to allow upgrading Flyway to the newest version
See https://flywaydb.org/documentation/learnmore/releaseNotes#5.0.0 for why we must upgrade to 4.2.0 first
2023-02-09 16:40:06 +01:00
169872ddad Dependency updates. 2022-12-06 09:38:10 +01:00
7393d73d9c Remove Sonar specific configuration 2022-11-23 15:33:32 +01:00
57ce749a3e Generate JaCoCo XML coverage report for SonarQube 2022-11-23 14:59:56 +01:00
52b254cf3e Upgrade persistence dependencies 2022-11-15 12:57:43 +01:00
4e735837c9 Upgrade test dependencies 2022-11-15 11:56:52 +01:00
be78261734 Upgrade Jackson 2022-11-15 11:50:15 +01:00
f4b82383d8 Upgrade Jersey 2022-11-15 11:44:01 +01:00
ba1be797e0 Upgrade Wicket version 2022-11-15 11:31:13 +01:00
ae1e5856ff 2914 Hibernate bug with subtype checking fixed
To verify:
 1. Go back to Hibernate 6.1.3
 2. Go to the reviewer start page as a reviewer that has undecided approvals
 3. Go to the same page again and it should crash
2022-10-27 15:18:38 +02:00
e02006bfd1 Upgrade to servlet specification 4.0 2022-10-18 12:14:42 +02:00
5dffab23e1 Upgrade Jackson 2022-10-18 09:57:59 +02:00
01a9ac8b32 Update slf4j 2022-10-13 12:28:03 +02:00
43d259264f Update Jackson to fix vulnerabilities CVE-2022-42003, and CVE-2022-42004
Still reporting false positive on 42003; see https://github.com/FasterXML/jackson-databind/issues/3590#issuecomment-1277006520
2022-10-13 12:26:56 +02:00
ee8ecfc74b Update transitive dependency protobuf-java to fix CVE-2022-3171 2022-10-13 12:13:16 +02:00
1826ab5aa8 2891 Upgrade Hibernate and Jersey 2022-10-05 14:34:59 +02:00
820365bf14 Upgrade Jakarta Mail (and use the API) 2022-09-29 11:27:24 +02:00
76fd96b0ca Remove hibernate-validator since it was barely used 2022-09-28 15:15:25 +02:00
09dbaff940 Version upgrades 2022-09-28 12:12:01 +02:00
e811fd04e2 Switch to the new Jakarta dependencies for API specification. 2022-09-28 11:11:47 +02:00
264fcb754a Remove dependency on joda-time 2022-09-22 12:53:50 +02:00
5ab6446817 Update log4j2 2022-09-17 17:13:53 +02:00
5dc79a668b Upgrade Hibernate 2022-08-31 16:29:45 +02:00
33f0b6a3e5 Upgrade SLF4J 2022-08-22 13:55:04 +02:00
a580e41c79 Upgrade Mockito 2022-08-22 13:27:46 +02:00
87f5546e28 Upgrade Jersey 2022-08-10 10:44:52 +02:00
8fdb80ec8b Upgrade Hibernate Validator 2022-08-10 10:39:40 +02:00
b5c4f918a5 Upgrade JUnit 2022-08-10 10:36:16 +02:00