]> source.dussan.org Git - vaadin-framework.git/commitdiff
chore: Add a very visible obsoletion message
authorthinwire <patrik@js-games.com>
Tue, 5 Nov 2024 13:37:48 +0000 (15:37 +0200)
committerthinwire <patrik@js-games.com>
Tue, 5 Nov 2024 13:37:48 +0000 (15:37 +0200)
Adds a warning banner to the Vaadin startup when not in production mode, warning the user about known security vulnerabilities and encouraging them to upgrade to a supported version.

server/src/main/java/com/vaadin/server/Constants.java
server/src/main/java/com/vaadin/server/DefaultDeploymentConfiguration.java

index 653cf66c11889ef554e6f9b23969b52aeb39650b..b7f961c9227c3e6e3ae8f85ec87ca5bc4fcf20d0 100644 (file)
@@ -102,6 +102,26 @@ public interface Constants {
             + "VaadinService if you're not using custom class loader.\n"
             + "NullPointerExceptions will be thrown later."
             + "=================================================================";
+    
+    static final String UNMAINTAINED_VERSION_WARNING = "\n"
+            + " .:::::::::::::::::::::::  WARNING  :::::::::::::::::::::::. \n"
+            + "::'                                                       '::\n"
+            + "::                                                         ::\n"
+            + "::                  P L E A S E   N O T E                  ::\n"
+            + "::                                                         ::\n"
+            + "::                                                         ::\n"
+            + "::   This is an unmaintained version of Vaadin Framework   ::\n"
+            + "::               with known security issues.               ::\n"
+            + "::                                                         ::\n"
+            + "::        To upgrade to a maintained version, go to        ::\n"
+            + "::                                                         ::\n"
+            + "::     https://vaadin.com/vaadin-8-extended-maintenance    ::\n"
+            + "::                                                         ::\n"
+            + "::                                                         ::\n"
+            + "::.                                                       .::\n"
+            + " ':::::::::::::::::::::::  WARNING  :::::::::::::::::::::::' \n"
+            + "\n";
+
 
     static final String URL_PARAMETER_THEME = "theme";
 
index eee17f11e282251881fb09f09a2f5b924033d850..eee351b6302cd43b3d8f980bf3312047e3b416a7 100644 (file)
@@ -265,12 +265,15 @@ public class DefaultDeploymentConfiguration
 
     /**
      * Log a warning if Vaadin is not running in production mode.
+     *
+     * Also show a warning about unmaintained version.
      */
     private void checkProductionMode() {
         productionMode = getApplicationOrSystemProperty(
                 Constants.SERVLET_PARAMETER_PRODUCTION_MODE, "false")
                         .equals("true");
         if (!productionMode) {
+            getLogger().warning(Constants.UNMAINTAINED_VERSION_WARNING);
             getLogger().warning(Constants.NOT_PRODUCTION_MODE_INFO);
         }
     }