Skip to content

Commit 978010d

Browse files
committed
fix(security): prevent path traversal and refine HTTP server controls
- Enhance path normalization in `Dispatcher` and `HttpServer` to properly validate base directory boundaries and prevent directory traversal attacks. - Update `sanitizeUri` in `HttpServer` to return a normalized `Path` and support longer URIs (up to 2048 chars). - Hide sensitive exception details in HTTP 500 responses unless the environment is set to 'development'. - Mark session cookies as `Secure` when requests are served over HTTPS. - Update `maven-assembly-plugin` to version 3.7.1. - Bump project version to 1.7.28.
1 parent efe08d5 commit 978010d

21 files changed

Lines changed: 64 additions & 53 deletions

.agent/skills/tinystruct-patterns/SKILL.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,13 +142,13 @@ try {
142142

143143
## MCP Server and Tools Integration
144144

145-
tinystruct provides native support for the Model Context Protocol (MCP) starting with SDK version **`1.7.27`**.
145+
tinystruct provides native support for the Model Context Protocol (MCP) starting with SDK version **`1.7.28`**.
146146
The MCP APIs (e.g., `org.tinystruct.mcp.MCPTool`, `org.tinystruct.mcp.MCPServer`, `org.tinystruct.mcp.MCPException`) are included directly in the core dependency:
147147
```xml
148148
<dependency>
149149
<groupId>org.tinystruct</groupId>
150150
<artifactId>tinystruct</artifactId>
151-
<version>1.7.27</version>
151+
<version>1.7.28</version>
152152
</dependency>
153153
```
154154

DEVELOPER_GUIDE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ Add the following dependency to your `pom.xml`:
2626
<dependency>
2727
<groupId>org.tinystruct</groupId>
2828
<artifactId>tinystruct</artifactId>
29-
<version>1.7.27</version>
29+
<version>1.7.28</version>
3030
</dependency>
3131
```
3232

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ Installation and Getting Started Manually
3030
<dependency>
3131
<groupId>org.tinystruct</groupId>
3232
<artifactId>tinystruct</artifactId>
33-
<version>1.7.27</version>
33+
<version>1.7.28</version>
3434
<classifier>jar-with-dependencies</classifier> <!-- Optional -->
3535
</dependency>
3636
```
@@ -96,7 +96,7 @@ Execute in CLI mode
9696
$ bin/dispatcher --version
9797

9898
_/ ' _ _/ _ _ _/
99-
/ / /) (/ _) / / (/ ( / 1.7.27
99+
/ / /) (/ _) / / (/ ( / 1.7.28
100100
/
101101
```
102102
```tcsh

bin/dispatcher

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
# ***************************************************************************
1818

1919
ROOT="$(pwd)"
20-
VERSION="1.7.27"
20+
VERSION="1.7.28"
2121
cd "$(dirname "$0")" || exit
2222
cd "../"
2323
# Navigate to the root directory

bin/dispatcher.cmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
set "MAVEN_REPO=%USERPROFILE%\.m2\repository\org\tinystruct\tinystruct"
2020
@REM Consolidate classpath entries, initialize ROOT and VERSION
2121
set "ROOT=%~dp0.."
22-
set "VERSION=1.7.27"
22+
set "VERSION=1.7.28"
2323

2424
@REM Define the paths for tinystruct jars in the project lib folder and Maven repository
2525
set "PROJECT_LIB_JAR=%ROOT%\lib\tinystruct-%VERSION%.jar"

build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ elif [ -f "$HOME/.bash_profile" ]; then
2525
fi
2626

2727
# Define variables
28-
TARGET_JAR="./target/tinystruct-1.7.27.jar"
28+
TARGET_JAR="./target/tinystruct-1.7.28.jar"
2929
NATIVE_NAME="dispatcher-native"
3030
MAIN_CLASS="org.tinystruct.system.Dispatcher"
3131
CONFIG_DIR="./bin/.metadata"

docs/README.de.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Manuelle Installation und Einstieg
2929
<dependency>
3030
<groupId>org.tinystruct</groupId>
3131
<artifactId>tinystruct</artifactId>
32-
<version>1.7.27</version>
32+
<version>1.7.28</version>
3333
<classifier>jar-with-dependencies</classifier> <!-- Optional -->
3434
</dependency>
3535
```
@@ -95,7 +95,7 @@ Im CLI-Modus ausführen
9595
$ bin/dispatcher --version
9696

9797
_/ ' _ _/ _ _ _/
98-
/ / /) (/ _) / / (/ ( / 1.7.27
98+
/ / /) (/ _) / / (/ ( / 1.7.28
9999
/
100100
```
101101
```tcsh

docs/README.es.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Instalación manual y primeros pasos
2929
<dependency>
3030
<groupId>org.tinystruct</groupId>
3131
<artifactId>tinystruct</artifactId>
32-
<version>1.7.27</version>
32+
<version>1.7.28</version>
3333
<classifier>jar-with-dependencies</classifier> <!-- Opcional -->
3434
</dependency>
3535
```
@@ -95,7 +95,7 @@ Ejecutar en modo CLI
9595
$ bin/dispatcher --version
9696

9797
_/ ' _ _/ _ _ _/
98-
/ / /) (/ _) / / (/ ( / 1.7.27
98+
/ / /) (/ _) / / (/ ( / 1.7.28
9999
/
100100
```
101101
```tcsh

docs/README.ja.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ tinystruct archetype で始める
2929
<dependency>
3030
<groupId>org.tinystruct</groupId>
3131
<artifactId>tinystruct</artifactId>
32-
<version>1.7.27</version>
32+
<version>1.7.28</version>
3333
<classifier>jar-with-dependencies</classifier> <!-- 任意 -->
3434
</dependency>
3535
```
@@ -95,7 +95,7 @@ CLI モードで実行
9595
$ bin/dispatcher --version
9696

9797
_/ ' _ _/ _ _ _/
98-
/ / /) (/ _) / / (/ ( / 1.7.27
98+
/ / /) (/ _) / / (/ ( / 1.7.28
9999
/
100100
```
101101
```tcsh

docs/README.ko.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ tinystruct archetype으로 시작하기
2929
<dependency>
3030
<groupId>org.tinystruct</groupId>
3131
<artifactId>tinystruct</artifactId>
32-
<version>1.7.27</version>
32+
<version>1.7.28</version>
3333
<classifier>jar-with-dependencies</classifier> <!-- 선택 사항 -->
3434
</dependency>
3535
```
@@ -95,7 +95,7 @@ CLI 모드로 실행
9595
$ bin/dispatcher --version
9696

9797
_/ ' _ _/ _ _ _/
98-
/ / /) (/ _) / / (/ ( / 1.7.27
98+
/ / /) (/ _) / / (/ ( / 1.7.28
9999
/
100100
```
101101
```tcsh

0 commit comments

Comments
 (0)