From e5cd8ce901ce0ca0b3e68bf3d8260ef7c7b9862d Mon Sep 17 00:00:00 2001 From: Muratcan Yeldan <48444068+muratcanyeldan@users.noreply.github.com> Date: Sun, 20 Apr 2025 13:49:34 +0300 Subject: [PATCH 01/59] Add SHOW_SURVEY Environment variable to Docker (#3378) In the previous implementation, the survey was displayed on the main screen when the homepage was opened for the 5th, 10th, 15th, 22nd, 30th, 50th, 75th, 100th, 150th, or 200th time, as long as the "Do not show again" option hadn't been selected. With this new feature, if the SHOW_SURVEY environment variable is set to true or not set at all in the Docker configuration, the survey will continue to be shown as before. Screenshot 2025-04-18 at 08 17 37 However, if the SHOW_SURVEY parameter is explicitly set to false, the survey will no longer be displayed. Screenshot 2025-04-18 at 08 18 39 Closes #1573 --- ## 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) - [X] 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. --- DeveloperGuide.md | 1 + .../docker-compose-latest-fat-endpoints-disabled.yml | 1 + .../docker-compose-latest-fat-security-postgres.yml | 1 + exampleYmlFiles/docker-compose-latest-fat-security.yml | 1 + exampleYmlFiles/docker-compose-latest-security-with-sso.yml | 1 + exampleYmlFiles/docker-compose-latest-security.yml | 1 + .../docker-compose-latest-ultra-lite-security.yml | 1 + exampleYmlFiles/docker-compose-latest-ultra-lite.yml | 1 + exampleYmlFiles/docker-compose-latest.yml | 1 + .../software/SPDF/controller/web/HomeWebController.java | 3 +++ src/main/resources/static/js/pages/home.js | 6 +++++- src/main/resources/templates/home.html | 2 ++ 12 files changed, 19 insertions(+), 1 deletion(-) diff --git a/DeveloperGuide.md b/DeveloperGuide.md index 8a4b53b6b..bbf8b8677 100644 --- a/DeveloperGuide.md +++ b/DeveloperGuide.md @@ -153,6 +153,7 @@ services: SYSTEM_MAXFILESIZE: "100" METRICS_ENABLED: "true" SYSTEM_GOOGLEVISIBILITY: "true" + SHOW_SURVEY: "true" restart: on-failure:5 ``` diff --git a/exampleYmlFiles/docker-compose-latest-fat-endpoints-disabled.yml b/exampleYmlFiles/docker-compose-latest-fat-endpoints-disabled.yml index 729684681..f36cd5bc7 100644 --- a/exampleYmlFiles/docker-compose-latest-fat-endpoints-disabled.yml +++ b/exampleYmlFiles/docker-compose-latest-fat-endpoints-disabled.yml @@ -32,4 +32,5 @@ services: SYSTEM_MAXFILESIZE: "100" METRICS_ENABLED: "true" SYSTEM_GOOGLEVISIBILITY: "true" + SHOW_SURVEY: "true" restart: on-failure:5 diff --git a/exampleYmlFiles/docker-compose-latest-fat-security-postgres.yml b/exampleYmlFiles/docker-compose-latest-fat-security-postgres.yml index b79631b6e..c04da1912 100644 --- a/exampleYmlFiles/docker-compose-latest-fat-security-postgres.yml +++ b/exampleYmlFiles/docker-compose-latest-fat-security-postgres.yml @@ -36,6 +36,7 @@ services: SYSTEM_DATASOURCE_CUSTOMDATABASEURL: "jdbc:postgresql://db:5432/stirling_pdf" SYSTEM_DATASOURCE_USERNAME: "admin" SYSTEM_DATASOURCE_PASSWORD: "stirling" + SHOW_SURVEY: "true" restart: on-failure:5 db: diff --git a/exampleYmlFiles/docker-compose-latest-fat-security.yml b/exampleYmlFiles/docker-compose-latest-fat-security.yml index 5d01f33f0..d9e4fa5a9 100644 --- a/exampleYmlFiles/docker-compose-latest-fat-security.yml +++ b/exampleYmlFiles/docker-compose-latest-fat-security.yml @@ -30,4 +30,5 @@ services: SYSTEM_MAXFILESIZE: "100" METRICS_ENABLED: "true" SYSTEM_GOOGLEVISIBILITY: "true" + SHOW_SURVEY: "true" restart: on-failure:5 diff --git a/exampleYmlFiles/docker-compose-latest-security-with-sso.yml b/exampleYmlFiles/docker-compose-latest-security-with-sso.yml index 9b86d4cc2..1514dd7d8 100644 --- a/exampleYmlFiles/docker-compose-latest-security-with-sso.yml +++ b/exampleYmlFiles/docker-compose-latest-security-with-sso.yml @@ -38,4 +38,5 @@ services: SYSTEM_MAXFILESIZE: "100" METRICS_ENABLED: "true" SYSTEM_GOOGLEVISIBILITY: "true" + SHOW_SURVEY: "true" restart: on-failure:5 diff --git a/exampleYmlFiles/docker-compose-latest-security.yml b/exampleYmlFiles/docker-compose-latest-security.yml index b79ea8016..ccd3a41c6 100644 --- a/exampleYmlFiles/docker-compose-latest-security.yml +++ b/exampleYmlFiles/docker-compose-latest-security.yml @@ -30,4 +30,5 @@ services: SYSTEM_MAXFILESIZE: "100" METRICS_ENABLED: "true" SYSTEM_GOOGLEVISIBILITY: "true" + SHOW_SURVEY: "true" restart: on-failure:5 diff --git a/exampleYmlFiles/docker-compose-latest-ultra-lite-security.yml b/exampleYmlFiles/docker-compose-latest-ultra-lite-security.yml index 8f3932f7a..c59713b71 100644 --- a/exampleYmlFiles/docker-compose-latest-ultra-lite-security.yml +++ b/exampleYmlFiles/docker-compose-latest-ultra-lite-security.yml @@ -27,4 +27,5 @@ services: SYSTEM_MAXFILESIZE: "100" METRICS_ENABLED: "true" SYSTEM_GOOGLEVISIBILITY: "true" + SHOW_SURVEY: "true" restart: on-failure:5 diff --git a/exampleYmlFiles/docker-compose-latest-ultra-lite.yml b/exampleYmlFiles/docker-compose-latest-ultra-lite.yml index d194be21c..6148f7251 100644 --- a/exampleYmlFiles/docker-compose-latest-ultra-lite.yml +++ b/exampleYmlFiles/docker-compose-latest-ultra-lite.yml @@ -26,4 +26,5 @@ services: SYSTEM_MAXFILESIZE: "100" METRICS_ENABLED: "true" SYSTEM_GOOGLEVISIBILITY: "true" + SHOW_SURVEY: "true" restart: on-failure:5 diff --git a/exampleYmlFiles/docker-compose-latest.yml b/exampleYmlFiles/docker-compose-latest.yml index 7dec8a959..51266ee8b 100644 --- a/exampleYmlFiles/docker-compose-latest.yml +++ b/exampleYmlFiles/docker-compose-latest.yml @@ -28,4 +28,5 @@ services: SYSTEM_MAXFILESIZE: "100" METRICS_ENABLED: "true" SYSTEM_GOOGLEVISIBILITY: "true" + SHOW_SURVEY: "true" restart: on-failure:5 diff --git a/src/main/java/stirling/software/SPDF/controller/web/HomeWebController.java b/src/main/java/stirling/software/SPDF/controller/web/HomeWebController.java index 3341d0054..0fdd8e9ce 100644 --- a/src/main/java/stirling/software/SPDF/controller/web/HomeWebController.java +++ b/src/main/java/stirling/software/SPDF/controller/web/HomeWebController.java @@ -67,6 +67,9 @@ public class HomeWebController { @GetMapping("/") public String home(Model model) { model.addAttribute("currentPage", "home"); + String showSurvey = System.getenv("SHOW_SURVEY"); + boolean showSurveyValue = showSurvey == null || "true".equalsIgnoreCase(showSurvey); + model.addAttribute("showSurveyFromDocker", showSurveyValue); return "home"; } diff --git a/src/main/resources/static/js/pages/home.js b/src/main/resources/static/js/pages/home.js index 7872374eb..6c48fe81d 100644 --- a/src/main/resources/static/js/pages/home.js +++ b/src/main/resources/static/js/pages/home.js @@ -61,6 +61,10 @@ document.addEventListener('DOMContentLoaded', function () { localStorage.setItem('pageViews', pageViews.toString()); function shouldShowSurvey() { + if(!window.showSurvey) { + return false; + } + if (localStorage.getItem('dontShowSurvey') === 'true' || localStorage.getItem('surveyTaken') === 'true') { return false; } @@ -112,7 +116,7 @@ function setAsDefault(value) { function adjustVisibleElements() { const container = document.querySelector('.recent-features'); - if(!container) return; + if(!container) return; const subElements = Array.from(container.children); let totalWidth = 0; diff --git a/src/main/resources/templates/home.html b/src/main/resources/templates/home.html index 925aefe8e..3842c1fe7 100644 --- a/src/main/resources/templates/home.html +++ b/src/main/resources/templates/home.html @@ -218,6 +218,8 @@ /**/ + + window.showSurvey = /*[[${showSurveyFromDocker}]]*/ true From 66b234f1df76c21fb81c537a1731b639a6097b63 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 20 Apr 2025 16:41:08 +0100 Subject: [PATCH 02/59] Bump com.fathzer:javaluator from 3.0.5 to 3.0.6 (#3386) Bumps [com.fathzer:javaluator](https://github.com/fathzer/javaluator) from 3.0.5 to 3.0.6.
Commits

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=com.fathzer:javaluator&package-manager=gradle&previous-version=3.0.5&new-version=3.0.6)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 3f3219af4..0f9392b5f 100644 --- a/build.gradle +++ b/build.gradle @@ -523,7 +523,7 @@ dependencies { implementation "org.commonmark:commonmark-ext-gfm-tables:0.24.0" // https://mvnrepository.com/artifact/com.bucket4j/bucket4j_jdk17 implementation "com.bucket4j:bucket4j_jdk17-core:8.14.0" - implementation "com.fathzer:javaluator:3.0.5" + implementation "com.fathzer:javaluator:3.0.6" implementation 'com.vladsch.flexmark:flexmark-html2md-converter:0.64.8' From c959b35639a488b0b4a2b749f427ac3dc188cf43 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 20 Apr 2025 16:41:57 +0100 Subject: [PATCH 03/59] Bump org.springframework:spring-webmvc from 6.2.5 to 6.2.6 (#3385) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [//]: # (dependabot-start) ⚠️ **Dependabot is rebasing this PR** ⚠️ Rebasing might not happen immediately, so don't worry if this takes some time. Note: if you make any changes to this PR yourself, they will take precedence over the rebase. --- [//]: # (dependabot-end) Bumps [org.springframework:spring-webmvc](https://github.com/spring-projects/spring-framework) from 6.2.5 to 6.2.6.
Release notes

Sourced from org.springframework:spring-webmvc's releases.

v6.2.6

:star: New Features

  • An option for SimpleAsyncTaskExecutor to throw an exception when limit is reached #34727
  • Provide first-class support for Bean Overrides with @ContextHierarchy #34723
  • Micro performance optimizations #34717
  • Suppress "Unable to rollback against JDBC Connection" in case of timeout (connection closed) #34714
  • Avoid early FactoryBean instantiation for type-based retrieval with includeNonSingletons=false and allowEagerInit=true #34710
  • ReactiveCachingHandler still not using error handler on sync cache. #34708
  • Add an exchangeForRequiredValue variant to RestClient #34692
  • Recursively boxing Kotlin nested value classes in CoroutinesUtils #34682
  • ServletServerHttpRequest does not use charset parameter of application/x-www-form-urlencoded #34675
  • LifecycleGroup concurrent start and start timeout #34634
  • HibernateJpaDialect exception translation misses concrete exceptions wrapped in Hibernate's ExecutionException #34633

:lady_beetle: Bug Fixes

  • Inconsistency in SseEmitter.onCompletion() behavior between Spring 6.2.3 and 6.2.5 #34762
  • Deadlock while creating Spring beans with parallel bootstrap threads on IBM Liberty #34729
  • PropertyBatchUpdateException: causes of nested PropertyAccessExceptions not shown in output #34691
  • IllegalAccessError for package-private member of AzureStorageConfiguration on WebSphere #34684
  • Change in Jar usecache behavior with Spring 6.1.x causing java.lang.IllegalStateException: zip file closed #34678
  • Startup performance regression due to CGLIB class load attempts in Spring 6.1.x #34677
  • An infinite wait on a parallel context.getBean() #34672
  • InvalidObservationException: Invalid start: Observation 'http.client.requests' has already been started #34671
  • @Configuration classes can no longer be abstract without @Bean methods #34663
  • Generated-code for LinkedHashMap is missing static keyword #34659
  • Detect late-set primary markers for autowiring shortcut algorithm #34658
  • @MockitoBean with custom @Qualifier is not injected into @Configuration class #34646
  • Qualifier Resolution Issue in Parent-Child Context Hierarchies #34644
  • Enforced container-level acknowledge call for custom acknowledgement mode #34635
  • UriComponentsBuilder does not treat a URN as opaque if it contains a slash #34588
  • Migrating from Spring 6.1.x to 6.2.x leads to exceptions in a Pekko setup #34303

:notebook_with_decorative_cover: Documentation

  • Update Javadoc for ignoreDependencyInterface() in AbstractAutowireCapableBeanFactory #34747
  • Update Javadoc to stop mentioning 5.3.x as the status quo #34740
  • Fix broken link for Server-Sent Events #34705
  • Fix typo in Bean Validation section of reference manual #34686
  • Remove unnecessary closing curly brackets in Javadoc #34679
  • Add javadoc notes on potential exception suppression in ListableBeanFactory#getBeansOfType #34629
  • Remove remaining references to Forwarded headers in MvcUriComponentsBuilder #34625

:heart: Contributors

Thank you to all the contributors who worked on this release:

@​acktsap, @​dmitrysulman, @​iggzq, @​izeye, @​ngocnhan-tran1996, @​obourgain, and @​tobias-haenel

Commits

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=org.springframework:spring-webmvc&package-manager=gradle&previous-version=6.2.5&new-version=6.2.6)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 0f9392b5f..1973c03d2 100644 --- a/build.gradle +++ b/build.gradle @@ -423,7 +423,7 @@ dependencies { } //security updates - implementation "org.springframework:spring-webmvc:6.2.5" + implementation "org.springframework:spring-webmvc:6.2.6" implementation("io.github.pixee:java-security-toolkit:1.2.1") From a52c81b340719c55cabae411800f1be9d07e56d3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 20 Apr 2025 16:42:28 +0100 Subject: [PATCH 04/59] Bump org.springframework:spring-jdbc from 6.2.5 to 6.2.6 (#3384) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [//]: # (dependabot-start) ⚠️ **Dependabot is rebasing this PR** ⚠️ Rebasing might not happen immediately, so don't worry if this takes some time. Note: if you make any changes to this PR yourself, they will take precedence over the rebase. --- [//]: # (dependabot-end) Bumps [org.springframework:spring-jdbc](https://github.com/spring-projects/spring-framework) from 6.2.5 to 6.2.6.
Release notes

Sourced from org.springframework:spring-jdbc's releases.

v6.2.6

:star: New Features

  • An option for SimpleAsyncTaskExecutor to throw an exception when limit is reached #34727
  • Provide first-class support for Bean Overrides with @ContextHierarchy #34723
  • Micro performance optimizations #34717
  • Suppress "Unable to rollback against JDBC Connection" in case of timeout (connection closed) #34714
  • Avoid early FactoryBean instantiation for type-based retrieval with includeNonSingletons=false and allowEagerInit=true #34710
  • ReactiveCachingHandler still not using error handler on sync cache. #34708
  • Add an exchangeForRequiredValue variant to RestClient #34692
  • Recursively boxing Kotlin nested value classes in CoroutinesUtils #34682
  • ServletServerHttpRequest does not use charset parameter of application/x-www-form-urlencoded #34675
  • LifecycleGroup concurrent start and start timeout #34634
  • HibernateJpaDialect exception translation misses concrete exceptions wrapped in Hibernate's ExecutionException #34633

:lady_beetle: Bug Fixes

  • Inconsistency in SseEmitter.onCompletion() behavior between Spring 6.2.3 and 6.2.5 #34762
  • Deadlock while creating Spring beans with parallel bootstrap threads on IBM Liberty #34729
  • PropertyBatchUpdateException: causes of nested PropertyAccessExceptions not shown in output #34691
  • IllegalAccessError for package-private member of AzureStorageConfiguration on WebSphere #34684
  • Change in Jar usecache behavior with Spring 6.1.x causing java.lang.IllegalStateException: zip file closed #34678
  • Startup performance regression due to CGLIB class load attempts in Spring 6.1.x #34677
  • An infinite wait on a parallel context.getBean() #34672
  • InvalidObservationException: Invalid start: Observation 'http.client.requests' has already been started #34671
  • @Configuration classes can no longer be abstract without @Bean methods #34663
  • Generated-code for LinkedHashMap is missing static keyword #34659
  • Detect late-set primary markers for autowiring shortcut algorithm #34658
  • @MockitoBean with custom @Qualifier is not injected into @Configuration class #34646
  • Qualifier Resolution Issue in Parent-Child Context Hierarchies #34644
  • Enforced container-level acknowledge call for custom acknowledgement mode #34635
  • UriComponentsBuilder does not treat a URN as opaque if it contains a slash #34588
  • Migrating from Spring 6.1.x to 6.2.x leads to exceptions in a Pekko setup #34303

:notebook_with_decorative_cover: Documentation

  • Update Javadoc for ignoreDependencyInterface() in AbstractAutowireCapableBeanFactory #34747
  • Update Javadoc to stop mentioning 5.3.x as the status quo #34740
  • Fix broken link for Server-Sent Events #34705
  • Fix typo in Bean Validation section of reference manual #34686
  • Remove unnecessary closing curly brackets in Javadoc #34679
  • Add javadoc notes on potential exception suppression in ListableBeanFactory#getBeansOfType #34629
  • Remove remaining references to Forwarded headers in MvcUriComponentsBuilder #34625

:heart: Contributors

Thank you to all the contributors who worked on this release:

@​acktsap, @​dmitrysulman, @​iggzq, @​izeye, @​ngocnhan-tran1996, @​obourgain, and @​tobias-haenel

Commits
  • 90f9c09 Release v6.2.6
  • f40d986 Revise configuration for javadoc Gradle tasks
  • 9c13c6b Revert "Use optimistic locking where possible in ResponseBodyEmitter"
  • b49924b Revert "Fix handling of timeout in SseEmitter"
  • 7b8c104 Upgrade to github-changelog-generator 0.0.12
  • 8f62a8f Suppress recently introduced warning
  • d0966df Revise contribution
  • bb45a3a Update AbstractAutowireCapableBeanFactory.ignoreDependencyInterface() Javadoc
  • 7095f4c Use proper casing for parameter and variable names
  • a22d204 Remove duplicate words in Java source code
  • Additional commits viewable in compare view

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=org.springframework:spring-jdbc&package-manager=gradle&previous-version=6.2.5&new-version=6.2.6)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 1973c03d2..1422d77d3 100644 --- a/build.gradle +++ b/build.gradle @@ -447,7 +447,7 @@ dependencies { implementation "org.springframework.boot:spring-boot-starter-oauth2-client:$springBootVersion" implementation "org.springframework.session:spring-session-core:3.4.2" - implementation "org.springframework:spring-jdbc:6.2.5" + implementation "org.springframework:spring-jdbc:6.2.6" implementation 'com.unboundid.product.scim2:scim2-sdk-client:2.3.5' // Don't upgrade h2database From f56403d091e126912a389d60581005d6b30a9f85 Mon Sep 17 00:00:00 2001 From: "stirlingbot[bot]" <195170888+stirlingbot[bot]@users.noreply.github.com> Date: Sun, 20 Apr 2025 16:43:24 +0100 Subject: [PATCH 05/59] =?UTF-8?q?=F0=9F=A4=96=20format=20everything=20with?= =?UTF-8?q?=20pre-commit=20by=20=20(#3374)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Auto-generated by [create-pull-request][1] with **stirlingbot** [1]: https://github.com/peter-evans/create-pull-request Signed-off-by: stirlingbot[bot] <195170888+stirlingbot[bot]@users.noreply.github.com> Co-authored-by: stirlingbot[bot] <195170888+stirlingbot[bot]@users.noreply.github.com> --- .../software/SPDF/EE/KeygenLicenseVerifier.java | 12 ++++++------ .../SPDF/controller/web/UploadLimitService.java | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/main/java/stirling/software/SPDF/EE/KeygenLicenseVerifier.java b/src/main/java/stirling/software/SPDF/EE/KeygenLicenseVerifier.java index ce3c94435..e4bd06312 100644 --- a/src/main/java/stirling/software/SPDF/EE/KeygenLicenseVerifier.java +++ b/src/main/java/stirling/software/SPDF/EE/KeygenLicenseVerifier.java @@ -390,7 +390,7 @@ public class KeygenLicenseVerifier { // Extract max users and isEnterprise from policy or metadata int users = policyObj.optInt("users", 0); isEnterpriseLicense = policyObj.optBoolean("isEnterprise", false); - + if (users > 0) { applicationProperties.getPremium().setMaxUsers(users); log.info("License allows for {} users", users); @@ -402,7 +402,7 @@ public class KeygenLicenseVerifier { users = metadata.optInt("users", 1); applicationProperties.getPremium().setMaxUsers(users); log.info("License allows for {} users (from metadata)", users); - + // Check for isEnterprise flag in metadata isEnterpriseLicense = metadata.optBoolean("isEnterprise", false); } else { @@ -411,7 +411,7 @@ public class KeygenLicenseVerifier { log.info("Using default of 1 user for license"); } } - + } return true; @@ -507,16 +507,16 @@ public class KeygenLicenseVerifier { .path("users") .asInt(0); applicationProperties.getPremium().setMaxUsers(users); - + // Extract isEnterprise flag - isEnterpriseLicense = + isEnterpriseLicense = jsonResponse .path("data") .path("attributes") .path("metadata") .path("isEnterprise") .asBoolean(false); - + log.info(applicationProperties.toString()); } else { diff --git a/src/main/java/stirling/software/SPDF/controller/web/UploadLimitService.java b/src/main/java/stirling/software/SPDF/controller/web/UploadLimitService.java index c1c9aebcf..f760f986a 100644 --- a/src/main/java/stirling/software/SPDF/controller/web/UploadLimitService.java +++ b/src/main/java/stirling/software/SPDF/controller/web/UploadLimitService.java @@ -16,7 +16,7 @@ public class UploadLimitService { private ApplicationProperties applicationProperties; public long getUploadLimit() { - String maxUploadSize = + String maxUploadSize = applicationProperties.getSystem().getFileUploadLimit() != null ? applicationProperties.getSystem().getFileUploadLimit() : ""; @@ -52,4 +52,4 @@ public class UploadLimitService { String pre = "KMGTPE".charAt(exp - 1) + "B"; return String.format("%.1f %s", bytes / Math.pow(1024, exp), pre); } -} \ No newline at end of file +} From 34fd9924b51b6f3a128d3e930b691e758f07ac9a Mon Sep 17 00:00:00 2001 From: "stirlingbot[bot]" <195170888+stirlingbot[bot]@users.noreply.github.com> Date: Sun, 20 Apr 2025 16:46:26 +0100 Subject: [PATCH 06/59] Update 3rd Party Licenses (#3389) Auto-generated by StirlingBot Signed-off-by: stirlingbot[bot] <1113334+stirlingbot[bot]@users.noreply.github.com> Co-authored-by: stirlingbot[bot] <195170888+stirlingbot[bot]@users.noreply.github.com> Co-authored-by: Anthony Stirling <77850077+Frooodle@users.noreply.github.com> --- src/main/resources/static/3rdPartyLicenses.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/resources/static/3rdPartyLicenses.json b/src/main/resources/static/3rdPartyLicenses.json index 8d07e6104..79c2f7f1f 100644 --- a/src/main/resources/static/3rdPartyLicenses.json +++ b/src/main/resources/static/3rdPartyLicenses.json @@ -128,7 +128,7 @@ }, { "moduleName": "com.fathzer:javaluator", - "moduleVersion": "3.0.5", + "moduleVersion": "3.0.6", "moduleLicense": "Apache License, Version 2.0", "moduleLicenseUrl": "https://www.apache.org/licenses/LICENSE-2.0.txt" }, @@ -1673,7 +1673,7 @@ { "moduleName": "org.springframework:spring-jdbc", "moduleUrl": "https://github.com/spring-projects/spring-framework", - "moduleVersion": "6.2.5", + "moduleVersion": "6.2.6", "moduleLicense": "Apache License, Version 2.0", "moduleLicenseUrl": "https://www.apache.org/licenses/LICENSE-2.0" }, @@ -1701,7 +1701,7 @@ { "moduleName": "org.springframework:spring-webmvc", "moduleUrl": "https://github.com/spring-projects/spring-framework", - "moduleVersion": "6.2.5", + "moduleVersion": "6.2.6", "moduleLicense": "Apache License, Version 2.0", "moduleLicenseUrl": "https://www.apache.org/licenses/LICENSE-2.0" }, From d66997a8d6c7ada0ceeeb783eb2bcf8491f84fc6 Mon Sep 17 00:00:00 2001 From: Ludy Date: Sun, 20 Apr 2025 19:42:47 +0000 Subject: [PATCH 07/59] Support domain `User` instances in `getCurrentUsername` method (#3383) # Description of Changes Please provide a summary of the changes, including: - **What was changed** The `getCurrentUsername()` method in `UserService` now recognizes and handles principals of type `stirling.software.SPDF.model.User`. Previously, only `UserDetails` and `OAuth2User` were supported; any `User` domain object was falling through to the default case and not returning the expected username. - **Why the change was made** In order to allow our custom domain `User` entities to be used directly as the authenticated principal (for example, when loading a user via JWT or session), we need to extract the username from that object. This makes authentication flows more consistent and prevents unexpected `null` or fallback values when the principal is our own `User` type. --- ## 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. Co-authored-by: Anthony Stirling <77850077+Frooodle@users.noreply.github.com> --- .../stirling/software/SPDF/config/security/UserService.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/java/stirling/software/SPDF/config/security/UserService.java b/src/main/java/stirling/software/SPDF/config/security/UserService.java index 464676710..cc12332a6 100644 --- a/src/main/java/stirling/software/SPDF/config/security/UserService.java +++ b/src/main/java/stirling/software/SPDF/config/security/UserService.java @@ -423,6 +423,8 @@ public class UserService implements UserServiceInterface { if (principal instanceof UserDetails detailsUser) { return detailsUser.getUsername(); + } else if (principal instanceof stirling.software.SPDF.model.User domainUser) { + return domainUser.getUsername(); } else if (principal instanceof OAuth2User oAuth2User) { return oAuth2User.getAttribute( applicationProperties.getSecurity().getOauth2().getUseAsUsername()); From 2bb716da84ba616a52139445dfd734f9ba873b1b Mon Sep 17 00:00:00 2001 From: Dario Ghunney Ware Date: Tue, 22 Apr 2025 11:42:39 +0100 Subject: [PATCH 08/59] Mac `x86_64` installer Hotfix (#3391) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 😅 - Added java options to jpackage installer - Fixed trigger in OS release workflow --- ## 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. --------- Co-authored-by: Anthony Stirling <77850077+Frooodle@users.noreply.github.com> --- .github/workflows/multiOSReleases.yml | 14 ++++---- build.gradle | 48 +++++++++++++++++---------- 2 files changed, 38 insertions(+), 24 deletions(-) diff --git a/.github/workflows/multiOSReleases.yml b/.github/workflows/multiOSReleases.yml index b8c463bf6..28a5bd32b 100644 --- a/.github/workflows/multiOSReleases.yml +++ b/.github/workflows/multiOSReleases.yml @@ -2,13 +2,13 @@ name: Test Installers Build on: workflow_dispatch: - release: - types: [created] inputs: test_mode: - description: "Run in test mode (skips release step)" + description: "Run in test mode (skip release step)" required: false default: "false" + release: + types: [created] permissions: contents: read @@ -175,7 +175,7 @@ jobs: STIRLING_PDF_DESKTOP_UI: true BROWSER_OPEN: true - - name: ☕ Set up JDK (x86_64) + - name: Set up JDK (x86_64) if: matrix.os == 'macos-latest' run: | curl -L -o jdk.tar.gz https://cdn.azul.com/zulu/bin/zulu17.56.15-ca-jdk17.0.14-macosx_x64.tar.gz @@ -200,10 +200,10 @@ jobs: ls -lah ./build/jpackage/ mkdir ./binaries if [ "${{ matrix.os }}" = "windows-latest" ]; then - mv "./build/jpackage/Stirling-PDF-${{ needs.read_versions.outputs.version }}.exe" "./binaries/Stirling-PDF-win-installer.exe" + mv "./build/jpackage/Stirling PDF-${{ needs.read_versions.outputs.version }}.exe" "./binaries/Stirling-PDF-win-installer.exe" elif [ "${{ matrix.os }}" = "macos-latest" ]; then - mv "./build/jpackage/Stirling-PDF-${{ needs.read_versions.outputs.versionMac }}.dmg" "./binaries/Stirling-PDF-mac-installer.dmg" - mv "./build/jpackage/x86_64/Stirling-PDF (x86_64)-${{ needs.read_versions.outputs.versionMac }}.dmg" "./binaries/Stirling-PDF-mac-x86_64-installer.dmg" + mv "./build/jpackage/Stirling PDF-${{ needs.read_versions.outputs.versionMac }}.dmg" "./binaries/Stirling-PDF-mac-installer.dmg" + mv "./build/jpackage/x86_64/Stirling PDF (x86_64)-${{ needs.read_versions.outputs.versionMac }}.dmg" "./binaries/Stirling-PDF-mac-x86_64-installer.dmg" else mv "./build/jpackage/stirling-pdf_${{ needs.read_versions.outputs.version }}-1_amd64.deb" "./binaries/Stirling-PDF-linux-installer.deb" fi diff --git a/build.gradle b/build.gradle index 1422d77d3..5c0bc9741 100644 --- a/build.gradle +++ b/build.gradle @@ -116,10 +116,10 @@ jpackage { input = "build/libs" destination = "${projectDir}/build/jpackage" mainJar = "Stirling-PDF-${project.version}.jar" - appName = "Stirling-PDF" + appName = "Stirling PDF" appVersion = project.version // appVersion = "2005.45.1" - vendor = "Stirling-Software" + vendor = "Stirling PDF Inc" appDescription = "Stirling PDF - Your Local PDF Editor" icon = "src/main/resources/static/favicon.ico" verbose = true @@ -151,7 +151,7 @@ jpackage { winShortcutPrompt = true // Lets user choose whether to create shortcuts winDirChooser = true // Allows users to choose installation directory winPerUserInstall = false - winMenuGroup = "Stirling Software" + winMenuGroup = "Stirling PDF" winUpgradeUuid = "2a43ed0c-b8c2-40cf-89e1-751129b87641" // Unique identifier for updates winHelpUrl = "https://github.com/Stirling-Tools/Stirling-PDF" winUpdateUrl = "https://github.com/Stirling-Tools/Stirling-PDF/releases" @@ -164,8 +164,8 @@ jpackage { appVersion = getMacVersion(project.version.toString()) icon = "src/main/resources/static/favicon.icns" type = "dmg" - macPackageIdentifier = "Stirling-PDF" - macPackageName = "Stirling-PDF" + macPackageIdentifier = "Stirling PDF" + macPackageName = "Stirling PDF" macAppCategory = "public.app-category.productivity" macSign = false // Enable signing macAppStore = false // Not targeting App Store initially @@ -249,18 +249,32 @@ tasks.register('jpackageMacX64') { def result = exec { commandLine 'jpackage', - '--type', 'dmg', - '--name', 'Stirling-PDF (x86_64)', - '--input', 'build/libs', - '--main-jar', "Stirling-PDF-${project.version}.jar", - '--main-class', 'org.springframework.boot.loader.launch.JarLauncher', - '--runtime-image', file(jrePath + "/zulu-17.jre/Contents/Home"), - '--dest', 'build/jpackage/x86_64', - '--icon', 'src/main/resources/static/favicon.icns', - '--app-version', getMacVersion(project.version.toString()), - '--mac-package-name', 'Stirling-PDF (x86_64)', - '--mac-package-identifier', 'Stirling-PDF (x86_64)', - '--mac-app-category', 'public.app-category.productivity' + '--type', 'dmg', + '--name', 'Stirling PDF (x86_64)', + '--input', 'build/libs', + '--main-jar', "Stirling-PDF-${project.version}.jar", + '--main-class', 'org.springframework.boot.loader.launch.JarLauncher', + '--runtime-image', file(jrePath + "/zulu-17.jre/Contents/Home"), + '--dest', 'build/jpackage/x86_64', + '--icon', 'src/main/resources/static/favicon.icns', + '--app-version', getMacVersion(project.version.toString()), + '--mac-package-name', 'Stirling PDF (x86_64)', + '--mac-package-identifier', 'Stirling PDF (x86_64)', + '--mac-app-category', 'public.app-category.productivity', + + // Java options + '--java-options', '-DBROWSER_OPEN=true', + '--java-options', '-DSTIRLING_PDF_DESKTOP_UI=true', + '--java-options', '-Djava.awt.headless=false', + '--java-options', '-Dapple.awt.UIElement=true', + '--java-options', '--add-opens=java.base/java.lang=ALL-UNNAMED', + '--java-options', '--add-opens=java.desktop/java.awt.event=ALL-UNNAMED', + '--java-options', '--add-opens=java.desktop/sun.awt=ALL-UNNAMED', + '--java-options', '--add-opens=java.desktop/sun.awt.X11=ALL-UNNAMED', + '--java-options', '--add-opens=java.desktop/sun.awt.windows=ALL-UNNAMED', + '--java-options', '--add-opens=java.desktop/sun.lwawt=ALL-UNNAMED', + '--java-options', '--add-opens=java.desktop/sun.lwawt.macosx=ALL-UNNAMED' + standardOutput = outputStream errorOutput = errorStream ignoreExitValue = true From b4d137cb92823edccf9e5d3a1425d2b55a500d9d Mon Sep 17 00:00:00 2001 From: ConnorYoh <40631091+ConnorYoh@users.noreply.github.com> Date: Tue, 22 Apr 2025 23:03:33 +0100 Subject: [PATCH 09/59] Changed footer to be more responsive to page size (#3398) # Description of Changes Please provide a summary of the changes, including: Closes #3397 --- ## 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) - [x] Screenshots or videos demonstrating the UI changes are attached (e.g., as comments or direct attachments in the PR) ![{472F5883-F959-4964-AA1D-0CA41C17353C}](https://github.com/user-attachments/assets/08fc1ba0-449f-4c94-aaaa-9d82e543d620) ![{47E33B3E-08D5-42B8-8733-12726C5A4EA7}](https://github.com/user-attachments/assets/94a458c4-59d5-452c-bbcb-c51451d24351) ![{162DFADA-787F-4A1B-BAF6-C1D42D2446B4}](https://github.com/user-attachments/assets/84639b36-c484-4c28-9afa-c2dc56537075) ![{CAC92714-A8CA-4296-9CAD-40DBF621C182}](https://github.com/user-attachments/assets/bbfad20f-ab75-4e96-b7db-3f1e44949c19) ![{952CC64F-7CCF-4798-A3DE-309613329B76}](https://github.com/user-attachments/assets/8254adfa-38fa-44bd-b8e7-1cbe7e892466) ![{89EBC7DD-B633-4029-AC3D-BF29C83C7F24}](https://github.com/user-attachments/assets/69893770-05b9-4e3b-8e28-4d699722a0f5) ### 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. --- src/main/resources/static/css/footer.css | 21 +++++++++++++++++++ .../resources/templates/fragments/footer.html | 2 +- 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/src/main/resources/static/css/footer.css b/src/main/resources/static/css/footer.css index 4a85e7566..3945b1b43 100644 --- a/src/main/resources/static/css/footer.css +++ b/src/main/resources/static/css/footer.css @@ -37,3 +37,24 @@ text-decoration: none; cursor: pointer; } + +.footer-link-list { + display: flex; + flex-direction: row; /* Align links in a row */ +} + +/* Responsive styles for smaller screens */ +@media (max-width: 650px) { + .footer-link { + font-size: 0.8rem; /* Adjust font size for smaller screens */ + } +} + +@media (max-width: 550px) { + .footer-link { + font-size: 1rem; /* Adjust font size for smaller screens */ + } + .footer-link-list{ + flex-direction: column; /* Stack links vertically on smaller screens */ + } +} \ No newline at end of file diff --git a/src/main/resources/templates/fragments/footer.html b/src/main/resources/templates/fragments/footer.html index a3c99e46a..324f550d9 100644 --- a/src/main/resources/templates/fragments/footer.html +++ b/src/main/resources/templates/fragments/footer.html @@ -4,7 +4,7 @@