-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #87 from DaspawnW/bugfix/close-vulns
Close vulnerabilities
- Loading branch information
Showing
4 changed files
with
25 additions
and
2 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
19 changes: 19 additions & 0 deletions
19
src/main/java/de/koudingspawn/vault/config/GlobalControllerAdvice.java
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 @@ | ||
package de.koudingspawn.vault.config; | ||
|
||
import org.springframework.core.annotation.Order; | ||
import org.springframework.web.bind.WebDataBinder; | ||
import org.springframework.web.bind.annotation.ControllerAdvice; | ||
import org.springframework.web.bind.annotation.InitBinder; | ||
|
||
// https://www.cyberkendra.com/2022/03/springshell-rce-0-day-vulnerability.html | ||
@ControllerAdvice | ||
@Order(10000) | ||
public class GlobalControllerAdvice { | ||
|
||
@InitBinder | ||
public void setAllowedFields(WebDataBinder dataBinder) { | ||
String[] abd = new String[]{"class.*", "Class.*", "*.class.*", "*.Class.*"}; | ||
dataBinder.setDisallowedFields(abd); | ||
} | ||
|
||
} |
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
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