]> source.dussan.org Git - vaadin-framework.git/commitdiff
chore: Add a very visible obsoletion message (#12634) master
authorPatrik Lindström <99639133+thevaadinman@users.noreply.github.com>
Fri, 8 Nov 2024 08:02:31 +0000 (10:02 +0200)
committerGitHub <noreply@github.com>
Fri, 8 Nov 2024 08:02:31 +0000 (10:02 +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 754e52b70a95e1e7a3822ab39acdd0afbbb3ff90..07581e4913051ceba26fd0d1279af64381c537a6 100644 (file)
@@ -102,6 +102,26 @@ public interface Constants {
             + "VaadinService if you're not using custom class loader.\n"
             + "NullPointerExceptions will be thrown later."
             + "=================================================================";
             + "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";
 
 
     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.
 
     /**
      * 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) {
      */
     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);
         }
     }
             getLogger().warning(Constants.NOT_PRODUCTION_MODE_INFO);
         }
     }