Compare commits

...

6 Commits

Author SHA1 Message Date
Muratcan Yeldan
5635266118
Merge aae2bad815844657d2e9da9d83f5abfef41a0341 into c388ba73c12372251d96d94341f5e319183ccf55 2025-04-18 16:05:18 +03:00
Muratcan Yeldan
aae2bad815
Merge branch 'main' into patch-4 2025-04-18 16:05:15 +03:00
Ludy
c388ba73c1
Update Google Java Format to v1.26.0 across devcontainer, VSCode, and Gradle configuration (#3375)
# Description of Changes

Please provide a summary of the changes, including:

- **What was changed**  
Updated `java.format.settings.google.version` from `1.25.2` to `1.26.0`
in:
  - `.devcontainer/devcontainer.json`  
  - `.vscode/settings.json`  
  - `build.gradle` (Spotless plugin configuration)

- **Why the change was made**  
Bump to the latest Google Java Format release (v1.26.0) to pick up
formatting improvements, bug fixes, and maintain consistency across all
development environments.

---

## Checklist

### General

- [x] I have read the [Contribution
Guidelines](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/CONTRIBUTING.md)
- [x] I have read the [Stirling-PDF Developer
Guide](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/DeveloperGuide.md)
(if applicable)
- [ ] I have read the [How to add new languages to
Stirling-PDF](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/HowToAddNewLanguage.md)
(if applicable)
- [x] I have performed a self-review of my own code
- [x] My changes generate no new warnings

### Documentation

- [ ] I have updated relevant docs on [Stirling-PDF's doc
repo](https://github.com/Stirling-Tools/Stirling-Tools.github.io/blob/main/docs/)
(if functionality has heavily changed)
- [ ] I have read the section [Add New Translation
Tags](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/HowToAddNewLanguage.md#add-new-translation-tags)
(for new translation tags only)

### UI Changes (if applicable)

- [ ] Screenshots or videos demonstrating the UI changes are attached
(e.g., as comments or direct attachments in the PR)

### Testing (if applicable)

- [ ] I have tested my changes locally. Refer to the [Testing
Guide](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/DeveloperGuide.md#6-testing)
for more details.
2025-04-17 22:11:30 +01:00
Ludy
54f2e012f5
Bump ruff to v0.11.6 and gitleaks to v8.24.3 in pre-commit config (#3376)
# Description of Changes

Please provide a summary of the changes, including:

- **What was changed**  
Updated the versions of two pre-commit hooks in
`.pre-commit-config.yaml`:
  - `ruff` from `v0.9.10` to `v0.11.6`  
  - `gitleaks` from `v8.24.0` to `v8.24.3`

- **Why the change was made**  
Keeping linting and security-scanning tools up to date ensures we
benefit from the latest bug fixes, performance improvements, and new
checks. This helps maintain code quality and reduces the risk of false
positives or unfixed vulnerabilities.


---

## Checklist

### General

- [x] I have read the [Contribution
Guidelines](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/CONTRIBUTING.md)
- [x] I have read the [Stirling-PDF Developer
Guide](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/DeveloperGuide.md)
(if applicable)
- [ ] I have read the [How to add new languages to
Stirling-PDF](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/HowToAddNewLanguage.md)
(if applicable)
- [x] I have performed a self-review of my own code
- [x] My changes generate no new warnings

### Documentation

- [ ] I have updated relevant docs on [Stirling-PDF's doc
repo](https://github.com/Stirling-Tools/Stirling-Tools.github.io/blob/main/docs/)
(if functionality has heavily changed)
- [ ] I have read the section [Add New Translation
Tags](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/HowToAddNewLanguage.md#add-new-translation-tags)
(for new translation tags only)

### UI Changes (if applicable)

- [ ] Screenshots or videos demonstrating the UI changes are attached
(e.g., as comments or direct attachments in the PR)

### Testing (if applicable)

- [ ] I have tested my changes locally. Refer to the [Testing
Guide](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/DeveloperGuide.md#6-testing)
for more details.
2025-04-17 22:10:39 +01:00
Anthony Stirling
ef6c0f2383
fix security deploy (#3373)
# Description of Changes

Please provide a summary of the changes, including:

- What was changed
- Why the change was made
- Any challenges encountered

Closes #(issue_number)

---

## Checklist

### General

- [ ] I have read the [Contribution
Guidelines](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/CONTRIBUTING.md)
- [ ] I have read the [Stirling-PDF Developer
Guide](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/DeveloperGuide.md)
(if applicable)
- [ ] I have read the [How to add new languages to
Stirling-PDF](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/HowToAddNewLanguage.md)
(if applicable)
- [ ] I have performed a self-review of my own code
- [ ] My changes generate no new warnings

### Documentation

- [ ] I have updated relevant docs on [Stirling-PDF's doc
repo](https://github.com/Stirling-Tools/Stirling-Tools.github.io/blob/main/docs/)
(if functionality has heavily changed)
- [ ] I have read the section [Add New Translation
Tags](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/HowToAddNewLanguage.md#add-new-translation-tags)
(for new translation tags only)

### UI Changes (if applicable)

- [ ] Screenshots or videos demonstrating the UI changes are attached
(e.g., as comments or direct attachments in the PR)

### Testing (if applicable)

- [ ] I have tested my changes locally. Refer to the [Testing
Guide](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/DeveloperGuide.md#6-testing)
for more details.
2025-04-17 18:52:03 +01:00
Muratcan Yeldan
7bdefb69c2
Make file extension checks case-insensitive in pipeline (#3368)
# Description of Changes

File extensions in the pipeline were being checked in a case-sensitive
manner. Since supported extensions were defined in lowercase only, files
with uppercase extensions were being rejected directly, and logs like
the following were being printed:

<img width="1542" alt="Screenshot 2025-04-17 at 00 14 16"
src="https://github.com/user-attachments/assets/a584b8d8-0a56-4a76-b409-9d6cd38f1a80"
/>

With this change, the uploaded file’s extension is now converted to
lowercase using toLowerCase, making the extension check
case-insensitive. After this change, the logs flow as expected, as shown
below:

<img width="1317" alt="Screenshot 2025-04-17 at 00 49 52"
src="https://github.com/user-attachments/assets/2abdcfc7-4c74-4b06-bbea-ef12e0f737b4"
/>

Closes #3243

---

## Checklist

### General

- [X] I have read the [Contribution
Guidelines](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/CONTRIBUTING.md)
- [X] I have read the [Stirling-PDF Developer
Guide](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/DeveloperGuide.md)
(if applicable)
- [X] I have read the [How to add new languages to
Stirling-PDF](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/HowToAddNewLanguage.md)
(if applicable)
- [X] I have performed a self-review of my own code
- [X] My changes generate no new warnings

### Documentation

- [ ] I have updated relevant docs on [Stirling-PDF's doc
repo](https://github.com/Stirling-Tools/Stirling-Tools.github.io/blob/main/docs/)
(if functionality has heavily changed)
- [ ] I have read the section [Add New Translation
Tags](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/HowToAddNewLanguage.md#add-new-translation-tags)
(for new translation tags only)

### UI Changes (if applicable)

- [ ] Screenshots or videos demonstrating the UI changes are attached
(e.g., as comments or direct attachments in the PR)

### Testing (if applicable)

- [X] I have tested my changes locally. Refer to the [Testing
Guide](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/DeveloperGuide.md#6-testing)
for more details.
2025-04-17 11:23:08 +01:00
7 changed files with 13 additions and 9 deletions

View File

@ -49,7 +49,7 @@
"java.configuration.updateBuildConfiguration": "interactive",
"java.format.enabled": true,
"java.format.settings.profile": "GoogleStyle",
"java.format.settings.google.version": "1.25.2",
"java.format.settings.google.version": "1.26.0",
"java.format.settings.google.extra": "--aosp --skip-sorting-imports --skip-javadoc-formatting",
"java.saveActions.cleanup": true,
"java.cleanup.actions": [

View File

@ -186,7 +186,7 @@ jobs:
file: ./Dockerfile
push: true
tags: ${{ secrets.DOCKER_HUB_USERNAME }}/test:pr-${{ needs.check-comment.outputs.pr_number }}
build-args: VERSION_TAG=${{ steps.versionNumber.outputs.versionNumber }}
build-args: VERSION_TAG=alpha
platforms: linux/amd64
- name: Set up SSH

View File

@ -1,6 +1,6 @@
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.9.10
rev: v0.11.6
hooks:
- id: ruff
args:
@ -22,7 +22,7 @@ repos:
files: \.(html|css|js|py|md)$
exclude: (.vscode|.devcontainer|src/main/resources|Dockerfile|.*/pdfjs.*|.*/thirdParty.*|bootstrap.*|.*\.min\..*|.*diff\.js)
- repo: https://github.com/gitleaks/gitleaks
rev: v8.24.0
rev: v8.24.3
hooks:
- id: gitleaks
- repo: https://github.com/pre-commit/pre-commit-hooks

View File

@ -10,7 +10,7 @@
"java.configuration.updateBuildConfiguration": "interactive",
"java.format.enabled": true,
"java.format.settings.profile": "GoogleStyle",
"java.format.settings.google.version": "1.25.2",
"java.format.settings.google.version": "1.26.0",
"java.format.settings.google.extra": "--aosp --skip-sorting-imports --skip-javadoc-formatting",
// (DE) Aktiviert Kommentare im Java-Format.
// (EN) Enables comments in Java formatting.

View File

@ -365,7 +365,7 @@ spotless {
java {
target project.fileTree('src').include('**/*.java')
googleJavaFormat("1.25.2").aosp().reorderImports(false)
googleJavaFormat("1.26.0").aosp().reorderImports(false)
importOrder("java", "javax", "org", "com", "net", "io", "jakarta", "lombok", "me", "stirling")
toggleOffOn()

View File

@ -208,7 +208,8 @@ public class PipelineDirectoryProcessor {
// Check against allowed extensions
boolean isAllowed =
allowAllFiles
|| inputExtensions.contains(extension);
|| inputExtensions.contains(
extension.toLowerCase());
if (!isAllowed) {
log.info(
"Skipping file with unsupported extension: {} ({})",

View File

@ -112,7 +112,8 @@ public class PipelineProcessor {
for (Resource file : outputFiles) {
boolean hasInputFileType = false;
for (String extension : inputFileTypes) {
if ("ALL".equals(extension) || file.getFilename().endsWith(extension)) {
if ("ALL".equals(extension)
|| file.getFilename().toLowerCase().endsWith(extension)) {
hasInputFileType = true;
MultiValueMap<String, Object> body = new LinkedMultiValueMap<>();
body.add("fileInput", file);
@ -166,7 +167,9 @@ public class PipelineProcessor {
.filter(
file ->
finalinputFileTypes.stream()
.anyMatch(file.getFilename()::endsWith))
.anyMatch(
file.getFilename().toLowerCase()
::endsWith))
.toList();
}
// Check if there are matching files